Interoping h files

  • Thread starter Thread starter Udi
  • Start date Start date
U

Udi

Has anyone heard or know of a tool that takes an h file and builds an
interop .cs wrapper to it dynamically?
Thanks,
Udi.
 
Thanks Fabien!
Tried it, it doesn't work so well -

the unmanaged function "void foo (unsigned int & param)"
yields the following -
[DllImport(...)]
public static extern void foo (unsigned int & param);

Strange, isn't it?
 
I'm not sure PInvoke can handle this by-reference parameter...In this case,
you will have a compilation error, which is certainly the best way to inform
you you have to manually correct the declaration.

IMHO, such a tool can't be used blindly to bind your dll but is here to save
you a lot of time...

Fabien
 
Back
Top