win-pvdrivers

annotate 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
rev   line source
james@731 1 #pragma warning(disable: 4201)
james@731 2 #include <basetyps.h>
james@731 3 #include <stdlib.h>
james@731 4 #include <wtypes.h>
james@731 5 #include <stdio.h>
james@731 6 #include <string.h>
james@731 7 #include <strsafe.h>
james@731 8 #include <cfgmgr32.h>
james@731 9
james@731 10 int __cdecl
james@731 11 main(ULONG argc, PCHAR argv[])
james@731 12 {
james@731 13 DWORD ret;
james@731 14 DWORD timeout = INFINITE;
james@731 15
james@731 16 if (argc == 2)
james@731 17 {
james@731 18 timeout = atoi(argv[1]);
james@731 19 }
james@731 20
james@751 21 //printf("timeout = %d\n", timeout);
james@731 22
james@731 23 ret = CMP_WaitNoPendingInstallEvents(timeout);
james@731 24
james@751 25 //printf("ret = %d\n", ret);
james@731 26
james@731 27 return ret;
james@731 28 }
james@731 29