user586399
user586399

Reputation:

Adding DLL to the resources

My app is using a win32 DLL (implemented with C language). It is necessary for the app to to work. Well, I want to merge the DLL with the exe, by adding the DLL to the exe resources. Can I add it as binary stream? If not, how can I merge the DLL with the app?

Upvotes: 0

Views: 4147

Answers (2)

Yahia
Yahia

Reputation: 70369

As per comments above:

IF the DLL is native then you need to extract it to a file (for example on the start of the EXE) - there is NO documented/supported way for native DLLs to be used the way you describe...

IF the DLL were a .NET DLL then this would be possible/supported (by loading it as an Assembly via a memory/Resource stream or byte[])...

Upvotes: 1

Rajesh
Rajesh

Reputation: 632

According to http://www.dottodotnet.com/2010/10/read-embedded-resource-text-file-in-c.html and Embedded Binary Resources - how can I enumerate the image files embedded? You can add it as binary stream and as as such.

Then you have to save it to the file and late bind it as explained in http://www.codeproject.com/KB/cs/dyninvok.aspx

Upvotes: 1

Related Questions