Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / October 2006

Tip: Looking for answers? Try searching our database.

Have a way to load assembly from Memory instead from DLL?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mtczx232@yahoo.com - 21 Apr 2006 13:51 GMT
I have some idea to hide my Assemblies (DLL) in Data file. and when i
need
them, I read it into Memory. my q is, if have a way to load Assembly
from
memory?
Mattias Sjögren - 21 Apr 2006 19:21 GMT
>my q is, if have a way to load Assembly from memory?

Yes, there's the Assembly.Load(byte[]) method.

Mattias

Signature

Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

mtczx232@yahoo.com - 22 Apr 2006 19:58 GMT
this method on MSDN:

rawAssembly
An array of type byte that is a COFF-based image containing an emitted
assembly.

what is COFF-based image ? and how to use with it?
Daniel O'Connell [C# MVP] - 23 Apr 2006 00:12 GMT
> this method on MSDN:
>
[quoted text clipped - 3 lines]
>
> what is COFF-based image ? and how to use with it?

COFF based images is the format windows executables, including DLLs are in.
You should be able to just read the dll into memory and pass the byte array.
mtczx232@yahoo.com - 23 Apr 2006 07:43 GMT
thank you Daniel O'Connell.

I wonder if have some Books that Explain with detail All .NET Framework
library?
the MSDN is definitely not enough resource.
codeartist - 09 Oct 2006 20:00 GMT
Daniel,

I tried to load an assembly from a byte array stored in a DB using Assembly.
Load(myfile()) and I got a BadImageFormatException
I think a regular byte array can not be used, it should be converted to some
other format

>> this method on MSDN:
>>
[quoted text clipped - 4 lines]
>COFF based images is the format windows executables, including DLLs are in.
>You should be able to just read the dll into memory and pass the byte array.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.