469,364 Members | 2,424 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,364 developers. It's quick & easy.

DLLImport Error: EntryPointNotFound

When i Try To Call An External function In An Unmanaged DLL (*.lib) I
Get An Exception "An unhandled exception of type
'System.EntryPointNotFoundException' occurred in qtextpathlinker.dll"

This Is The Wrapper call Used In Side My C# DLL "qtextpathlinker.dll":
[DllImport("InterOp.dll",EntryPoint="CreateQPathTex tBSC",CallingConvention=CallingConvention.Cdecl,Pr eserveSig=false)]
internal unsafe static extern IntPtr* CreateQPathTextBSC(float*
points,byte* types,int PointsCount);

The Types In The C++ lib file and my C# File Are Identical.
Can Any One Help Me Please?
Andrew.

Feb 2 '06 #1
3 6027
PhX.ZA,

Without seeing the header file, it's hard to say that the types are
identical.

First, you don't need to set the PreserveSig or the EntryPoint fields,
since neither have an effect in this case.

You have no need to return a pointer to an IntPtr, you should just
return an IntPtr. On top of that, if the pointers to the values passed in
represent arrays that are not changed, you can actually declare them as
arrays.

Finally, the EntryPointNotFoundException indicates that the dll is not
found. Are you sure the unmanaged dll is in the path that LoadLibary would
use to find it?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"PhX.ZA" <An*******************@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
When i Try To Call An External function In An Unmanaged DLL (*.lib) I
Get An Exception "An unhandled exception of type
'System.EntryPointNotFoundException' occurred in qtextpathlinker.dll"

This Is The Wrapper call Used In Side My C# DLL "qtextpathlinker.dll":
[DllImport("InterOp.dll",EntryPoint="CreateQPathTex tBSC",CallingConvention=CallingConvention.Cdecl,Pr eserveSig=false)]
internal unsafe static extern IntPtr* CreateQPathTextBSC(float*
points,byte* types,int PointsCount);

The Types In The C++ lib file and my C# File Are Identical.
Can Any One Help Me Please?
Andrew.

Feb 2 '06 #2

"PhX.ZA" <An*******************@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
| When i Try To Call An External function In An Unmanaged DLL (*.lib) I
| Get An Exception "An unhandled exception of type
| 'System.EntryPointNotFoundException' occurred in qtextpathlinker.dll"
|
| This Is The Wrapper call Used In Side My C# DLL "qtextpathlinker.dll":
|
[DllImport("InterOp.dll",EntryPoint="CreateQPathTex tBSC",CallingConvention=CallingConvention.Cdecl,Pr eserveSig=false)]
| internal unsafe static extern IntPtr* CreateQPathTextBSC(float*
| points,byte* types,int PointsCount);
|
| The Types In The C++ lib file and my C# File Are Identical.
| Can Any One Help Me Please?
| Andrew.
Looks like CreateQPathTextBSC is not an exported C function or has a
different signature!

Willy.
Feb 2 '06 #3
Check that your application is not creating this dll already...

I had same problem with wininet.dll when developing a class.
I was getting mad trying to find the answer because nobody seemed to have the same thing.. when i realized my application was creating the dll named like the one i needed "wininet.dll".

Of course the api call was looking into this new created dll instead of the one in windows\system32..

Hope this helps
Jun 24 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mr.Tickle | last post: by
15 posts views Thread by Jim | last post: by
2 posts views Thread by Brian Anderson | last post: by
4 posts views Thread by Sanjay Kumar | last post: by
9 posts views Thread by jjones7947 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.