• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5474
  • Last Modified:

resource name not found registering ATL DLL server

I am working on an ATL DLL server, and I began to receive an error when registering the DLL by building it. It compiles with no errors; it's the registration that is the problem. I always get the error:

RegSvr32: DllRegisterServer in "filename.dll" failed.
Return code was 0x80070716

The return code is described as "The specified resource name can not be found in the image file." according to the Error Lookup tool in VC6. If you try to register the dll through RegSvr32 on the command line, GetLastError() returns error 0x0000007e, which is ERROR_MOD_NOT_FOUND.

This error is puzzling because I have not changed any project settings since I began working on it. It used to register the DLL fine when I would built it. I run NT4 SP4 with VC6 SP3 on my machine, but a co-worker running Win95 can register the same DLL with no errors. I can also build previous ATL DLLs that I have with no problem.

Does anyone have an idea what could be wrong here? What "resource name" could it be referring to? I have all the registry reources and .rgs files for each COM class. Any help would be appreciated.
1 Solution
I assume that simply a DLL that should be located in your path is missing - as you're using VC6, I'd suggest either using the dependency walker that ships with it or "dumpbin /imports <your.dll>" to see which DLL it is (NOTE that it may also be a version conflict concerning the DLLs in your path)...
DllRegisterServer basically inserts stuff in the registry.
This stuff is held in a resource in the DLL, and you can
edit it using the resources tab of the workspace window.
You access the resources by ID, so you need to correlated
that the correct ID is used, and the name for this ID is correct,
and also that the resources are actually part of the project
(do a build all to see if the resources are compiled into the DLL).

Your problem is just a simple one of the code (generated by a wizard
ages ago, has got out of sync with the resources somehow).
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now