> I know of no way to do that.

Can't the good'ol sizeof trick work in this situation ?