HOWTO: Install Networking Components ProgrammaticallyLast reviewed: July 7, 1997Article ID: Q169580 |
The information in this article applies to:
SUMMARYMany cutting-edge software products require Internet or network access. Therefore, installation applications need to verify that critical networking components are installed, and possibly initiate installation of these components when necessary. Programmatic detection and installation of networking components can be accomplished using a 16-bit protected mode Setup API on Windows 95. This API is documented in DevInst.Doc in the Win95 DDK.
MORE INFORMATIONDevInst.Doc documents the Setup API itself and the parameters for each API call without illuminating any of the implementation details for installing a device. You can download a sample MFC application from the Microsoft Software Library or from the Microsoft OEM/IHV DDK home page at:
http://www.microsoft.com/support/products/developer/ddk_hardware/Follow the links to the WinDDK Samples page. The sample is a MSVC 1.52 MFC application. You should not try to install PCMCIA or PCI devices with this application. These devices are installed when they are inserted for the first time or during boot time. The sample makes use of DiCreateDevRegKey:
RETERR DiCreateDevRegKey( LPDEVICEINFO lpdi,
LPHKEY lphKey,
HINF hInf,
LPCSTR lpszInfSection,
int iFlags )
Create a unique registry key under the class of the associated device.
It returns OK if it has been successful; otherwise, an ERR_DI_xxx error code will be returned. If the return is OK, the lphKey will point to a valid handle to the created key. It is the caller's responsibility to close the returned registry key. lpdi
REFERENCESDDpr.Hlp, DevInst.Doc, Network.Doc |
Keywords : kbsetup kbhowto
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |