Solved

Unregistered ActiveX DLL

Posted on 2000-04-07
16
1,085 Views
Last Modified: 2008-03-03
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
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
16 Comments
 

Expert Comment

by:abautistat
ID: 2692503
Instead create an ActiveX dll, you can try to create an ActiveX exe, and simplely run it
0
 
LVL 143

Author Comment

by:Guy Hengel [angelIII / a3]
ID: 2692537
Creating ActiveX Exe is unfortunately not an alternative, but txs for the comment
0
 
LVL 4

Accepted Solution

by:
CoolAss earned 100 total points
ID: 2692556
In short, no. You can't use ActiveX dlls (COM) if it's no registered because of the way COM works.

COM ensure that the component can be used by any language (that supports COM of course) and therefor requires certain information about the interface to your dll, in other words... it requires pointers to the function positions in your dll.

The only way to get these to other applications is via registering it. This is also a security measure.

You can, however, write your DLL without the use of ActiveX... simply write it as a standard library as you would any other non-activeX dll. These don't require registration, and placing them in the App.Path works fine.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 143

Author Comment

by:Guy Hengel [angelIII / a3]
ID: 2692564

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 ?
0
 
LVL 4

Expert Comment

by:CoolAss
ID: 2692576
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?
0
 
LVL 143

Author Comment

by:Guy Hengel [angelIII / a3]
ID: 2692590
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...
0
 
LVL 2

Expert Comment

by:bhamilto
ID: 2692592
just monitoring
0
 
LVL 4

Expert Comment

by:CoolAss
ID: 2692606
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.
0
 
LVL 6

Expert Comment

by:VBGuru
ID: 2692720
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!
0
 
LVL 143

Author Comment

by:Guy Hengel [angelIII / a3]
ID: 2692776
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)
0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 2692825
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)

0
 
LVL 143

Author Comment

by:Guy Hengel [angelIII / a3]
ID: 2699184
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?
0
 
LVL 143

Author Comment

by:Guy Hengel [angelIII / a3]
ID: 2716287
VBGuru: I have to look deeper into your project, as it seems very interesting

Any other suggestions ?
0
 
LVL 143

Author Comment

by:Guy Hengel [angelIII / a3]
ID: 2761940
Don't worry, im still here.
0
 
LVL 143

Author Comment

by:Guy Hengel [angelIII / a3]
ID: 2787253
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


0
 
LVL 4

Expert Comment

by:CoolAss
ID: 2787299
Thanks... I do my best. :-)
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question