473,402 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Dynamically load assembly

Dear Sirs,
If I dynamically load assembly into the memory by Load(byte[]) how long do I
have to preserve the array valid? Can it be destructed just after the load
call?
Thanks in advance,
Boni
Nov 17 '05 #1
3 1639
Boni,
If I dynamically load assembly into the memory by Load(byte[]) how long do
I have to preserve the array valid? Can it be destructed just after the
load call?


You're in a GC world, meaning it's not your problem anymore :)

That said, I'd probably just leave it alone :)
--
Tomas Restrepo
to****@mvps.org
Nov 17 '05 #2
Hi,
thanks you Tomas.
But I meant with this question, what will be if the variable will go out of
scope?
I have a error, that if I load regestered assembly dynamically from an array
and then use XML Serilaization it throws the exception, where if I use
LoadFrom it is not. So my thougth is, that it need assembly, where the
buffer is allready destructed.

"Tomas Restrepo (MVP)" <to****@mvps.org> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP14.phx.gbl...
Boni,
If I dynamically load assembly into the memory by Load(byte[]) how long
do I have to preserve the array valid? Can it be destructed just after
the load call?


You're in a GC world, meaning it's not your problem anymore :)

That said, I'd probably just leave it alone :)
--
Tomas Restrepo
to****@mvps.org

Nov 17 '05 #3
Hi Boni,
Hi,
thanks you Tomas.
But I meant with this question, what will be if the variable will go out
of scope?
Again, not your problem. As long as there's a reference out there pointing
to the memory, it won't be GCd. I doubt this is your problem.
I have a error, that if I load regestered assembly dynamically from an
array and then use XML Serilaization it throws the exception, where if I
use LoadFrom it is not.


What exception are you getting? The problem might very well have to do with
the fact that Load and LoadFrom use different load contexts, for example, or
due to the fact you're not passing any explicit evidence, or a whole other
set of things...
--
Tomas Restrepo
to****@mvps.org
http://www.winterdom.com/
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: M. Fitzgerald | last post by:
Our migration from ASP to ASP.NET will be a slow one. In themeantime, I have constructed a .NET assembly and registered itas a COM object for use in out classic ASP pages. One of thethings this...
3
by: Tim Mavers | last post by:
I have created a DLL (class library) in .NET that I need to dynamically load from my ASP.NET application. I am trying to use Assembly.Load(...) to load the file, which is in the /bin directory...
0
by: Tom | last post by:
Thanks Chris : However, during run time, it show error message "File / component cannot find " during run in Dim asm As =...
2
by: Tom | last post by:
Thanks Chris : However, during run time, it show error message "File / component cannot find " during run in Dim asm As =...
6
by: Dan Dorey | last post by:
I actually have two questions here, but I'll start by giving an outline of what I'm trying to do. I'm building an app with a simple plugin architecture (all in the same app domain). I have each...
1
by: chandu | last post by:
hello , i want to load and execute an existing dll in a applicaiton dynamically with out giving references etc... need to create separate appdomain or in same appdomain can i load and execute...
2
by: Smithers | last post by:
Using 3.5, I am stuck in attempting to: 1. Dynamically load an assembly 2. Instantiate a class from that assembly (the client code is in a different namespace than the namespace of the...
2
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application =...
1
by: Jordan S. | last post by:
I plan to load an assembly during application startup, and load that assembly via reflection (i.e., it isn't referenced in the application's assembly manifest). The assembly will be loaded into the...
7
by: chage | last post by:
Hi, I have been searching around to try adding reference assembly to another assembly during runtime, programatically. Is this possible in .Net? The reason for this is because i am having...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.