I have two C++/CLI DLLs that I am trying to use with C#. I am using VS10 and have made sure that the DLLs are appropriately included in the “References” folder.
So, the first DLL works great. It contains classes, so the C# application can access the functions within the classes by 1) creating an instance of a class found in the DLL, then 2) calling the function “normally.” (e.g. instanceOfClass.method1(); ).
The second DLL does not work. In the second DLL, all functions are at a global scope. No namespace scopes or classes. I am running into issues here, because when I try to access one of these functions in the C# application, I get an error: The name 'fxn' does not exist in the current context. I have tried all of the following possible ways of addressing the function: