Guy Hengel [angelIII / a3]
asked on
Unregistered ActiveX DLL
I'm using VB6, and created an ActiveX dll with one public class.
I would like to create in my application an object of this class, without the ActiveX beeing registered, but i know the dll can be found in the App.Path. (CreateObject does not seem to work).
I know i could register the file by code using shell("regsvr32..."), but is there an another trick to get this done?
Greetings
I would like to create in my application an object of this class, without the ActiveX beeing registered, but i know the dll can be found in the App.Path. (CreateObject does not seem to work).
I know i could register the file by code using shell("regsvr32..."), but is there an another trick to get this done?
Greetings
Instead create an ActiveX dll, you can try to create an ActiveX exe, and simplely run it
ASKER
Creating ActiveX Exe is unfortunately not an alternative, but txs for the comment
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Is then there a way to create a dll with VB6 that is not ActiveX, or even to transform an ActiveX DLL into standard dll ?
Actually... good question! I don't know!
I always use VC to create DLLs... I only use VB for ASP/COM stuff and simple programs that don't require DLLs.
What exactly are you trying to do?
I always use VC to create DLLs... I only use VB for ASP/COM stuff and simple programs that don't require DLLs.
What exactly are you trying to do?
ASKER
I try to build something that is able to view and use (for testing and administrative uses) Dll's, without needing to register them, as this fill's up the registry, and it may disturb other software...
just monitoring
Hrm.... interesting project, but alas I think you're out of luck as far as VB goes.
Registering DLLs won't conflict with other DLLs as every DLL gets a unique ID based on things like system time and CPU context switching stats... so you should't worry about that.
Also, 1 line in a 25,000 line registry isn't gonna make much of a diff. :-) Even 1000 lines won't matter. :-) hehe
Good luck... sorry.
Registering DLLs won't conflict with other DLLs as every DLL gets a unique ID based on things like system time and CPU context switching stats... so you should't worry about that.
Also, 1 line in a 25,000 line registry isn't gonna make much of a diff. :-) Even 1000 lines won't matter. :-) hehe
Good luck... sorry.
check out the API call RegisterTypeLib which is actually used inside regsvr32 to register the activex components.
If you don't want to register but want to see the contents like interfaces, methods like that, then you can check out the examples out here.
http://www.vbcity.com/download/TIBrowse.zip
http://www.domaindlx.com/e_morcillo/download.asp?type=typelibs&file=tl_typei
Hope it helps!
If you don't want to register but want to see the contents like interfaces, methods like that, then you can check out the examples out here.
http://www.vbcity.com/download/TIBrowse.zip
http://www.domaindlx.com/e_morcillo/download.asp?type=typelibs&file=tl_typei
Hope it helps!
ASKER
VBGuru:
actually, i knew the tool TIBrowse (from one of your previous comment), but i seems it cannot show me the classes and property of the classes in VB ActiveX dll's, or in fact only the hidden interfaces, but no properties.
The second link unfortunately was not valid (at least i wasn't able to get something out of there)
actually, i knew the tool TIBrowse (from one of your previous comment), but i seems it cannot show me the classes and property of the classes in VB ActiveX dll's, or in fact only the hidden interfaces, but no properties.
The second link unfortunately was not valid (at least i wasn't able to get something out of there)
There are two ways to use a DLL that is not registered:
1. Write your DLl in C/C++
2. Use a third party tool like Desaware has to export your ActiveX DLL functions and properties so the DLL can be used as a 'normal' DLL
By the way CreateObject goes via COM, so it only works for registered ActiveX DLL's
Do not be afraid to overfill the registry, it is there for among others these purposes. Interfering with other APPs will not happen (COM ensures this)
1. Write your DLl in C/C++
2. Use a third party tool like Desaware has to export your ActiveX DLL functions and properties so the DLL can be used as a 'normal' DLL
By the way CreateObject goes via COM, so it only works for registered ActiveX DLL's
Do not be afraid to overfill the registry, it is there for among others these purposes. Interfering with other APPs will not happen (COM ensures this)
ASKER
Unfortunately, the third party tool of Desaware is not free.
Registering the control may not work (user MAY not have permissions to do so)
VBGuru: any news from you?
Registering the control may not work (user MAY not have permissions to do so)
VBGuru: any news from you?
ASKER
VBGuru: I have to look deeper into your project, as it seems very interesting
Any other suggestions ?
Any other suggestions ?
ASKER
Don't worry, im still here.
ASKER
Ok, no further comments seem to come, so i will accept CoolAss's comments.
VBGuru: Don't mind, if i will use your suggestion in the future, i will come back to you.
corvanderlinden: Your comments are OK, but no solution to my problem unfortunately.
Thanks for your investigations
VBGuru: Don't mind, if i will use your suggestion in the future, i will come back to you.
corvanderlinden: Your comments are OK, but no solution to my problem unfortunately.
Thanks for your investigations
Thanks... I do my best. :-)