SupWang
asked on
Install the OCX
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 https://www.experts-exchange.com/topics/comp/lang/delphi/Q.10094009
regards,
SupWang
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 https://www.experts-exchange.com/topics/comp/lang/delphi/Q.10094009
regards,
SupWang
ASKER
hi, kamall
Thank for you help. But I don't want to break the install to two parts.
thanks,
SupWang
Thank for you help. But I don't want to break the install to two parts.
thanks,
SupWang
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\Regsvr3 2.dll C:\Windows\System\MsComm32 .ocx"
I hope this helps.
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
(From VB code)
Shell "C:\Windows\System\Regsvr3
I hope this helps.
ASKER
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?
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?
I think that The setup Wizard solve your question
ASKER
I use the delphi to write program not vb.
ASKER
Read https://www.experts-exchange.com/topics/comp/lang/delphi/Q.10094009 can get more details.
thanks,
SupWang
thanks,
SupWang
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
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
ASKER
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.
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
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
ASKER
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.
ASKER
Sorry send the same comment again.
RegSvr32.exe and the .OCX both in the same directory for it to work.
thanks
RegSvr32.exe and the .OCX both in the same directory for it to work.
thanks
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
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
ASKER
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
Thank you every one.
Thank you very much.
SupWang
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.