Dynamically P/Invoking a DLL

后端 未结 4 743
夕颜
夕颜 2020-12-18 00:25

What is the best way to dynamically P/Invoke unmanaged code from .NET?

For example, I have a number of unmanaged DLL\'s with common C-style exports between them. I

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-18 01:17

    You can do this by P/Invoking into LoadLibrary and GetProcAddress, and then using Marshal.GetDelegateForFunctionPointer.

    For details, see this article.

提交回复
热议问题