G
Guest
Hi,
I would like to pass-in the structure (typedef) from the C# to managed C++ and eventually to the unmanaged C++ DLL. Unmanaged C++ DLL expects the LPVOID as a parameter for passing the structure. Unamaned C++ DLL fills-in data into memebers of the structure. To accomplish this, I am passing IntPtr from C# to managed C++ and then marshalling IntPtr to void* before passing it into the unmanaged C++ DLL. The question I have is how do I cast structure into the IntPtr in my C# code? Is this a feasible option or there is any opther alternative for passing structure as an LPVOID?
-Jon
I would like to pass-in the structure (typedef) from the C# to managed C++ and eventually to the unmanaged C++ DLL. Unmanaged C++ DLL expects the LPVOID as a parameter for passing the structure. Unamaned C++ DLL fills-in data into memebers of the structure. To accomplish this, I am passing IntPtr from C# to managed C++ and then marshalling IntPtr to void* before passing it into the unmanaged C++ DLL. The question I have is how do I cast structure into the IntPtr in my C# code? Is this a feasible option or there is any opther alternative for passing structure as an LPVOID?
-Jon