|
-
January 4th, 2005, 07:41 AM
#1
How to get BYTE array allocated in Unmanaged DLL ???
I’m using an unmanaged DLL wartime in C that exports the function:
Code:
void Get (BYTE** pByte);
This function fills the pByte with a BYTE buffer that is allocated inside the unmanaged DLL.
How do I use this function from a C# code?
I tried:
Code:
[DllImport("Unmanged.dll")]
public static extern void Get(out byte[] frame);
and
Code:
byte [] myByteArray = null ;
UnmangedDLL.Get(out myByteArray);
The trouble was that myByteArray returned with size of 1 while the unmanaged DLL set it to point byte array of 100 bytes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|