tags:

views:

225

answers:

4

I have a COM dll that is working fine as an in-proc server and I install it in Component Services COM+ Applications. Now when I try to CoCreate it from my client app, I get HRESULT 0x8007007e "The specified module could not be found". What could be causing this?

A: 

Please elaborate on the different circumstances between working and not working.

I suspect there is a module that is depended on that is not found - some dll that is not in a search path for example.

Tim
I suspect the same, but the dependencies are found when it is loaded in-proc. Everything is in the PATH.
Dave Mooney
Again, what is the difference between the two attempted executions. You THINK they are all there, but obviously they are not. what is in the local paths of the working execution that is not in the failing one?
Tim
A: 

HArd to tell . I rember that usually I need to register com component with something like that:

Regsvr32 my_com.dll

Also you may verify that the path to your DLL is in PATH envornnemnt variable (Is it PATH or another variable?). Or copy it in the folder for your application.

Verify also your user's rights on this DLL.

yves Baumes
The component is registered correctly using regsvr32, and its dependencies are in the PATH, otherwise it couldn't be loaded in-proc. I fooled around with the identity of the COM+ Application. I get the same error whether I use LocalSystem or my domain account.
Dave Mooney
What tells depedency walker?
yves Baumes
+4  A: 

Module not found means that the COM system tried to load a module/dll (probably referred to by a GUID) that wasn't found, either because it wasn't registered, or because the dll was not present at the registered path.

I used to get this error when trying to create an object "A" from e.g. A.dll, which called into another dll (B.dll) that wasn't registered.

A tool you may be interested in is process monitor, which tells you exactly what register keys were looked for by what process, with failure and success codes, and even let you see it's call stack.

xtofl
I didn't know that one.. :-) +1
yves Baumes
Yes, Process Monitor is a great thing.
sharptooth
ProcessMon wasn't much help because COM+ gave up trying to load the dll before any file i/o showed up in the tool. I was building my component on a ClearCase dynamic view, which similar to a mapped drive. Moving the dll and the psdll to a local path resolved the issue.
Dave Mooney
A: 

The dll was registered on a ClearCase dynamic view, similar to a mapped drive, not available to COM+. Solution was to move the dll and the proxy/stub dll to a local drive and register them there.

Dave Mooney