win-pvdrivers

annotate waitnopendinginstallevents/waitnopendinginstallevents.c @ 731:3b46c7474a82

Fix installer so that it definitely waits until all drivers are installed properly
author James Harper <james.harper@bendigoit.com.au>
date Sat Jan 02 10:22:04 2010 +1100 (2010-01-02)
parents
children 036172f7e1b2
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@731 21 printf("timeout = %d\n", timeout);
james@731 22
james@731 23 ret = CMP_WaitNoPendingInstallEvents(timeout);
james@731 24
james@731 25 printf("ret = %d\n", ret);
james@731 26
james@731 27 return ret;
james@731 28 }
james@731 29