|
-
Feb 6th, 2003, 11:36 AM
#1
Thread Starter
Lively Member
How do I manually load libraries?
I'm loading dlls using System.Reflection.Assembly.LoadFrom() for getting instances using System.Type.GetInterface() and System.Activator.CreateInstance().
The thing is:
What if that dll references to other dlls? How should I load those dlls into memory? Using System.Reflection.Assembly.LoadFrom() or REGSVR32.EXE? Is there any way to tell Windows that I have a folder where he should find the required dlls?
Note that that folder is not and cannot be the system folder or the folder of the executable of the running application, i.e., I want to specify the path.
Thanks!
-
Feb 6th, 2003, 12:30 PM
#2
that is the job of that dll.
-
Feb 6th, 2003, 12:35 PM
#3
Thread Starter
Lively Member
Humm... So I just need to call something like System.Reflection.Assembly.Load() before using an external method?
But, if I'm a good boy and I want to help that assembly with its resources, can I load them for it before I even call it?
-
Feb 6th, 2003, 01:10 PM
#4
Humm... So I just need to call something like System.Reflection.Assembly.Load() before using an external method?
You load the dll YOU need. That dll loads what it needs.
But, if I'm a good boy and I want to help that assembly with its resources, can I load them for it before I even call it?
But there is no reason to do that. Why make a dll that forces the app calling it to load up what it needs? That is just plain pointless and you are just making it more difficult to use than need be and provides 0 benefits and more work.
-
Feb 6th, 2003, 01:22 PM
#5
Thread Starter
Lively Member
OK. I'll detail my situation:
I'm loading assemblies dynamically, as I said. Each of those assemblies is at a particular path with needed satellite assemblies.
The problem is that the assemblies are not aware of that path and that path is not the same of the running application. Is it sufficient having satellite assemblies on the same path, or do I have to tell windows to go search there for assemblies?
-
Feb 6th, 2003, 01:24 PM
#6
I think what you need is the GAC(Global Assembly Cache). It is sort of like registering. I dont have much infop on it as I dont use it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|