Can I embed a win32 DLL in a .NET assembly and make calls using P / Invoke?

I am writing a C # shell for a third-party library that we have as a DLL. I would like to be able to distribute one DLL for a new build. Is it possible for me to embed the win32 DLL in my .NET DLL and still call it using P / Invoke? If so, how?

+5
source share
3 answers

I have never done this, but I know about an open source project that does this. They will embed their own SQLite3 code in a managed SQLite assembly using their own mergebin tool .

SQLite project .NET PHX , , .

+2

, dll .

DLL , , .

, , .

+2

I do not think you can do this directly, but you can extract it at runtime to a temporary location and make a call to this copy.

+1
source

All Articles