Connect to unknown function in dll using C #

Is it possible to find out what functions are available in an arbitrary dll file, and then call these functions using C # interaction services.

+3
source share
7 answers

You can analyze the exported functions of any native module (DLL or EXE) with tools such as dumpbin . Once you have the signatures of the exported functions, you can write P / Invoke wrappers for any of them that you want.

Alternatively, you can use a tool, such as the P / Invoke Interop Assistant , to do this job automatically.

, , . , , , GetProcAddress ..

+1

, DLL, , DLL C-, .

. DLL C , , , . .NET Interop (PInvoke), , .

: , , DLL, DumpBin /exports filename.dll, , , . , , , , .

+1

Dependency Walker DLL.

0

DLL - , System.Reflection .

Win32 dll, : P/Invoke API Win32 LoadLibrary GetProcAddress , , .

0

, dll, ​​, dumpbin PE Explorer. dll.

0

"" DLL, .net "", , . . " ".

-1

Source: https://habr.com/ru/post/1747064/


All Articles