Solved

LoadLibrary("MyCom.dll") failed - The specified module could not be found.

Posted on 2004-08-25
7
599 Views
Last Modified: 2012-08-14
I made a Com dll.
I build it on my own computer with visual studio .net under window XP.

On my computer, i can put it under windows\system32 and regsvr32 MyCom.dll.
But when i put this dll on other computer and ty to run regsvr32 , i got error
LoadLibrary("MyCom.dll") failed - The specified module could not be found.

What could be the problem or what can i do???
0
Comment
Question by:mammouth
  • 3
  • 2
  • 2
7 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 125 total points
ID: 11893870
Get the dependency walker from www.dependencywalker.com to see which DLLs are missing on the "other" machine.
0
 
LVL 86

Expert Comment

by:jkr
ID: 11893875
BTW, first of all, make sure that you built a release version instead of a debug version.
0
 
LVL 19

Expert Comment

by:drichards
ID: 11894328
The dependency walker should tell you what's missing.  It is likely that it is some runtime files needed by VC7-built executables.  If so, here are a few links to information about redistributing VC7-built executables.  The second link describes how to use dependency walker to also see what libraries are loaded dynamically (if any), as well as using DUMPBIN to get dependencies.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcoriredistributingmfcatloledbtemplatesapplications.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vccondeterminingwhichdllstoredistribute.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcconredistributingmicrosoftvisualc60applications.asp
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 1

Author Comment

by:mammouth
ID: 11895032
I got those warning:

Linking...
.\Netclub.def : warning LNK4222: exported symbol 'DllCanUnloadNow' should not be assigned an ordinal
.\Netclub.def : warning LNK4222: exported symbol 'DllGetClassObject' should not be assigned an ordinal
.\Netclub.def : warning LNK4222: exported symbol 'DllRegisterServer' should not be assigned an ordinal
.\Netclub.def : warning LNK4222: exported symbol 'DllUnregisterServer' should not be assigned an ordinal
   Creating library .\ReleaseMinDependency/Netclub.lib and object .\ReleaseMinDependency/Netclub.exp
LINK : warning LNK4199: /DELAYLOAD:mtxex.dll ignored; no imports found from mtxex.dll
0
 
LVL 86

Expert Comment

by:jkr
ID: 11895055
Well, that does not really address your problem. What does the dependency walker say on the target machine?
0
 
LVL 1

Author Comment

by:mammouth
ID: 11895127
It give me : error opening file. The system cannot find the specified file (2) for those 3. i will copy them and test again.

MFC71.DLL  
MSVCR71.DLL
APPHELP.DLL
0
 
LVL 19

Expert Comment

by:drichards
ID: 11895243
The ...71.dll's are the C and MFC runtime files that go with VC7.  See the first link in the previous list.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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…
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 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.

776 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