finding the typedef of unmanaged type in managed c++

  • Thread starter Thread starter Sharon McCarty
  • Start date Start date
S

Sharon McCarty

Hi,

I'm trying to use the __typeof operator to find the size of
CRYPTPROTECT_PROMPTSTRUCT in managed c++:

DWORD somesize = Marshal::SizeOf(__typeof(CRYPTPROTECT_PROMPTSTRUCT));

I'm getting a compilor error that __typeof expects a fully defined
managed type. Can someone please tell me another alternative way to
find the typeof the typedef (CRYPTPROTECT_PROMPTSTRUCT is a typedef
defined in wincrypt.h)?

Thanks

Sharon
 
Hi Sharon McCarty,
DWORD somesize = Marshal::SizeOf(__typeof(CRYPTPROTECT_PROMPTSTRUCT));

I'm getting a compilor error that __typeof expects a fully defined
managed type. Can someone please tell me another alternative way to
find the typeof the typedef (CRYPTPROTECT_PROMPTSTRUCT is a typedef
defined in wincrypt.h)?


size_t somesize = sizeof(CRYPTPROTECT_PROMPTSTRUCT);

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Back
Top