473,750 Members | 2,265 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Defer loading DLL?

Is there a way to defer loading of a DLL until it is referenced by a method?
Our product ships optional DLLs and we want to avoid writing wrapper classes
to isolate calls to those DLLs. This is becoming cumbersome as we develop
more licensed components.

Perhaps there is a way to protect this code in some kind of tag?

Thanks,
Prasad
Jan 6 '06 #1
2 1601
It has been my experience that a DLL won't be loaded until something in it
is referenced by a method. If you have conditional code in there that may
or may not make use of a certain object, the DLL for that object will be
loaded regardless, so you need to move that stuff out to its own method if
that's the case.

"Sri Prasad Tadimalla" <pr****@nospam. net> wrote in message
news:eU******** *****@TK2MSFTNG P12.phx.gbl...
Is there a way to defer loading of a DLL until it is referenced by a
method? Our product ships optional DLLs and we want to avoid writing
wrapper classes to isolate calls to those DLLs. This is becoming
cumbersome as we develop more licensed components.

Perhaps there is a way to protect this code in some kind of tag?

Thanks,
Prasad

Jan 6 '06 #2
Additionally, there is no way to unload the assemblies once loaded ....
one way to get around this is to load the assembly in it's own appdomain
and dispose of that domain when you are done with it.
Marina wrote:
It has been my experience that a DLL won't be loaded until something in it
is referenced by a method. If you have conditional code in there that may
or may not make use of a certain object, the DLL for that object will be
loaded regardless, so you need to move that stuff out to its own method if
that's the case.

"Sri Prasad Tadimalla" <pr****@nospam. net> wrote in message
news:eU******** *****@TK2MSFTNG P12.phx.gbl...
Is there a way to defer loading of a DLL until it is referenced by a
method? Our product ships optional DLLs and we want to avoid writing
wrapper classes to isolate calls to those DLLs. This is becoming
cumbersome as we develop more licensed components.

Perhaps there is a way to protect this code in some kind of tag?

Thanks,
Prasad


Jan 6 '06 #3

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

Similar topics

3
8502
by: Roy Wang | last post by:
hi, My problem is how to determining when the XML file has loaded using javascript. I loaded an xml file using javascript in a web page. The code below is loading the xml file for IE: this.xmlDoc= new ActiveXObject("Microsoft.DomDocument"); this.xmlDoc.load(url);
2
2288
by: Jim Adamson | last post by:
Hi I want to defer the call of an external .js file so that when the link in the page is clicked, the .js file is downloaded and included in the page. The link would also pass on some arguments to the function in the page. Once the .js file is successfully downloaded/included, I would then like to pass on the arguments from this function to the function that is within the .js file and call the function that's inside the ..js file from...
1
2604
by: ebrandmark | last post by:
I am trying to load a SCRIPT SRC tag that will result in a document.write into a specific location in my web page but not call for the SCRIPT SRC until the end of the page (so as not to delay the page). The DEFER method won't work because the document.write just starts a new page. I was hoping to leave a DIV where the result should end up. Then at the end of the page create a child of this DIV or another DIV that lays on top of this...
3
6550
by: pantagruel | last post by:
The following does not work in firefox: <script defer="defer"> var x=document.getElementsByName("repositoryNamespace") alert(x.length + " elements!")
5
5210
by: joaopedrogoncalves | last post by:
Hi, I want to load an external javascript file, get its results and stick them inside a <div> block. I also want to do this in several places on a web page. This way the browser doesn't have to wait for the external resource to load to show up the page, thus giving a perceiving faster load time for the user.
5
3351
by: warteschlange | last post by:
i want to postload javscript from another javascript. This works fine in firefox and IE6 for macIE i can use an Iframe to load the code and inject it with insertAdjacentHTML The problems arise with safari and opera. both load the new code with XMLHttpRequest, but the code is no 'executable' To make this possible on IE i had to use the magic 'DEFER' attribute.
10
4882
by: sneill | last post by:
Using XMLHTTP and DOM I'm able to load new HTML page content. I'd now like to load small snippets of javascript with the HTML markup and have that <script> incorporated into the page. If any of the loaded script exists outside a function definition (eg: a call to a function), I'd like that code to be executed as soon as its added to the DOM. Can anyone suggest the best way to do this? I've Googled but not found anything comprehensive....
2
2426
by: John J. Lee | last post by:
I was cheered to see that this guy claims to have solved the problem with onload only firing very late: http://dean.edwards.name/weblog/2005/09/busted/ However, "ash" comments on that page:
2
1889
by: www.gerardvignes.com | last post by:
I am using this to load the client JavaScript for a web application when it is selected by the user) via an Ajax connection to the server. I have found only two ways of loading new JavaScript after the web page is loaded. 1. Create a new script element (where head is the id of the head tag): var s = document.createElement('script'); s.setAttribute('type','text/javascript'); s.setAttribute('src', 'scripts/myscript.js');
0
9000
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9577
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9396
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8260
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6804
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4713
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4887
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2804
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2225
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.