DLL import from resource?
I am pretty new to C# and I'm wondering if it's possible to directly load a DLL from resource? Right now I'm extracting the embedded DLL and then loading the function like this.
Code:
// Function to take resource name and extract it to file location of second parameter
ExtractResourceToFile( "D3DWRAP.embed", "D3DWrapper.dll" );
[System.Runtime.InteropServices.DllImport("D3DWrapper.dll")]
private static extern void createoverlay();
I would much prefer to do this..
Code:
[System.Runtime.InteropServices.DllImport("D3DWRAP.embed")]
private static extern void createoverlay();
So is it possible to load the DLL function directly from the embedded resource or do I need to extract it first?