No, I was not talking about a 64 bit ocx. For example, the GDPicturePro 5.x OCX is a 32 bit ocx used for com communications from visual basic 6 and accessible from Xbase++ via activeX. Use it for TIF file display in a document viewer.
It is installed on WinXP machines in the folder c:\windows\system32. Try to to than in C:\windows\system32 on a Windows 7 machine and OCX will not register (even as an administrator). Copy the file to c:\windows\syswow64 and the OCX can be registered using the exact same command.
I did a install of the entire GDPicturePro5 software library tool on a windows 7 machine and indeed that is where it was installed. Our procedures tried to use the same location as for winXP machines and it did not work. Needed to be in syswow64.
Cliff
How to installl on the ActiveX computer?
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: How to installl on the ActiveX computer?
I tried to establish ActiveX RMChart.ocx programmatically that it was more convenient to the user.
Team: RunShell("","c:\Windows\System32\regsvr32.exe RMChart.ocx",.F.)
gives an error of execution, and
team: Run("c:\Windows\System32\regsvr32.exe RMChart.ocx")
comes to the end normally and the message on a successful conclusion of operation is issued too, but at execution the window with the black background, similar to a dos-window opens.
How to execute this team by means of RunShell?
Team: RunShell("","c:\Windows\System32\regsvr32.exe RMChart.ocx",.F.)
gives an error of execution, and
team: Run("c:\Windows\System32\regsvr32.exe RMChart.ocx")
comes to the end normally and the message on a successful conclusion of operation is issued too, but at execution the window with the black background, similar to a dos-window opens.
How to execute this team by means of RunShell?
Last edited by Eugene Lutsenko on Sat Mar 16, 2013 8:57 pm, edited 1 time in total.
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: How to installl on the ActiveX computer?
You can use this code, f.e.
Code: Select all
if !RegisterServer(".\Codejock.Controls.v13.0.0.ocx", .T.,5000)
DC_WinAlert(" Codejock.Controls.v13.0.0.ocx registration error !")
return NIL
else
DC_WinAlert("Codejock.Controls.v13.0.0.ocx registration ok !")
endif
Code: Select all
#define WAIT_ABANDONED 0x80
#define WAIT_FAILED 0xFFFFFFFF
#define WAIT_OBJECT_0 0x0
#define WAIT_TIMEOUT 0x102
#define INFINITE 0xFFFF
DLLFUNCTION LoadLibraryA(cFileName) USING STDCALL from kernel32.dll
DLLFUNCTION FreeLibrary(hModule) USING STDCALL from kernel32.dll
DLLFUNCTION GetProcAddress(hModule, ProcedureName) USING STDCALL from kernel32.dll
DLLFUNCTION CreateThread(ThreadAttributes, nStackSize, nStartAddress, nParameter, nCreationFlags, nThreadID) USING STDCALL from kernel32.dll
DLLFUNCTION GetExitCodeThread(hThread, @nExitCode) USING STDCALL from kernel32.dll
DLLFUNCTION WaitForSingleObject(hObject, nTimeOut) USING STDCALL from kernel32.dll
DLLFUNCTION CloseHandle(hObject) USING STDCALL from kernel32.dll
function RegisterServer(cPathToFile, lRegister, nTimeOut)
local hModule, lProcAddress, hThread
local nThreadID, lResult, nExitCode := 0, lRet := .f.
if valtype(lRegister) # "L"
lRegister := .t.
endif
if valtype(nTimeOut) # "N"
nTimeOut := 5000
endif
hModule := LoadLibraryA(cPathToFile)
If hModule == 0
return .f.
Endif
lProcAddress := GetProcAddress(hModule, IIf(lRegister, "DllRegisterServer", "DllUnregisterServer"))
If lProcAddress == 0
FreeLibrary(hModule)
return .f.
Endif
hThread := CreateThread(NIL, 0, lProcAddress, 0, 0, nThreadID)
If hThread == 0
FreeLibrary(hModule)
return .f.
Endif
lResult := WaitForSingleObject(hThread, nTimeOut)
If lResult = WAIT_OBJECT_0
GetExitCodeThread(hThread, @nExitCode)
If nExitCode == 0
lRet := .t.
EndIf
EndIf
CloseHandle(hThread)
FreeLibrary(hModule)
return lRet
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: How to installl on the ActiveX computer?
In attempt to load ActiveX into Windows 7 there is a mistake:
http://disk.yandex.ru/public/?hash=mMHc ... VkzsgSo%3D
What to do?
http://disk.yandex.ru/public/?hash=mMHc ... VkzsgSo%3D
What to do?
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: How to installl on the ActiveX computer?
Try to run cmd as Administrator.
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: How to installl on the ActiveX computer?
Yes, thank you very much! When the error message should be in the window: <Control Panel - User Accounts and Family Safety - User Accounts - Change User Account Control Settings> move the slider all the way down to "Never notify ..." and reboot
Re: How to installl on the ActiveX computer?
There is program called MoleBox Virtualization Solution. It works well. Combine all your DLLs/OCX etc into a single executable file. So you distribute just one file and your Data folder. Check www.molebox.com. It registers ACTIVEX components AUTOMATICALLY without changing the setting of the target machine - VIRTUALIZATION.
Joe.
Joe.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: How to installl on the ActiveX computer?
Thank you! It looks like this is what I need and that improves Alaska. I will surely try!