Click here to Skip to main content
15,444,721 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
We have a product that is partly written in VB6. It is built up of
many dlls that are activeX dlls. I'm trying to reduce our dependence on
registered COM objects. Since all the components are used inprocess
there is no need for items to be registered and during run-time, using
reg free com I can deploy everything without registering it.

Problem is I can't find a way to build the VB6 Code without it
automatically registering the activeX dlls during the build. Anyone
know if it is possible to build but not regisiter a VB6 ActiveX dll?
Updated 3-Mar-11 4:39am
CPallini 3-Mar-11 7:55am     CRLF
"Problem is I can't find a way to build the VB6 Code without it automatically registering the activeX dlls during the build" That means the DLLs are registered only on the development machine or am I wrong?
ARopo 3-Mar-11 8:09am    
This is correct only on the development machine. Problem we have with this is that we may be working on more than one version at a time so building updates the registry to the last version built.
R. Giskard Reventlov 3-Mar-11 10:48am    
It's been many, many years but I'm sure there was a command line switch that handled that. Probably wrong but might be worth a look.

There is no way to prevent this. VB6 will register the controls on every time they are built. You cannot stop it from doing so.
Share this answer
Write a batch file to do your building, including unregistering the DLL afterwards, we use:

subst Z: .
vb6 /make %ProjectFile% /out "%LogSuccess%\%PROJECTNAME%_Log.txt" /outdir Z:\bin
IF ERRORLEVEL 1 MOVE "%LogSuccess%\%PROJECTNAME%_Log.txt" "%LogFail%"
regsvr32 /u Z:\bin\Constants.dll
subst Z: /D
Share this answer
ARopo 3-Aug-11 4:51am    
That is pretty much what we do
Short answer: ActiveX sucks! VB6 too.

I bet you cannot do anything about it. If you finally trash VB6, you may have a chance to get away from ActiveX, at least in many cases.

Share this answer
CPallini 3-Mar-11 13:25pm    
You're wrong ActiveX (and COM) doesn't suck (just a personal point of view, of course).
Sergey Alexandrovich Kryukov 3-Mar-11 13:32pm     CRLF
Yes, of course, this is my personal view, too, let's take if for granted. However, I can compare with better things and used to point out some real fallacies. Such negative point of view is vulnerable by definition, because my argument would be like "it would be much better if" and you would ask "and where is you if..?" and you would be right, as you would not easily prof my next step. Now you can compare with .NET. I can only say that I have a long experience "skipping" technologies that I did not like; and my decision was justified years after. --SA
Sergey Alexandrovich Kryukov 3-Mar-11 13:33pm     CRLF
Also, don't mix up COM and ActiveX. My statement as about ActiveX. COM (kernel) part suck much less! --SA
CPallini 3-Mar-11 13:39pm    
I haven't. They (MS) did. :-D
Sergey Alexandrovich Kryukov 3-Mar-11 14:40pm     CRLF
Appreciate it :-) I mean, you can use COM subset without ActiveX. --SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900