/*++ AppDrv_Register -- modified from Microsoft WDK 6001.18002 sample (src\setup\DIFxAPI\AppDrv\AppDrvDepend.c) Description: This sample demonstrates how to use the application-to-driver dependency feature of the Driver Install Frameworks (DIFx) API. The DriverPackageInstall and the DriverPackageUninstall APIs allow the calling application to register and remove dependencies on a driver package. In order to register or remove a dependency on a driver package, the calling application needs to populate the fields of an INSTALLERINFO structure with information about itself. It then needs to pass in this structure as a parameter to the DIFx APIs, as shown in this sample. --*/ #include #include #include int __cdecl wmain( int argc, WCHAR* argv[] ) { WCHAR *InfPath = NULL; INSTALLERINFO AppInfo; BOOL Result; BOOL NeedReboot; // WCHAR FullInfPath[MAX_PATH]; WCHAR FullAplPath[MAX_PATH]; LPTSTR lpFilePart; DWORD Length; static LPCWSTR UninstallKey = TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"); WCHAR RegPath[MAX_PATH]; WCHAR UninstallPath[MAX_PATH * 2]; HKEY hkey; // if (argc < 7) { wprintf( TEXT("USAGE: AppDrv.exe