accessibility.dll and others - load wrong time!

Drstein99

Junior Contributor
Joined
Sep 26, 2003
Messages
283
Location
Audubon, Nj
I write an application that runs on old win-98 pc's. For some unusual reason, it seems to load .dll's when it NEEDS them, instead of all at once when the program is loaded for the first time. I want them to load on program startup, like the splash screen into the global-assembly cache.

This is a problem when users try to navigate the application (with customers on the PHONE) and the application HESITATES while the computer loads the .dll and then continues. I believe it is causing problems as my timers and triggering threading events become out-of-synch, due to this inappropriate first-time hesitation.

I notice that "ACCESSIBILITY.DLL" seems to want to load when it feels like it. I add it into the program "IMPORTS" under the property-pages for the project, I also add that in the first lines of code in the class; and doesnt seem to make a difference.

Does anyone else have this problem, or undestand the issue? Its been troubleing me for quite some time, and was wondering if there is a corrective procedure, work-around, or possibly something I am doing wrong.
 
I believe that MS designed .NET (and all Windows apps that use DLLs) to work as you describe. There is no "automatic" loading of DLLs because they're referenced, there is an explicit Windows call to load a DLL. That call is usually made for you in .NET whenever you use something contained in that DLL.

If you want all the DLLs to load when the app starts up, you'll have to have some code to create or reference something in that DLL. You could probably have a static class with a static method Load() to do this.

-ner
 
Nerseus said:
If you want all the DLLs to load when the app starts up, you'll have to have some code to create or reference something in that DLL. You could probably have a static class with a static method Load() to do this.

-ner

I understand. Thanks.
 
Back
Top