Register COM dll in vista

  • Thread starter Thread starter Angela Yan
  • Start date Start date
A

Angela Yan

Hi,

I created a COM dll server using VS.net 2003 on XP. The Regsvr works fine on
XP. Then I copy the whole project over to vista, and build it using VS.net
2005. Everytime I build the project, there is a great chance that an error
message will pop up "The specified module could not be found" when I try to
regsvr the binary. Only once in a while, the binary that is built can be
regsvr successfully.

Anyone has any idea?

Thanks in advance.

Regards,
Angela
 
Don't you just add a reference in your project to the dll file? Thats
Interop when it deals with a com binary.
 
Yeh it should be as simple as that *-)

--
Zack Whittaker
» ZackNET Enterprises: www.zacknet.co.uk
» MSBlog on ResDev: www.msblog.org
» Vista Knowledge Base: www.vistabase.co.uk
» This mailing is provided "as is" with no warranties, and confers no
rights. All opinions expressed are those of myself unless stated so, and not
of my employer, best friend, Ghandi, my mother or my cat. Glad we cleared
that up!

--: Original message follows :--
 
Yes Yes.. I mean I create an ATL COM dll in VS.NET.. not a COM DLL that is
using .NET framework.
Sorry for any confusion caused... :)

Angela
 
Only guessing: Your are trying to regsvr32 the DLL and UAP is preventing
it, then you are getting the wrong error message. Oh aren't Beta's are fun.
:)

Can you start an elevated command window and then register the server?
 
So essentially, Windows key + R and type in:
regsvr32 <dll.name>

--
Zack Whittaker
» ZackNET Enterprises: www.zacknet.co.uk
» MSBlog on ResDev: www.msblog.org
» Vista Knowledge Base: www.vistabase.co.uk
» This mailing is provided "as is" with no warranties, and confers no
rights. All opinions expressed are those of myself unless stated so, and not
of my employer, best friend, Ghandi, my mother or my cat. Glad we cleared
that up!

--: Original message follows :--
 
Hmm... I am not sure whether it is UAP which prevents the registration
process. I have already disabled UAP for my system. And the regsvr error I
am getting is not E_ACCESSDENIED.

Here is the full error message:

The module "C:\Users\xxx\Desktop\MyObject.dll" failed to load.
Make sure the binary is stored at the specified path or debug it to check
for problems with the binary or dependent .DLL files.
The specified module could not be found.

And I can regsvr other COM dll successfully in the same machine.

Any help is greatly appreciated.. :)

Regards,
Angela
 
That is it. On vista with UAP enabled you will need an eleveated window
since it is going to write to the registry.

--

Ed Sproull
Windows Shell Team
<std disclaimer>
 
I can confirm that is the error message displayed when the DLL isn't found.
If you go to the directory where the DLL is located and call regsvr32 on the
DLL do you sill get the same message? If you don't and the DLL registers,
you probably want to check the path that VS is using. If you still get the
message, I would start regsvr32 <yourdll> under the debugger and see if your
module is actually loading.

Did you mention that you copied this project from another computer? If so
this might have brought a bad path with it.

Hope this helps.
--

Ed Sproull
Windows Shell Team
<std disclaimer>
 
Thank you for the reply... :) I really appreciate it.. Maybe I was not
very clear in my previous message.

This is what I do when I regsvr...

Windows key + R..
Type "Regsvr32" then drag the DLL to the command window and press enter..
Error messege of module not found shown...

I even tried copying the regsvr32.exe to my DLL 's directory or copying the
DLL to system32 folder. Neither case will it work..

When I debug the regsvr32 <mydll> in VS, it doesn't even go into the
DLLMain(). The error message window pops up when the Regsvr32 is
calling/loading its own dependent DLLs.

Yes, I copied the project from another computer in which the project uses a
different path. And I check every file in the solution explorer and every
field in the project property to change the path. Hmm.. I think if there is
a bad path, it would cause compilation errors before I can regsvr? But the
compilation/build process seemed fine.

I just googled the question, it seems that there are a few people who are
getting the same message as mine. But there seem not having any 'standard'
answers... :p

Looking forward to your reply.

Regards,
Angela
 
Angela, I sent you an email and asked if you could send me you DLL and I'll
try it.

Maybe I can see what is going on.

--

Ed Sproull
Windows Shell Team
<std disclaimer>
 
Hi!

This is exactly the same issue that I am having when I try to register my
client DLL. Do you have any resolution on this issue so far? If so can you
post it in the group? I would like to know any updates regarding this.

Thanks and Regards,

KS
 
To Edward,

Thank you. I have sent the DLL file...
Looking forward to your reply. :)

To Andre,

Yes. I have turned off the UAP by selecting it to "no prompt" from the
"special admin" account that is unhidden by adding the speical registry key.
And I also disabled UAP using msconfig. :)

Regards,
Angela
 
Hi,

I am getting a different error message when I try to regsvr another com DLL
in Vista 5365. Here's the message.

"The module "E:\User\xxx\Desktop\MyDll.DLL" failed to load.

Make sure the binary is stored at the specified path or debug it to check
for problems with the binary or dependent .DLL files.

The application has failed to start because its side-by-side configuration
is incorrect. Please see the application event log for more detail."

Anyone has any idea what is mean by "side-by-side configuration"???

Thanks Thanks

KS
 
Wow that wasn't fun! It appears that you have a dependency on MSVCR71D.dll
and that isn't installed by default on Vista. Once I found a copy of the DLL
it loaded but the call to DLLRegisterServer failed with Access is Denied.
I'll leave that one for you. :)

Let me know how this works out for you.

--

Ed Sproull
Windows Shell Team
<std disclaimer>
 
See my later post. Run Depends.exe on your DLL and see if you have a
dependency on MSVCR71D.dll.

--

Ed Sproull
Windows Shell Team
<std disclaimer>
 
One more question: Does it repro if you build the retail version?



--

Ed Sproull
Windows Shell Team
<std disclaimer>
 
Hi Edward,

Thank you very much for your effort. :)

Yeah, the same error message can also repro on the release version of the
DLL.

I used dependency walker on my release version of the DLL, it appears that
it has a dependency on MSVCR71.DLL, which I 'guess' it is not installed by
default on vista as well. Once I place a copy of MSVCR71.DLL in vista
system32 folder, the release version of my DLL can be successfully
regsvr-ed.

I really appreciate your help. :) :)

Regards,
Angela
 
Back
Top