472,334 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,334 software developers and data experts.

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 6139
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mr.Tickle | last post by:
I made a DLL with some test functions like in the .CPP file.. void test(void) { return; } and in the .H file i have..
15
by: Jim | last post by:
I am extremely frustrated. I am building c# application for a call center and am using a third party API to access some hardware. When develop...
9
by: L | last post by:
Hi guys, I am writing some interop code to print graphics to an eps file and I use adobe printer driver. The piece of code I have written is...
2
by: Brian Anderson | last post by:
Hello, is it possible to use DllImport to call a DLL in ASP.NET ? Or is it necessarry that my DLL has to be copied into \System32 ? My DLL is...
2
by: Schorschi | last post by:
Can't seemd to get ReadFile API to work! Returns invalid handle error? ===========================================================================...
6
by: Ken | last post by:
When running a program in the debugger, what would cause it to crash without any error messages? I get "The program has exited with code 0 (0x0)". ...
2
by: rmcbeth | last post by:
I'm working in Visual Basic.net and I'm new to creating DLLs. I ran into a problem creating a simple DLL. I used this newsgroup to try and figure...
4
by: Sanjay Kumar | last post by:
Folks ! I am working with VC++ after a long time and having problem linking latest xerces 2.7 in VC++ 2005 Express Edition. I have done...
9
by: jjones7947 | last post by:
Am doing a JNI wrap on a C++ API, am using VC7 and Eclipse. In preparation, I created a C++ executable which mimicked the flow of the JNI, i.e. a...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.