I have a legacy DLL which is written in C. I want to call from the NET application. The problem is that the DLL interface for C DLL is quite complex. This is something like this:
__Dllexport Zero __stdcall ProcessChunk (Zero * p_prochdl, const BIG_INPUT_STRC * p_inparams, BIG_OUTPUT_STRC * p_outparams);
BIG_INPUT_STRC / BIG_OUTPUT_STRC contains all kinds of things ... hints for buffer arrays, enumerated criteria, integer parameters, etc. In essence, they are complicated.
The first question: Is there an easy way to get all the structure information contained in the DLL header file in the C # class, or do you literally copy and paste everything in C # and redefine it? need to? It seems redundant.
What is the correct way to pass strokes from unmanaged DLL to C #?
Finally, how do the buffer arrays correctly pass in C # from unmanaged DLL? Alternatively, how do I cross a two-dimensional array in DLL?
Thanks, -Greg
Its direct effect is P / Invoke in C # Using C #.
I believe that you have to define data structures manually in C #.
I will take care of this topic
Comments
Post a Comment