Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / September 2006

Tip: Looking for answers? Try searching our database.

Unable to find entry point - Bad signature?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris  Ashley - 14 Sep 2006 09:49 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.