By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,680 Members | 1,666 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,680 IT Pros & Developers. It's quick & easy.

adding a COM dll as reference during runtime

P: 5
hi

i have a COM dll and i want to access the methods in the dll through my program. but i need to add that dll as reference during runtime and not the way references are generally added (project-->add reference-->COM and all that)

can anybody help me out with this plz

thanx
krish
Jul 3 '07 #1
Share this Question
Share on Google+
4 Replies


dip_developer
Expert 100+
P: 648
hi

i have a COM dll and i want to access the methods in the dll through my program. but i need to add that dll as reference during runtime and not the way references are generally added (project-->add reference-->COM and all that)

can anybody help me out with this plz

thanx
krish
What is your purpose of adding a dll in runtime???
Jul 3 '07 #2

P: 5
What is your purpose of adding a dll in runtime???

actually i need to do so because i have a couple of components in more than 1 dll and according to some condition i need to access them.

i'll give u the scenario

switch(some condition)
{
case 1:
// access method from dll1.dll
case 2:
//access method from dll2.dll
case 3:
//access method from dll3.dll
default:
//some default method
}

so according to the condition the appropriate dll would be referenced

plz help me if u can on this matter

thnx and regards

krish
Jul 5 '07 #3

dip_developer
Expert 100+
P: 648
actually i need to do so because i have a couple of components in more than 1 dll and according to some condition i need to access them.

i'll give u the scenario

switch(some condition)
{
case 1:
// access method from dll1.dll
case 2:
//access method from dll2.dll
case 3:
//access method from dll3.dll
default:
//some default method
}

so according to the condition the appropriate dll would be referenced

plz help me if u can on this matter

thnx and regards

krish
ok fine....then why are you trying to Reference the .dll in runtime.....
you have to call the methods of those dlls in runtime......but why referencing them in runtime????......

add the reference of those dll s while designing your project.....as simple as that....
Jul 5 '07 #4

P: 5
ok fine....then why are you trying to Reference the .dll in runtime.....
you have to call the methods of those dlls in runtime......but why referencing them in runtime????......

add the reference of those dll s while designing your project.....as simple as that....

thanx a lot for taking intrest

wat u r saying is absolutely correct but i dont want it that way. i already mentioned it thati want to reference the dlls at runtime and not prior to that.

actually they r needed to add at runtime because lets say that the dlls are only available during the runtime.

i just need to know that whether it is possible or not and if yes then how to do it.

plz let me know if u can help

thanks and regards

krish
Jul 5 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.