Windows Server - Trouble registering a DLL using regsvr32.exe in Windows 2000?

Asked By tomlo on 25-Jan-09 05:08 AM
In windows 2000 when I try to register a DLL from a command line
(cmd.exe), using the command regsvr32.exe, I get the following error:
procedure could not be found." I verified the name is correct. I have
this probrem with another dll, as well, so it is not unique to a
single DLL. However, I can register most other DLLs without issue. For
regsvr32.exe taken from an XP machine and run it on my 2000 machine
(the file in XP It is a differ size therefore I'm assuming it's been
updated/changed since 2000). Also, I added an option to my Windows
right-click menu that allows me to Register/UnRegister DLLs and if I
use this technique the DLL registers correctly (without the XP version
of regsvr32).
I would prefer not to have to use an XP program on a Windows 2000
machine, if possible as this could have unforeseen consequences (in
general, it's just bad practice). The 'right-click' option is not
possible as I need a automated means to register the DLL (ie: via
batch file), I only mentioned the right-click scenario because it
might help point to the cause of the problem.
Can anyone tell me why this DLL fails to register?

Thanks in advance.




Dave Patrick replied on 21-Jan-09 11:20 PM
Does the path contain spaces? Can you post the command line string? Are you
logged on as local administrator?

Also note the regsvr32.exe return codes.

1.) If the dll has dependencies or is dependent on others, then it's
important to replace with the same version.
2.) If the dll exports the DLLRegisterServer, DllUnregisterServer functions
then it's best to unregister

regsvr32.exe /u "PathToDLL"
then after replacement
regsvr32.exe "PathToDLL"

INFO: How Regsvr32.exe Registers and Unregisters COM DLLs
http://support.microsoft.com/default.aspx?kbid=207132

Explanation of Regsvr32 Usage and Error Messages
http://support.microsoft.com/default.aspx?kbid=249873

You can run depends.exe against the DLL to check dependencies
http://www.dependencywalker.com/



--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
tomlo replied on 25-Jan-09 05:08 AM
On Jan 21, 11:20=A0pm, "Dave Patrick" <DSPatr...@nospam.gmail.com>
ou
ns
icrosoft.com/default.aspx?kbid=3D207132
com/default.aspx?kbid=3D249873
ependencywalker.com/

I am logged on as the local admin.

How do a capture the regsvr32 return codes in a command prompt or
batch file?

Here is the partial output from the command window:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

C:\Trovato\Registered Components>dir *.dll
Volume in drive C is c_drive
Volume Serial Number is 0CF6-E682

Directory of C:\Trovato\Registered Components

08/01/2008  10:36a             110,592 Opos_Constants.dll
08/01/2008  10:36a             139,264 vFormControlObject.dll
...<<<some files excluded from this output>>>
11 File(s)      3,324,416 bytes
0 Dir(s)   3,425,224,704 bytes free

C:\Trovato\Registered Components>regsvr32 opos_constants.dll
C:\Trovato\Registered Components>regsvr32 vFormControlObject.dll
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

The first call -- "regsvr32 opos_constants.dll" -- succeeds, the
second call -- "regsvr32 vFormControlObject.dll" -- fails in the
manner described in the original post. If I put an XP copy of
regsvr32.exe in the "Registered Components" directory and recall the
command recall (<Up Arrow>), it succeeds.

I ran the Dependency Walker utility and the it indicates that the are
two dependencies missing (both for SHLWAPI.DLL):
1) MPR.DLL is missing the entry point WNetRestoreConnectionA
2) APPHELP.DLL file is missing

The FAQ section for the Dependency Walker website indicate that
SHLWAPI.DLL can handle both these missing dependencies.
Dave Patrick replied on 22-Jan-09 11:50 PM
In all the years of supporting Windows 2000 I never heard of an issue with
the com registration tools. You might have better luck asking the
vFormControlObject.dll developer or possibly ask them here.

http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.vb.com&cat=en_US_d5d9e9db-968e-49d9-8f43-bd6e30b674a2&lang=en&cr=US

Also possibly;
http://support.microsoft.com/default.aspx?scid=kb;en-us;307495




--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


I am logged on as the local admin.

How do a capture the regsvr32 return codes in a command prompt or
batch file?

Here is the partial output from the command window:
=======================================

C:\Trovato\Registered Components>dir *.dll
Volume in drive C is c_drive
Volume Serial Number is 0CF6-E682

Directory of C:\Trovato\Registered Components

08/01/2008  10:36a             110,592 Opos_Constants.dll
08/01/2008  10:36a             139,264 vFormControlObject.dll
...<<<some files excluded from this output>>>
11 File(s)      3,324,416 bytes
0 Dir(s)   3,425,224,704 bytes free

C:\Trovato\Registered Components>regsvr32 opos_constants.dll
C:\Trovato\Registered Components>regsvr32 vFormControlObject.dll
=======================================

The first call -- "regsvr32 opos_constants.dll" -- succeeds, the
second call -- "regsvr32 vFormControlObject.dll" -- fails in the
manner described in the original post. If I put an XP copy of
regsvr32.exe in the "Registered Components" directory and recall the
command recall (<Up Arrow>), it succeeds.

I ran the Dependency Walker utility and the it indicates that the are
two dependencies missing (both for SHLWAPI.DLL):
1) MPR.DLL is missing the entry point WNetRestoreConnectionA
2) APPHELP.DLL file is missing

The FAQ section for the Dependency Walker website indicate that
SHLWAPI.DLL can handle both these missing dependencies.