Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. ApiTest.c
  5. Abstract:
  6. This file contains tests of the Service Controller's lock APIs:
  7. RLockServiceDatabase
  8. RQueryServiceLockStatusW
  9. RUnlockServiceDatabase
  10. Author:
  11. John Rogers (JohnRo) 15-Apr-1992
  12. Environment:
  13. User Mode - Win32
  14. Revision History:
  15. 15-Apr-1992 JohnRo
  16. Created.
  17. 21-Apr-1992 JohnRo
  18. Added config API tests.
  19. Split-out lock tests into LockTest.c
  20. Split-out macros into sctest.h.
  21. 17-Oct-1996 AnirudhS
  22. Added Config2 API tests.
  23. --*/
  24. //
  25. // INCLUDES
  26. //
  27. #define UNICODE
  28. #include <windows.h>
  29. #include <assert.h> // assert().
  30. #include <debugfmt.h> // FORMAT_ equates.
  31. #include <winsvc.h>
  32. #include <sctest.h> // TRACE_MSG macros, UNEXPECTED_MSG(), etc.
  33. #include <stdio.h> // printf()
  34. #include <stdlib.h> // EXIT_ equates.
  35. int __cdecl
  36. main(void)
  37. {
  38. ///////////////////////////////////////////////////////////////////
  39. SetLastError( 149 );
  40. (VOID) printf( "Force last error is " FORMAT_DWORD "\n", GetLastError() );
  41. ///////////////////////////////////////////////////////////////////
  42. TRACE_MSG0( "ApiTest: calling TestConfig2APIs...\n" );
  43. TestConfig2APIs();
  44. TRACE_MSG0( "ApiTest: back from TestConfig2APIs.\n" );
  45. ///////////////////////////////////////////////////////////////////
  46. TRACE_MSG0( "ApiTest: calling TestLocks...\n" );
  47. TestLocks();
  48. TRACE_MSG0( "ApiTest: back from TestLocks.\n" );
  49. ///////////////////////////////////////////////////////////////////
  50. TRACE_MSG0( "ApiTest: calling TestConfigAPIs...\n" );
  51. TestConfigAPIs();
  52. TRACE_MSG0( "ApiTest: back from TestConfigAPIs.\n" );
  53. ///////////////////////////////////////////////////////////////////
  54. return (EXIT_SUCCESS);
  55. } // main