Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with ActiveX DLL as it won't initiate on other Machines

Status
Not open for further replies.

Rock6431

Programmer
Mar 23, 2002
56
US
I created an ActiveX DLL using Visual Studio 6 and the dll will work on machines where VS6 is installed.
It will not however, work on machines where VS6 is not installed.

I saved the project as a vbp and then used the <File> <Save As DLL> to create the dll. I copied the dll file along with with the exp and lib files to the test machine's system32 folder (WinNT) which is where they are in working condition on my machine. I also verified that the other object/referenced ocx and tlb files that are in my system32 folder that the dll references are on the test machine.

Both my computer and the test computer are running the exact same images with the exception that my machine has VS6 Professional Edition on it.

Any clue as to what else is required to get my ActiveX Dll to work on these other machines. I know that this may not be much to work with but I don't know what else I need to supply in this message.

Thank you in advance for any help. :)

Mike

 
Mike,

You have to register the DLL on the new machine. Open a DOS window, change directory to where the DLL is and type in the following command:

regsvr32 dllname.dll

You should get a message that says the DLL register server succeeded. Then try to run your application.

You don't need the exp and lib files on the new machine. They are only used during the build of the DLL.

Here's a handy little script that I like to use for registring and unregistering DLL's. Save the following statements to a file called dllocx.reg. Then from windows explorer, double click on the file. Let it enter the contents into the registry. Then navigate to your DLL, right click on it, then select Register or UnRegister. Works for ActiveX DLL's and OCX's.

Code:
REGEDIT4

; ActiveX DLLs

[HKEY_CLASSES_ROOT\.dll]
@=&quot;dllfile&quot;

[HKEY_CLASSES_ROOT\dllfile\shell\regdll]
@=&quot;Register ActiveX DLL&quot;

[HKEY_CLASSES_ROOT\dllfile\shell\regdll\command]
@=&quot;regsvr32.exe \&quot;%L\&quot;&quot;

[HKEY_CLASSES_ROOT\dllfile\shell\unregdll]
@=&quot;Unregister ActiveX DLL&quot;

[HKEY_CLASSES_ROOT\dllfile\shell\unregdll\command]
@=&quot;regsvr32.exe /u \&quot;%L\&quot;&quot;

; ActiveX Controls

[HKEY_CLASSES_ROOT\.ocx]
@=&quot;ocxfile&quot;

[HKEY_CLASSES_ROOT\ocxfile\shell\regocx]
@=&quot;Register OCX Control&quot;

[HKEY_CLASSES_ROOT\ocxfile\shell\regocx\command]
@=&quot;regsvr32.exe \&quot;%L\&quot;&quot;

[HKEY_CLASSES_ROOT\ocxfile\shell\unregocx]
@=&quot;Unregister OCX Control&quot;

[HKEY_CLASSES_ROOT\ocxfile\shell\unregocx\command]
@=&quot;regsvr32.exe /u \&quot;%L\&quot;&quot;

; ActiveX EXEs

[HKEY_CLASSES_ROOT\.exe]
@=&quot;exefile&quot;

[HKEY_CLASSES_ROOT\exefile\shell\regexe]
@=&quot;Register ActiveX EXE&quot;

[HKEY_CLASSES_ROOT\exefile\shell\regexe\command]
@=&quot;\&quot;%L\&quot; /regserver&quot;

[HKEY_CLASSES_ROOT\exefile\shell\unregexe]
@=&quot;Unregister Active EXE&quot;

[HKEY_CLASSES_ROOT\exefile\shell\unregexe\command]
@=&quot;\&quot;%L\&quot; /unregserver&quot;
Snaggs
tribesaddict@swbell.net
Life can only be understood backwards; but it must be lived forwards.
 
Check for the version of mdac on client machine,Install mdac and register our components using vb setup kit to include all runtime references. Srinivasa Raghavan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top