-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can this tool create .h & .lib files correspond to the C# function signature? #60
Comments
You can get and format the list of exported functions as you need through
But without full signatures. It easy to implement for .net environment via Cecil etc., but for unmanaged C++ we need to implement translation to equivalents for marshaled types, and so on.
You can generate additional .exp & .lib when
|
So how should I know what is the unmanaged c++ counterpart to an exported C# function? [DllExport]
public static void print(string str) {} I guessed that if I call it as: void print(const char* str) {} it will work. [DllExport]
public static void printArr(string[] str) {} I didn't find the right unmanaged signature :-( |
@BlueSolei Only primitive types and read more about PInvoke. Related: That is, use pointer to allocated string etc. [DllExport]
public static void print(IntPtr ptr) {} |
I updated solutions for how to use complex types and strings between unmanaged and managed environments:
But going back to the original question from this issue! if this was not a misunderstanding and if it really is needed to someone, well, please clarify additional details. Probably I can implement something if this will be justified for some cases. |
Question:
Can this tool create a .h file with the C++ function's signature?
Can it create a .lib file, so I can statically link to this DLL and won't need to do all this dynamic loading LoadLibraryEx\GetProcAdddress boilerplate error-prone code?
The text was updated successfully, but these errors were encountered: