Microsoft KB Archive/310644

From BetaArchive Wiki
Knowledge Base


PRB: DiCallClassInstaller in 16-Bit Installation Applications Can Cause GPF

PSS ID Number: 310644

Article Last Modified on 10/20/2003



The information in this article applies to:

  • Microsoft Windows 98 Driver Development Kit (DDK)
  • Microsoft Windows 95 Driver Development Kit (DDK)



This article was previously published under Q310644

SYMPTOMS

When you are using the 16-bit SetupX.dll and NetDi.dll APIs in the Windows 95, Windows 98, and Windows Millennium Edition DDKs, you may experience a general protection fault (GPF) when you call DiCallClassInstaller() in an application that installs network devices. This problem can occur when you use an installation program that is based on an old version of the IPNEW sample designed for Windows 95 to install network components on Windows 98 and Windows Millennium platforms.

NOTE: This problem has also been recorded with other 16-bit SetupX and NetDi APIs.

This situation is more likely to occur if the 16-bit application is called from a 32-bit installation program because the 32-bit program assumes a much larger default stack space.

CAUSE

This problem is the result of the stack growing down into the data area on Windows 98 because NetDi and SetupX use more stack space in Windows 98 and Windows Millennium edition than in Windows 95. The original version of the IPNEW sample used an empirically derived stack size of 10,240 in the makefile link section.

RESOLUTION

Specify /STACK:32768 or greater (instead of /STACK:10240) in the link flags section of the makefile to fix the problem. Versions of the sample from the Windows 98 DDK or later already contain this fix.

Check the MAKEFILE of any project based on the IPNEW sample and verify that the LFLAGS_D_WEXE and LFLAGS_R_WEXE contain the entry /STACK:32768 (or greater).

MORE INFORMATION

The 16-bit SetupX.dll and NetDi.dll APIs are used to install network devices on Windows 95, Windows 98, and Windows Millennium Edition platforms. A commonly used sample to illustrate the use of these APIs is the IPNEW sample in the Windows 98 DDK. The IPNEW sample was released after the Windows 95 DDK was released and so it was released through the following Microsoft Knowledge Base article:

185783 SAMPLE: IPInst.exe Determines Whether TCP/IP Is Installed


This first version of the sample available on the Web had a different name, pInst.exe. The release date was March 30, 1997. That sample was written and tested for Windows 95-based systems. If this version of the sample is used on Windows 98 or Windows Millennium-based computers, or is used as a model for applications developed for Windows 98 or Windows Millennium-based computers, the DiCallClassInstaller GPF can result. The newer version of the sample on the Windows 98 DDK resolves this problem.

Keywords: kbfix kbKMode kbNDIS kbprb kbWDM KB310644
Technology: kbAudDeveloper kbWin95DDK kbWin95DDKSearch kbWin95search kbWin98DDK kbWin98DDKSearch kbWin98search kbWinDDKSearch