Hello everyone,
I have just started a project that requires a windows service that read output from a PCI card via an API. I've been unfortunate enough to be handed an ActiveX .ocx library that exposes methods to use, but with no documentation specific to using the methods available in a .NET environment (last API / driver update was Nov 02).
The method I need looks likes this - void MultiRead(short channel1, short channel2, ref float pDataBuffer).
As you can probably tell, the problem lies with the 3rd parameter, which is a pointer to a "one dimensional array." When I try to create a pointer to a byte[] I get this compilation error
"Cannot take the address of, get the size of, or declare a pointer to a managed type."
I know its a long shot , but has anyone had a problem like this before, and can you help me out? I need to know how I can create a one dimensional array capable of being populated with text or byte data, and which is also an object or struct that I can create a pointer to.
I have just started a project that requires a windows service that read output from a PCI card via an API. I've been unfortunate enough to be handed an ActiveX .ocx library that exposes methods to use, but with no documentation specific to using the methods available in a .NET environment (last API / driver update was Nov 02).
The method I need looks likes this - void MultiRead(short channel1, short channel2, ref float pDataBuffer).
As you can probably tell, the problem lies with the 3rd parameter, which is a pointer to a "one dimensional array." When I try to create a pointer to a byte[] I get this compilation error
"Cannot take the address of, get the size of, or declare a pointer to a managed type."
I know its a long shot , but has anyone had a problem like this before, and can you help me out? I need to know how I can create a one dimensional array capable of being populated with text or byte data, and which is also an object or struct that I can create a pointer to.
Comment