I don't get what the problem is.
Dereference the pointer and do sizeof as you seem to be doing.
#define GETMETHESIZEOFTHINGATENDOFPOINTER(ptr) sizeof(*ptr)
void dummyFunc( ThisThingIsbiggerThan4bytes *ptr )
{
assert( NULL!=ptr );
cout << sizeof(*ptr); // prints sizeof ThisThingIsbiggerThan4bytes
cout << sizeof(ptr); // prints 4
cout << GETMETHESIZEOFTHINGATENDOFPOINTER(ptr); // prints sizeof ThisThingIsbiggerThan4bytes
}
The macro will just be replaced by the call to sizeof. But it's not type safe, and it's a very bad idea.
Why exactly are you trying to do this? What are you hoping to achieve? Finally, NEVER do anything like what i just showed you above :-D
I just threw together a small test app and it did exactly what I'd expect.
Andy