Solved

VC++ dll is not regsvr32-ing

Posted on 2000-05-15
9
367 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Handling string inputs in C/Linux 23 179
PDF library for Delphi 2 104
computer science syllabus 3 70
How to convert MFC::CString to UTF8 wchar_t* 10 142
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

910 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

22 Experts available now in Live!

Get 1:1 Help Now