PDA

View Full Version : Failed to load DLL error 0x80040702



NewsArchive
01-24-2000, 01:00 AM
IS 6.0 SP3

My installation is using a custom DLL (CTCModem.dll). I am prototyping the
C++ code as per instructions and based on information in this newsgroup. My
script calls UseDLL, calls the function and then calls UnUseDLL. All of
this works in Windows 95/98, however, in Windows NT 4.0 SP6a I get the
following error:

Error Number: 0x80040702
Description: Failed to load dll: CTCModem

What is error 0x80040702?
Why doesn't InstallShield publish what these 0x800XXXXX errror are?


InstallShield script:

prototype CTCModem.ComCtlUpdate();

UseDLL( SUPPORTDIR ^ "CTCModem.dll" );

// Call a function in the CTCModem DLL to determine the status of
// the COMCTL32.DLL.
// 1 if current version of COMCTL32.DLL is < 4.72.3110
// 0 if current version of COMCTL32.DLL is >= 4.72.3110
// -1 if current version of COMCTL32.DLL could not be determined
nResult = ComCtlUpdate();

UnUseDLL( SUPPORTDIR ^ "CTCModem.dll" );


MS VC++ 6.0 SP3 code:

int APIENTRY DllMain (HINSTANCE hInstance, DWORD fdwReason, LPVOID
pReserved)
{
return TRUE;
}


//////////////////////////////////////////////////////////////////////
// ComCtlUpdate
//
// Determines if the Windows common controls need to be updated.
//
// Returns:
// 1 if current version of COMCTL32.DLL is < 4.72.3110
// 0 if current version of COMCTL32.DLL is >= 4.72.3110
// -1 if current version of COMCTL32.DLL could not be determined
//
//////////////////////////////////////////////////////////////////////
int APIENTRY ComCtlUpdate(void)
{
...
return -1;
}


--
Dennis G. Krabbe
Senior Software Engineer
CTC Parker Automation
50 W. TechneCenter Drive
Milford, OH 45150-9792
Phone: (513) 831-2340 Ext. 7602
Fax: (513) 831-5042
Email: dkrabbe@ctcusa.com
http://www.ctcusa.com

NewsArchive
01-24-2000, 01:00 AM
Hello Dennis,

Your prototype is a bit off. The proper format to prototype a .dll is:

prototype cdecl ReturnType of Function DllName.FunctionName (Parameters)

Sincerely,
--
Olga K.
InstallShield Technical Support

InstallShield® Professional 2000 is now available from InstallShield
Software Corporation! Take advantage of new event-based scripting
and enhanced third-party technology support. Target the Windows Installer
service of Windows 2000. Find out more! Visit www.installshield.com
and upgrade to InstallShield Professional 2000 today!



Dennis G. Krabbe wrote in message <388c6d93.0@news.installshield.com>...
>IS 6.0 SP3
>
>My installation is using a custom DLL (CTCModem.dll). I am prototyping the
>C++ code as per instructions and based on information in this newsgroup.
My
>script calls UseDLL, calls the function and then calls UnUseDLL. All of
>this works in Windows 95/98, however, in Windows NT 4.0 SP6a I get the
>following error:
>
> Error Number: 0x80040702
> Description: Failed to load dll: CTCModem
>
>What is error 0x80040702?
>Why doesn't InstallShield publish what these 0x800XXXXX errror are?
>
>
>InstallShield script:
>
> prototype CTCModem.ComCtlUpdate();
>
> UseDLL( SUPPORTDIR ^ "CTCModem.dll" );
>
> // Call a function in the CTCModem DLL to determine the status of
> // the COMCTL32.DLL.
> // 1 if current version of COMCTL32.DLL is < 4.72.3110
> // 0 if current version of COMCTL32.DLL is >= 4.72.3110
> // -1 if current version of COMCTL32.DLL could not be determined
> nResult = ComCtlUpdate();
>
> UnUseDLL( SUPPORTDIR ^ "CTCModem.dll" );
>
>
>MS VC++ 6.0 SP3 code:
>
>int APIENTRY DllMain (HINSTANCE hInstance, DWORD fdwReason, LPVOID
>pReserved)
>{
> return TRUE;
>}
>
>
>//////////////////////////////////////////////////////////////////////
>// ComCtlUpdate
>//
>// Determines if the Windows common controls need to be updated.
>//
>// Returns:
>// 1 if current version of COMCTL32.DLL is < 4.72.3110
>// 0 if current version of COMCTL32.DLL is >= 4.72.3110
>// -1 if current version of COMCTL32.DLL could not be determined
>//
>//////////////////////////////////////////////////////////////////////
>int APIENTRY ComCtlUpdate(void)
>{
> ...
> return -1;
>}
>
>
>--
>Dennis G. Krabbe
>Senior Software Engineer
>CTC Parker Automation
>50 W. TechneCenter Drive
>Milford, OH 45150-9792
>Phone: (513) 831-2340 Ext. 7602
>Fax: (513) 831-5042
>Email: dkrabbe@ctcusa.com
>http://www.ctcusa.com
>
>
>

NewsArchive
01-24-2000, 01:00 AM
Hello Olga,

I tried your suggestion and I still have the same failure, 0x80040702.
Below I have provided my IS script prototypes.

Could you please tell me what 0x80040702 means? I would have more luck in
trying to debug my install if I knew what these error codes mean.

prototype cdecl BOOL CTCModem.DetectCTCModem();
prototype cdecl BOOL CTCModem.DetectCTCPhonebookEntry( NUMBER );
prototype cdecl BOOL CTCModem.DetectDialUpAdapter();
prototype cdecl int CTCModem.ComCtlUpdate();
prototype cdecl BOOL CTCModem.SetVDDRegistryEntry( BYVAL STRING );
prototype cdecl BOOL CTCModem.RemoveVDDRegistryEntry( BYVAL STRING );

Thank you,

--
Dennis G. Krabbe
Senior Software Engineer
CTC Parker Automation
50 W. TechneCenter Drive
Milford, OH 45150-9792
Phone: (513) 831-2340 Ext. 7602
Fax: (513) 831-5042
Email: dkrabbe@ctcusa.com
http://www.ctcusa.com


"Olga K (InstallShield)" <supportnews@installshield.com> wrote in message
news:388c764e.0@news.installshield.com...
> Hello Dennis,
>
> Your prototype is a bit off. The proper format to prototype a .dll is:
>
> prototype cdecl ReturnType of Function DllName.FunctionName (Parameters)
>
> Sincerely,
> --
> Olga K.
> InstallShield Technical Support
>
> InstallShield® Professional 2000 is now available from InstallShield
> Software Corporation! Take advantage of new event-based scripting
> and enhanced third-party technology support. Target the Windows Installer
> service of Windows 2000. Find out more! Visit www.installshield.com
> and upgrade to InstallShield Professional 2000 today!
>
>
>
> Dennis G. Krabbe wrote in message <388c6d93.0@news.installshield.com>...
> >IS 6.0 SP3
> >
> >My installation is using a custom DLL (CTCModem.dll). I am prototyping
the
> >C++ code as per instructions and based on information in this newsgroup.
> My
> >script calls UseDLL, calls the function and then calls UnUseDLL. All of
> >this works in Windows 95/98, however, in Windows NT 4.0 SP6a I get the
> >following error:
> >
> > Error Number: 0x80040702
> > Description: Failed to load dll: CTCModem
> >
> >What is error 0x80040702?
> >Why doesn't InstallShield publish what these 0x800XXXXX errror are?
> >
> >
> >InstallShield script:
> >
> > prototype CTCModem.ComCtlUpdate();
> >
> > UseDLL( SUPPORTDIR ^ "CTCModem.dll" );
> >
> > // Call a function in the CTCModem DLL to determine the status of
> > // the COMCTL32.DLL.
> > // 1 if current version of COMCTL32.DLL is < 4.72.3110
> > // 0 if current version of COMCTL32.DLL is >= 4.72.3110
> > // -1 if current version of COMCTL32.DLL could not be
determined
> > nResult = ComCtlUpdate();
> >
> > UnUseDLL( SUPPORTDIR ^ "CTCModem.dll" );
> >
> >
> >MS VC++ 6.0 SP3 code:
> >
> >int APIENTRY DllMain (HINSTANCE hInstance, DWORD fdwReason, LPVOID
> >pReserved)
> >{
> > return TRUE;
> >}
> >
> >
> >//////////////////////////////////////////////////////////////////////
> >// ComCtlUpdate
> >//
> >// Determines if the Windows common controls need to be updated.
> >//
> >// Returns:
> >// 1 if current version of COMCTL32.DLL is < 4.72.3110
> >// 0 if current version of COMCTL32.DLL is >= 4.72.3110
> >// -1 if current version of COMCTL32.DLL could not be determined
> >//
> >//////////////////////////////////////////////////////////////////////
> >int APIENTRY ComCtlUpdate(void)
> >{
> > ...
> > return -1;
> >}
> >
> >
> >--
> >Dennis G. Krabbe
> >Senior Software Engineer
> >CTC Parker Automation
> >50 W. TechneCenter Drive
> >Milford, OH 45150-9792
> >Phone: (513) 831-2340 Ext. 7602
> >Fax: (513) 831-5042
> >Email: dkrabbe@ctcusa.com
> >http://www.ctcusa.com
> >
> >
> >
>
>

NewsArchive
01-24-2000, 01:00 AM
(maybe helpfull) hints
- make sure that media is builded also for NT (Media build Wizard ). I do
not know why, but I also had a LOADING_DLL_UNDER_NT problem and I solved
this way.
- try loading on IS 5.5.
- try loading a release not a debug version.
if you find a solution, let me know daniel@berg-computers.ro.
Dennis G. Krabbe <dkrabbe@ctcusa.com> wrote in message
news:388c6d93.0@news.installshield.com...
> IS 6.0 SP3
>
> My installation is using a custom DLL (CTCModem.dll). I am prototyping
the
> C++ code as per instructions and based on information in this newsgroup.
My
> script calls UseDLL, calls the function and then calls UnUseDLL. All of
> this works in Windows 95/98, however, in Windows NT 4.0 SP6a I get the
> following error:
>
> Error Number: 0x80040702
> Description: Failed to load dll: CTCModem
>
> What is error 0x80040702?
> Why doesn't InstallShield publish what these 0x800XXXXX errror are?
>
>
> InstallShield script:
>
> prototype CTCModem.ComCtlUpdate();
>
> UseDLL( SUPPORTDIR ^ "CTCModem.dll" );
>
> // Call a function in the CTCModem DLL to determine the status of
> // the COMCTL32.DLL.
> // 1 if current version of COMCTL32.DLL is < 4.72.3110
> // 0 if current version of COMCTL32.DLL is >= 4.72.3110
> // -1 if current version of COMCTL32.DLL could not be determined
> nResult = ComCtlUpdate();
>
> UnUseDLL( SUPPORTDIR ^ "CTCModem.dll" );
>
>
> MS VC++ 6.0 SP3 code:
>
> int APIENTRY DllMain (HINSTANCE hInstance, DWORD fdwReason, LPVOID
> pReserved)
> {
> return TRUE;
> }
>
>
> //////////////////////////////////////////////////////////////////////
> // ComCtlUpdate
> //
> // Determines if the Windows common controls need to be updated.
> //
> // Returns:
> // 1 if current version of COMCTL32.DLL is < 4.72.3110
> // 0 if current version of COMCTL32.DLL is >= 4.72.3110
> // -1 if current version of COMCTL32.DLL could not be determined
> //
> //////////////////////////////////////////////////////////////////////
> int APIENTRY ComCtlUpdate(void)
> {
> ...
> return -1;
> }
>
>
> --
> Dennis G. Krabbe
> Senior Software Engineer
> CTC Parker Automation
> 50 W. TechneCenter Drive
> Milford, OH 45150-9792
> Phone: (513) 831-2340 Ext. 7602
> Fax: (513) 831-5042
> Email: dkrabbe@ctcusa.com
> http://www.ctcusa.com
>
>
>