Re: regsvr32 error code 0x80004002



"David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx> wrote in message news:RG07j.28704$JD.23505@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx> wrote in message news:uq2ViXsOIHA.4740@xxxxxxxxxxxxxxxxxxxxxxx
Yes I looked before posting. The dependencies are the same as they were two months ago:
KERNEL32.DLL
USER32.DLL
OLE32.DLL
OLEAUT32.DLL
ATL80.DLL
MSVCR80.DLL
RPCRT4.DLL

I also have seen this error when there is a missing dll that your dll depends on.

You're posting that in reply to my list of the DLLs that my DLL depends on. Those DLLs are all present.

Here are the full paths.

c:\windows\system32\KERNEL32.DLL
c:\windows\system32\USER32.DLL
c:\windows\system32\OLE32.DLL
c:\windows\system32\OLEAUT32.DLL
c:\windows\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_cbb27474\ATL80.DLL
c:\windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\MSVCR80.DLL
c:\windows\system32\RPCRT4.DLL

If this is insufficiently cooperative, please teach me.

Could you write a short test app that does a LoadLibrary of your dll and see if it succeeds?

I can do more than that. When my main routine in C# tries to create the C++ DLL's COM object, if creation fails, then my main routine shells out to invoke regsvr32 on the DLL. Then it tries again to create the COM object, and gives up if the second time fails. Well, this invocation of regsvr32 succeeds. Registration fails if I type the regsvr32 command in a command prompt (but until a few days ago it worked), or if Visual Studio 2005 compiles the DLL (but until a few days ago it worked).

Was this information really uncooperative? I think it's too weird, but I don't know what else to think about it. I didn't think that keeping it secret would be considered more cooperative, but if you think so then please teach me.

Is this on a PC with Visual Studio installed?

Mr. Ching. OK, you'd been working too hard that day. Let's continue today.

Your DLL depends on the VC2005 C RTL (msvcr80.dll).

Yes, that is in my list which you quoted.

Um. Maybe you hadn't been working too hard that day, and I should repeat the list more times? Or fewer times? Sorry, I'm getting frustrated. I know you don't owe me anything, and I do appreciate it when you're helpful, but I don't know how to figure out what you're trying to say this time. Please teach me.

These need to be installed using the vc_redist.exe

You're kidding. Or maybe not. On another PC which also has VS2005 SP1 installed, an installer which was created by a VS2005 SP1 setup project did indeed insist on installing an extra copy of the redistributables. But I didn't do it on the machine where I'm trying to do this development.

Again, I think this is too weird, but does that mean I should have kept it secret? Or what?

And as mentioned above, registrations of COM DLLs used to work on this machine where I'm trying to do this development.

and not simply copying the dll manually,

Actually not, though it depends. I already managed to produce some manifests so that the application could be installed on a target system with private assemblies (i.e. XCOPY deployment). I still have backup copies of that version in case my new setup project with merge modules fails to produce the necessary results.

Now this I think isn't weird. But still, should I have kept it secret?

Also, if you have updated Visual Studio with a service pack, then you need the vc_redist.exe that corresponds with the service pack, and not the original one that came with VC2005.

In my new setup project with merge modules, the resulting installer includes the vc_redist.exe from VS2005 SP1. In my previous version where I constructed manifests, I copied the VC runtime and MFC DLLs from the SP1 versions. At present both of those versions work when installed onto a target XP system. But that's kind of irrelevant to the problem I'm discussing here. regsvr32 fails on the XP system where VS2005 SP1 is installed, after it used to work until a few days ago.

Sorry Norman, the context that this was happening on your development machine was lost, so I had forgotten that VS was installed.

I understand. I thought it was due to your having worked too hard that day and being tired when you wrote your previous posting. Anyway, let's continue.

But this does not negate my points that even though the DLL's found by Dependency Walker were "present" it does not mean they were present in the correct folders (as I said, SxS installation is tricky)

Fine, I reran Dependency Viewer today and added the full paths to the list which I added earlier in this message today. Thank you for (I hope) your concern, and it is no problem for me to add this information.

nor that those DLL's did not in turn depend on other DLL's which may not have been installed correctly.

There's a missing export in a delay load of
c:\windows\system32\MPR.DLL

There's ALWAYS a missing export in a delay load of c:\windows\system32\MPR.DLL. Has this suddenly become a reason for regsvr32 to stop working? If so, do you know a fix?

I also did not see whether your dev machine was running Vista. If so, you need to install the Vista Update for VS2005 SP1.

The development machine involved here is running XP SP2. Windows Update reports 0 available updates in all three categories.[*]

[* Windows Update doesn't mention that IE7 is available. I tried IE7 several months ago but uninstalled it because it crashes very frequently. On English language systems Windows Update mentions the availability of IE7, but on Japanese systems Microsoft respectably refrains from mentioning IE7.]

On a Vista machine where I sometimes use VS2005 SP1, I installed the Vista Update several months ago. I didn't test to see if regsvr32 stopped working on that machine.

I don't know why it worked until a few days ago but not anymore. All I can tell you is my experience with the regsvr32 error message.

OK, and I answered.

I'm sorry if my advice isn't working for you, but it was given in a spirit of cooperation, and I'm not sure I'm getting that from you.

This is the reason why I asked several times in this posting, please teach me what was wrong with my previous answers. Please also teach me what's wrong with this message if I have been uncooperative here.

I'm glad you have the private assembly approach to fall back on.

That's a fallback for installation on target machines, but has no effect on regsvr32's breakage on the development machine.

By the way, on the development machine, after posting my last message last Friday, I completely uninstalled VS2005 and newly installed VS2005 + SP1. (No Vista Update because the development machine is running XP SP2.) There was no change at all to the behaviour of regsvr32.

One more by-the-way, which I hope will not be considered uncooperative. A few years ago I discovered that regsvr32 corrupts registry entries when the DLL is in a folder whose pathname includes characters appropriate for the Windows language version. If the pathname contains only a limited set of characters (mostly imported from Italy) then regsvr32 behaved. But this is not the current problem. I double-checked that all characters in all pathnames involved today are in the range 0 to 127.

.



Relevant Pages

  • Re: regsvr32 error code 0x80004002
    ... I also have seen this error when there is a missing dll that your dll ... to invoke regsvr32 on the DLL. ... On another PC which also has VS2005 SP1 ... In my new setup project with merge modules, the resulting installer ...
    (microsoft.public.vc.mfc)
  • Re: macro deployment - References DLL issue
    ... because InnoSetup will handle all those registration ... but luckliy I don't need to, because you're not supposed to call RegSvr32 ... the registration process should be done by a proper installer. ... To use these dll, I must in the VBA Editor to Add References and ...
    (microsoft.public.excel.programming)
  • Re: Register COM DLL when it is not a registered reference (late bound)?
    ... Some Windows Installer registration settings obey the per-user/per-system ... rules when the registry entries are installed from the MSI file (vsdrfCOM ... as you run regsvr32 you make it registered for everyone so now your client ... You're in the framework.setup group here, but this is a C++ regular COM Dll ...
    (microsoft.public.dotnet.framework.setup)
  • Re: Network DLL Registration
    ... > We have experienced a problem where an application installer has not ... > correctly registered a DLL. ... The suggested solution is to run regsvr32 ...
    (microsoft.public.vb.general.discussion)
  • Re: Service pack 3 problem
    ... Opening the regsvr32 file is as you say, no dll specified, followed by the ... and no dllcache folder exists, ... After show hidden files, folders, and system files, use WINDOWS Explorer ...
    (microsoft.public.windowsxp.general)