Pointers in C# to Retrieve Reference From DllImport Function

后端 未结 3 845
滥情空心
滥情空心 2021-01-23 01:12

I am referencing a DLL in my C# project as follows:

[DllImport(\"FeeCalculation.dll\", CallingConvention = CallingConvention.StdCall,
           CharSet = CharSe         


        
3条回答
  •  执念已碎
    2021-01-23 02:07

    To answer your Edit, you need to create a struct, and then use the StructLayoutAttribute on the fields in order to make the byte order and padding the same as the original dll did.

提交回复
热议问题