c isn't null. c contains a valid memory address and according to the Visual Studio debugger it contains the addresses of virtual functions. The same source is working when compiled with GCC. The difference may be is in the calling conventions or i don't know. But there is no problem in the source. The problem is in the dll that is used i think.
Small correction: You _can_ use int. The only thing that was causing troubles was the long declaration, since longs in .NET are 8 byte and not 4 like WPARAM. Oh, and the [MarshalAs...] declaration is superfluous, btw. Regards, mav