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.