win-pvdrivers

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/waitnopendinginstallevents/waitnopendinginstallevents.c	Sat Jan 02 10:22:04 2010 +1100
     1.3 @@ -0,0 +1,29 @@
     1.4 +#pragma warning(disable: 4201)
     1.5 +#include <basetyps.h>
     1.6 +#include <stdlib.h>
     1.7 +#include <wtypes.h>
     1.8 +#include <stdio.h>
     1.9 +#include <string.h>
    1.10 +#include <strsafe.h>
    1.11 +#include <cfgmgr32.h>
    1.12 +
    1.13 +int __cdecl
    1.14 +main(ULONG argc, PCHAR argv[])
    1.15 +{
    1.16 +  DWORD ret;
    1.17 +  DWORD timeout = INFINITE;
    1.18 +
    1.19 +  if (argc == 2)
    1.20 +  {
    1.21 +    timeout = atoi(argv[1]);
    1.22 +  }
    1.23 +
    1.24 +  printf("timeout = %d\n", timeout);
    1.25 +
    1.26 +  ret = CMP_WaitNoPendingInstallEvents(timeout);
    1.27 +
    1.28 +  printf("ret = %d\n", ret);
    1.29 +
    1.30 +  return ret;
    1.31 +}
    1.32 +