I have one 64 bit applicatoin , which uses some 32 bit graphic exes.
While i am doing createprocess for that 32 bit exes , its looks for registry path in "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyApp" .
But as my application is 64 bit , all registry entries is in
"HKEY_LOCAL_MACHINE\SOFTWARE\MyApp".
As result creatprocess fot 32 bit graphic exe fails.
My Question is that "Is there any way so those 32 bit exe also looks for there registry path in default 64 bit registry path instead of wow6432node ?"
P.S. I cant convert those 32 bit exe into 64 bit as I don't have the source code for those 32bit graphic exes .
Please provide me any help to resolve this issue.
Regards..
There is no way so those 32 bit exe also looks for their registry path in default 64 bit registry path instead of wow6432node ?"
The only possible solution is to port 32 bit exe into 64 bit
Related
I got one CommDev ActiveX project compiled on both 32 bit os and 64 bit os. Now I have CommDev_x86.ocx and CommDev_x64.ocx. Here comes the problem on Windows 7 os. Should I put CommDev_x86.ocx at C:\Windows\SysWOW64 and CommDev_x64.ocx at C:\Windows\System32, and then execute "regsvr32 C:\Windows\SysWOW64\CommDev_x86.ocx" and "regsvr32 C:\Windows\System32\CommDev_x64.ocx"? Should I register all of them or just one of them? For that I found there exists both 32bit IE and 64 bit IE on the os.Can anyone do me a favor? Thanks.
I am constructing a 32bit .mexw32 from a cpp file in Matlab 32 bit on windows 7 64bit os. Although it is successfully generated to file, when I run it I get the error Invalid MEX-file 'PCLview_organised.mexw32': The
specified module could not be found.
With Dependency Walker I realize that it resorts to 64bit dll's instead of 32 which results in compatibility issues. How can this be fixed ??? I have unsucessfully tried adding the windows/syswow64 to environment variables but somehow, the 64 bit dll's still get picked up.
I have compiled this application in VS 2010 in 32 bit Win7 and it is working fine on 32 bit machine but giving error "the application is Unable to start correctly 0xc000007b" on 64 bit machine.
After Google it I have checked with Dependency Walker it is giving the error in ORAOCCI11.dll. but don't get any solution to resolve it.
Thanks in advance.
I got the answer of this question by my own so i am answering it. I should use all the 32 bit libraries even on 64 bit system if my all other code is complied in 32 bit so ODAC client should be of also 32 bit.
I have a COM+ component running as an in-process server (library application) in the COM+ catalog under 64 bit Windows Server 2008 or 64 bit Windows 7. If I install a 32 bit version of the component in C:\Windows\System32 and run:
HRESULT hr = CoCreateInstance(CLSID_MyClsID, NULL, CLSCTX_INPROC_SERVER, IID_MyInterface, reinterpret_cast<void**>(&_interfaceInstance));
from a 32 bit application everything works. Likewise if I install a 64 bit version of the component under C:\ and call CoCreateInstance from a 64 bit application it runs as expected. However if I install a 64 bit version of the component under C:\Windows\System32 and attempt to call CoCreateInstance from a 64 bit application the return value is 0x8007007e, meaning "The specified module could not be found". I am particularly careful about unregistering the component before moving it. I have also checked that the InProcServer keys in the registry point to the actual path to the COM+ dll. What I can't understand is why everything works except for the 64 bit install under C:\Windows\System32??? Any thoughts or ideas hugely appreciated.
Installing your component to C:\Windows\System32 seems like a bad idea in general: that folder is owned by the OS and isn't intended for the installation of user programs.
That said, you're probably being bitten by file system redirection: when a 32-bit program access C:\Windows\System32, it's actually redirected to C:\Windows\SysWOW64. If your installer is 32-bit, it's not actually writing your 64-bit component to the folder you expect. When your 64-bit app runs, it tries to find the component in the "real" System32 folder and fails to find it.
I would recommend installing the two different versions of your component to x86 and x64 subfolders of a new folder under %ProgramFiles%.
Considering the following Understanding
A 32 bit Process cannot load a 64 bit dll or vice versa.
For registering/unregistering a DLL regsvr32 calls the entry point DllRegisterServer / DllUnregisterServer after loading the target DLL into its address space through LoadLIbrary.
On a 64 bit System, 32 bit version of regsvr32 is present in C:\Windows\SysWOW64
But then on my 2008 R2 Box, I was able to register a 32 bit dll by the 64 bit regsvr32. How was that possible? Am I missing something?
The example I wanted to highlight in the screenshot was the last for which the Dialog pops up.
This should explain how it happens exactly:
(source: alax.info)
regsvr32 will start it's another bitness twin internally to match the bitness of the DLL. This is how registration succeeds. You don't need to care whether you start 32-bit or 64-bit version of regsvr32 because it will take care of mismatch.
The scenario when you need to care is when you start regsvr32 from Visual Studio as debugging host. You want correct bitness there, because child process with actual registration will run outside of debugger and you won't be able to step your code through.
It seems Mats and my assumption were correct. MS have re-engineered the 64 bit regsvr32 so that based on the target dll bitness it may spawn up a new 32 bit regsvr32 process from %SYSWOW64% to register the DLL. To prove this point, I fired up procexp, spied on the pop up Window for the 32 bit DLL and here was what showed up.
Couple of things to note
The Command line for the 32 bit regsvr32 maps with the 32 bit DLL name I was trying to register
The 32 bit Version of the regsvr32 is a child process of the 64 bit version of regsvr32
The Image Type and the Path Column