Having trouble with pInvoke, weird behavior.
-
I am trying to pInvoke into a very simple C++ dll I have created, from my C# winforms app. I start by creating a C++ dll using the VC8 wizard, and checking off "export symbols" as I want to call a basic function from C#. By default the wizard creates a sample function and exports it. However when I run my C# app, it says it can't find an entry point for the function name I have defined in my DLLImport attribute. I have made sure that the dll is in the same directory as my C# executable. Incidentally, I can pInvoke fine into other system dlls, so what am I doing wrong?
-
I am trying to pInvoke into a very simple C++ dll I have created, from my C# winforms app. I start by creating a C++ dll using the VC8 wizard, and checking off "export symbols" as I want to call a basic function from C#. By default the wizard creates a sample function and exports it. However when I run my C# app, it says it can't find an entry point for the function name I have defined in my DLLImport attribute. I have made sure that the dll is in the same directory as my C# executable. Incidentally, I can pInvoke fine into other system dlls, so what am I doing wrong?