Solved

VC++ dll is not regsvr32-ing

Posted on 2000-05-15
9
379 Views
Last Modified: 2008-03-17
My VC++ activeX dll is not regsvr32-ing successfully on my user machine.  It works ok on my development machine.  Maybe the user is missing some file that the mfc library update supplies?  Unlikely, since my user has Win98 SE.  

I am getting a loadlibrary failed 0x0000485 - but then if he tries to regsvr32 XXXjunknonexistentAnyText  he gets the same message!! :-(   He is however browsing and typing the correct path.

At first I gave him a debug version and thought that since he didn't have the mfc*d.dll's (notice the 'd') - then that was the reason it wasn't working.  Now that I've given him a production version dll, it hasn't helped :-(
0
Comment
Question by:abulka
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
9 Comments
 
LVL 3

Expert Comment

by:mnewton022700
ID: 2813272
It most likely that his version of MFC42.dll is not as uptodate as yours. Compare the version on his computer with the version on your computer.

My advice would be to use the MSDEV tool "Depends" to see all the dependent DLLs of your ActiveX Dll. Then make sure that your user has uptodate versions of all these DLLs.

Most install programs will help you do this.

Doesn't regsvr32 just have the best error messages :)
0
 

Author Comment

by:abulka
ID: 2813440
Yeah - I love the regsvr32 error messages ;-) - and the way it doesn't distinguish between a missing dll and a dll that it depends on being missing etc.  Who knows what's missing, in the end...

Scanning my custom VC++ dll, it seems that the missing dll was MSVCP60.dll, but when this was added to c:\windows\system the message changed into:
  Loadlibrary failed, getlasterror
  error code 0x0000001f.

which I consider is progress. :-)  I am downloading the mfc patch now to see if it helps...

Running the mfcinst.exe updated something but the regsvr32 command still fails :-(

I'm sure I have all the 1st level dlls that are referred to by my custom activeX dll.  

MFC42.DLL
MSVCRT.dll
KERNEL32.dll
USER32.dll
GDI32.dll
OLEAUT32.dll
MSVCP60.dll

but whether they are upto date and what THEY refer to is another matter.  I would have thought that running the mfcinst.exe patch would have fixed things.  I'm running out of ideas.  I've even tried running different versions I found of regsvr32 on my 98 machine...
 
0
 
LVL 4

Accepted Solution

by:
AssafLavie earned 60 total points
ID: 2814548
Hi.
This is probably because you compiled you DLL in a Min-Size build. When you do that, ATL, by default, links to the Registrar dynamicaly and than you have to ship the ATL.dll along with you product.
The solution is to build with Min-Dependencies or just add _ATL_STATIC_REGISTRY to your projects definitions.

The registrar in case you're wondering is the MS component that lets you use RGS files, and if you link to it statically - it only adds 8KB to your file.

Hope this is indeed the answer - it usualy is to this type of problem.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:mnewton022700
ID: 2815276
Hi Andy,

Are you able to register the GET control and TSS default view factory on the 98 machine?

Try copying the file msvcirt.dll from your machine to the 98 machine into the directory that contains your DLL.

You can email me at mnewton@tomsawyer.com if you would like to speed up this discussion.

Mike.

--
Mike Newton
Tom Sawyer Software


ps.
Sorry Assaf, I've got inside information on this one, it's not ATL. :)
0
 

Author Comment

by:abulka
ID: 2815489
> Are you able to register the GET control and TSS default view factory on the 98 machine?

Not sure what the GET control means, but the default views work ok on the user machine.  As per your suggestion

> Try copying the file msvcirt.dll from your machine to the 98 machine into the directory that contains your DLL.
<<

We put
     msvcirt.dll  - version 6.00.8168.0 or later
into the ts/...../bin  (although we also had it in the windows/system folder too - same version) and it didn't help, I'm afraid.

-Andy
0
 

Author Comment

by:abulka
ID: 2815961
You said:

If this latest effort doesn't happen to fix the problem
have your user download a dependency walker from:

http://msdn.microsoft.com/library/techart/samples/5289.exe


>Dependency walker found it!   We determined that msvcp60.dll was
>corrupt/missing, so I sent him another version of msvcp60.dll and that
>allowed ts3.dll to register!  :-) :-) :-)
0
 

Author Comment

by:abulka
ID: 2815965
oops - I meant for mnewton to have the points
0
 
LVL 4

Expert Comment

by:AssafLavie
ID: 2823109
How many points were there? 60?
I'll post a question so MNewton ca collect the points.
ok?
0
 

Author Comment

by:abulka
ID: 2823992
Thanks that nice of you.  I've already emailed MNewton apologising, so as to the points - that's between MNewton and yourself.  Sorry for mucking you about.
-A
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question