c# - Using the methods of a compressed .Net DLL without extract it to hard disk -
step 1: want compress of .net dll
files (some built class libraries) zip
or 7z
, protect theme password, can manually utilities windows 7z application.
the project files before applying scenario:
app.exe
a.dll
b.dll
the final files after applying first step of scenario:
app.exe
x.zip
(password protected & compressed archive file)
and x.zip
contain a.dll
& b.dll
step 2: now, want know there way extract a.dll
& b.dll
directly ram (not hdd) , use methods app.exe
???
i want keep these dll
files secure during scenario , prevent copy theme hdd users, want use functionalists after loading theme ram.
edit:
i usualy use these technologies: c#
, wpf
, .net 4.5
i think can use appdomain.assemblyresolve event.
when assemblies requested, extract them zip in memory byte array. use assembly.load(byte[]) overload load assembly in-memory byte array, , return assembly.
see https://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve%28v=vs.110%29.aspx , https://msdn.microsoft.com/en-us/library/h538bck7(v=vs.110).aspx
Comments
Post a Comment