Solved

Install the OCX

Posted on 1998-11-06
16
656 Views
Last Modified: 2013-11-14
hi, all
Isn't there a help-file or document describing how to install the ocxs on another pc? I want to install the MsComm32.ocx. You can get the more details in http://www.experts-exchange.com/topics/comp/lang/delphi/Q.10094009

regards,
SupWang
0
Comment
Question by:SupWang
16 Comments
 
LVL 7

Expert Comment

by:kamall
ID: 1443682
You can just include the control in your project and use the VB setup wizard to make a setup program for you. This will appropriately install the control on the other PC.

In your other question, you are referring to Delphi not VB. However, you can just make an empty project in VB and include the control in it, make a setup program, and then run this setup on the other computer to install the control.

Hope that helps.
0
 
LVL 2

Author Comment

by:SupWang
ID: 1443683
hi, kamall
Thank for you help. But I don't want to break the install to two parts.

thanks,
SupWang
0
 
LVL 3

Expert Comment

by:vbWhiz
ID: 1443684
There is a little file that is installed with VB called RegSvr32.exe. This exe can be used to register dll's/ocx's.

You can use regsvr from VB using the shell command or on the Start/Run window. To register a dll/ocx you just start regsrv with the path to the dll/ocx

Example:
(From the start/run)
C:\Windows\System\RegSvr32.exe C:\Windows\System\MsComm32.ocx

(From VB code)
Shell "C:\Windows\System\Regsvr32.dll C:\Windows\System\MsComm32.ocx"

I hope this helps.
0
 
LVL 2

Author Comment

by:SupWang
ID: 1443685
hi, vbWhiz  
 
Only use the "register MsComm32.ocx" can not register the OCX.
I used the MS Visual Basic 5 to make a empty project, include the
MSCOMM32.OCX in it, make a setup program, So I can install the OCX to other computer. But I don't want to break the install to two parts. So I still want to use the regsvr32.exe. In the VB setup disk, have the following files: MSVBVM50.dl_, OleAut32.dl_, OlePro32.dl1, Setup.exe, Setup.lst, setup1.ex_, St5unst.ex_, StdOle2.tl_, VB5CHS.dl_, VB5StKit.dl_, AsycFilt.dl_, ComCat.dl_, Ctl3d32.dl_, Mscomm32.oc_, OlePro32.dl2, tesinst.EX_. I had tying to use the regsvr32.exe to register the VB5CHS.DLL, MSCOMCHS.DLL, COMCAT.DLL, ASYCFILT.DLL, OLEAUT32.DLL. But they all return: xxx.dll was loaded, but the DllRegisterServer entry point was found. DllRegisterServer may not be exported, or a corrupt version of xxx.dll may be in memory. Consider using pview to detect and remove it. use the regsvr32.exe to register the MSCOMM32.OCX and MSVBVM50.DLL, they return : LoadLibray("xxxx")failed. GetlastError returns 0x0000001f. Only the OLEPRO32.DLL can be success register. What's the matter with the regsvr32.exe?

0
 
LVL 2

Expert Comment

by:majed100598
ID: 1443686
I think that The setup Wizard solve your question
0
 
LVL 2

Author Comment

by:SupWang
ID: 1443687
I use the delphi to write program not vb.
0
 
LVL 2

Author Comment

by:SupWang
ID: 1443688
Read http://www.experts-exchange.com/topics/comp/lang/delphi/Q.10094009 can get more details.

thanks,
SupWang
0
 
LVL 3

Expert Comment

by:kfrick
ID: 1443689
SW...

I have to agree with kamall's original answer. I write and distribute programs containing the MSComm32.ocx on a regular basis, and the Setup Wizard always includes the file for me. There is no need to break the install up into two steps.

There is a section of the Setup Wizard that verifies that no dependancies exist for several .OCX's....that is where the MSComm32.OCX first shows up. It is also listed in the files that are to be distributed just befor the setup files are created.

Why not try the Setup Wiz again.......?

-kf

0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 2

Author Comment

by:SupWang
ID: 1443690
I don't want to use InstallShield for Delphi3 to make a setupdisk for the delphi program, and use the VB Setup Wiz to make an another disk for the OCX.
0
 
LVL 3

Expert Comment

by:kfrick
ID: 1443691
Oh, I see now.....

A tip on RegSvr32...I am pretty sure that RegSvr32.exe and the .OCX must both be in the same directory for it to work....if that helps!

Good luck!
-kf

0
 
LVL 2

Author Comment

by:SupWang
ID: 1443692
I don't want to use InstallShield for Delphi3 to make a setupdisk for the delphi program, and use the VB Setup Wiz to make an another disk for the OCX.
0
 
LVL 2

Author Comment

by:SupWang
ID: 1443693
Sorry send the same comment again.
RegSvr32.exe and the .OCX both in the same directory for it to work.
thanks


0
 

Expert Comment

by:cmihalache
ID: 1443694
if you want to register an ocx from the program here is a C example of how to do that:

HINSTANCE hLib = LoadLibrary(pszDllName);
if (hLib < (HINSTANCE)HINSTANCE_ERROR)
{
 // error: unable to load DLL
 // maybe your pszDllName is not the correct path to the OCX file
 iReturn = FAIL_LOAD;
}

// Find the "DllRegisterServer" entry point.
// Call this function to register your OCX.
(FARPROC&)lpDllEntryPoint = GetProcAddress(hLib, "DllRegisterServer");
if (lpDllEntryPoint != NULL)
 (*lpDllEntryPoint)();
else
 // error: unable to locate entry point
0
 
LVL 2

Author Comment

by:SupWang
ID: 1443695
hi, cmihalache

Thank for your help. But I don't know the C language, and I think maybe need to registering some DLLs before register the OCX. I use the InstallShield express for Delphi4 to make the setupdisk Now, The InstallShield for Delphi4 have the ability of registering OCX/ActiveX during installation procedure. In the InstallShield express, I set the following files copy to the \system directory: VB5CHS.DLL, MSVBVM50.DLL, STDOLE2.TLB, OLEAUT32.DLL, OLEPRO32.DLL, ASYCFILE.DLL, COMMCAT.DLL, MSCOMM32.OCX, MSCOMCHS.DLL (This file was found in the above test setupdisk). And set the MSVBVM50.DLL, STDOLE2.TLB, OLEPRO32.DLL, COMCAT.DLL, MSCOMM32.OCX can be self-register. But during
installation procedure, Only the OLEPRO32.DLL can be success register.
Have somebody familiar with the InstallShield professional/express version?
Could you make some test for me?
I use a lot of time on the problem. Help, Help, Help.

Thanks,
SupWang

0
 
LVL 4

Accepted Solution

by:
dwwang earned 100 total points
ID: 1443696
Good luck for all the time :)
0
 
LVL 2

Author Comment

by:SupWang
ID: 1443697
The problem was solved. Read my question history "use the MsComm32.ocx" can get more detail.

Thank you every one.
Thank you very much.

SupWang

0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now