Link to home
Start Free TrialLog in
Avatar of jtsokanis
jtsokanisFlag for United States of America

asked on

32 bit Application running in a bits windows server cannot be run from remote client, class not registered error

From a windows 7 client, we try to open an application 32 bits installed in a 64 bits Windows 2008 Standard R2 server, the error we got is "class not registered", I saw this article http://www.gfi.com/blog/32bit-object-64bit-environment/   but not sure how to Locate the COM object GUID
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

I am not sure if the workaround described in above link can work for you.  Where is the app running? On the 64 bit server or on 32 bit W7 client?

If the app is running on 32 bit client then you don't need to know all COM objects GUIDs. You just need to register all COM objects used by your application on every client which runs the application. The list of COM objects should tell the application vendor. Also if you install the app on the client then the Setup should register all necessary COM objects.

To find the COM object GUID is also easy when you know the COM object name or DLL used. You may simply search Registry for this name.
Running "from a remote location" is still running locally.
You need to satisfy all of the .exe's dependencies (COM objects, DLLs etc) on the machine that runs said exe.
This means registering COM obbects, DLLs etc. on each machine that has to run the .EXE.
Usually, you "just" need to find the object(s) name(s) and register it(them) on the machine that has to run it(them) with the command regsvr32.
If the component is stored remotely, try to copy it locally first or to use its UNC (\\Server\Share\FolderPath\FileName).
Avatar of jtsokanis

ASKER

I already registered the dlls in the client and also in the server using  regsvr32 from windows\SysWOW64 for 32-bit libraries.
how did you make sure you registered all the dependencies?
Can the application run OK on the server itself?
Going not in details ,how running any application on 32 bit or 64 bit architecture is different or how locally running application and application running in RDP session is different . I will be answering straight forward answer to your question " how to Locate the COM object GUID" , the answer is very simple, GUID is either mentioned on the pop up message or if you can found the same error message in event viewer application logs .

I am also not sure whether it will work for you or not . However I understood your query was answered.
BTW, are your Win7 "remote" clients x64 or x86 (32bits) clients?
The server runs the application without no problem. Clients are 32bits, I tried in a 64 bits server  and it doesn´t work, it get the same error.
The event viewer doens´t show the error.
Hmm... It seems you are not talking the truth :-)

"Clients are 32bits"  vs. "I already registered the dlls in the client and also in the server using  regsvr32 from windows\SysWOW64 for 32-bit libraries. " 

Where did you find the SysWOW64 folder on 32 bit clients?

So either you did not register it at all or some DLL is still not registered or the client is 64 bit...

But if you know the DLL names I can answer your question now:
1) Open the Regedit.EXE
2) Press CTRL-F
3) Enter the DLL name and try to find it
4) The GUID is either the parent registry key name or the contents of the TypeLibId key.

You should look for all occurrences of the DLL name in the Registry.
If you don't find the DLL name then it is not registered.
I copied the dlls the program uses to the 32bits clients and registered all of them, I also copied the dlls in to the server folder SysWOW64  and registered.

I look into the regedit for the dlls and each of them has a diferent GUID, should I do the steps below for each dll?
-Locate your COM object GUID under the HKey_Classes_Root\Wow6432Node\CLSID\[GUID]
-Once located add a new REG_SZ (string) Value. Name should be AppID and data should be the same COM object GUID you have just searched for
-Add a new key under HKey_Classes_Root\Wow6432Node\AppID\
-The new key should be called the same as the com object GUID
-Under the new key you just added, add a new REG_SZ (string) Value, and call it DllSurrogate. Leave the value empty
-Create a new Key under HKey_Local_Machine\Software\Classes\AppID\
-Again the new key should be called the same as the COM object’s GUID. No values are necessary to be added under this key.
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I ran the Dependency Walker software it shows these errors:
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
i will contact the provider.

Thanks