Solved

VC++ dll is not regsvr32-ing

Posted on 2000-05-15
9
361 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
  • 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
 
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now