I'm receiving an 'unable to find entry point' error on the following
DLLImport:
[DllImport("S:\\Core_Dev_PreViewInterp\\Build\\ImageFile.dll",
EntryPoint = "PB_Uncompress")]
public static extern void PB_Uncompress(ref byte[] pOut, ref byte[]
pIn, uint numBytes);
The C++ declaration is as follows:
__declspec(dllexport) void PB_Uncompress(BYTE *pOut, BYTE *pIn, DWORD
numBytes);
Is this really a problem with the entry point, or a problem with the
signature I've used? I don't know if I can be using an array of bytes
by reference in place of a pointer to a byte?
Mattias Sjögren - 14 Sep 2006 19:39 GMT
Chris,
>Is this really a problem with the entry point, or a problem with the
>signature I've used?
In this case both. You can use a tool such as Dumpbin.exe to check the
names of exported functions in the DLL. I'm guessing it's being
exported with a mangled name.
The arrays should be passed by value, remove the ref modifiers.
Mattias

Signature
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.