I have a COM object written in what I believe is C++. I do not have the source code, only the .dll and an SDK manual that gives prototypes for all of the functions. The .dll provides an interface with an external piece of hardware. As I understand it, the .dll is proprietary, so there is no chance of getting the original source to modify.

I'm wrapping the .dll in C# to interface with a program called LabVIEW. LabVIEW doesn't have native pointer support, and from what I understand it doesn't handle certain kinds of structs either. In the original .dll, arguably the most important component is an event that fires with a pointer to a struct of data.

I've successfully wrapped most of the methods; simple things like connecting to the device, starting it, stopping it, etc. What I don't understand how to wrap are events. Short of rewriting the entire event, which seems impossible due to the proprietary nature of their code/device, is there any way of essentially mimicking the event that is already in place so I can restructure the data accordingly? This is my first C# project, in fact my first project involving COM and events as well.

Thank you very much for your time and assistance!