Link to home
Start Free TrialLog in
Avatar of roujesky
roujesky

asked on

More calling DLL questions -- this time types

I have a dll that has a constructor that takes a C++ type string.
example definition in header file
        Foo(const string &filepath);

        [DllImport("FooDLL.dll", CallingConvention = CallingConvention.Cdecl)]
        public static extern IntPtr Foo(ref System.String filepath);

How do I call this in C#?  below gets me an "EntryPointNotFoundException", which indicates to me that the calling signature doesnt match....

        public IntPtr ip;
        string str = "junk";

        ip = SignumIU(ref str);


thanks!
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial