win-pvdrivers

view waitnopendinginstallevents/waitnopendinginstallevents.c @ 751:036172f7e1b2

Improved behaviour of waiting for all devices to install before allowing the msi installation to complete. Should work under Vista now.
author James Harper <james.harper@bendigoit.com.au>
date Sun Jan 10 10:13:47 2010 +1100 (2010-01-10)
parents 3b46c7474a82
children
line source
1 #pragma warning(disable: 4201)
2 #include <basetyps.h>
3 #include <stdlib.h>
4 #include <wtypes.h>
5 #include <stdio.h>
6 #include <string.h>
7 #include <strsafe.h>
8 #include <cfgmgr32.h>
10 int __cdecl
11 main(ULONG argc, PCHAR argv[])
12 {
13 DWORD ret;
14 DWORD timeout = INFINITE;
16 if (argc == 2)
17 {
18 timeout = atoi(argv[1]);
19 }
21 //printf("timeout = %d\n", timeout);
23 ret = CMP_WaitNoPendingInstallEvents(timeout);
25 //printf("ret = %d\n", ret);
27 return ret;
28 }