Leaked source code of windows server 2003
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.

57 lines
1.5 KiB

  1. /* DEMOUPS - UPS Minidriver Sample
  2. * Copyright (C) Microsoft Corporation, 2001, All rights reserved.
  3. * Copyright (C) American Power Conversion, 2001, All rights reserved.
  4. *
  5. * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  6. * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  7. * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  8. * PURPOSE.
  9. *
  10. * File: demoups.h
  11. *
  12. * Author: Stephen Berard
  13. *
  14. * Description:
  15. * DLL entry points for the Demo UPS Minidriver.
  16. *
  17. * Revision History:
  18. * 26Jun2001 Created
  19. */
  20. #ifndef _INC_DEMOUPSDLL_H_
  21. #define _INC_DEMPUPSDLL_H_
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #define UPSMINIDRIVER_API /* .def file used instead; __declspec(dllexport) */
  26. // UPS MiniDriver Interface
  27. UPSMINIDRIVER_API DWORD UPSInit();
  28. UPSMINIDRIVER_API void UPSStop(void);
  29. UPSMINIDRIVER_API void UPSWaitForStateChange(DWORD, DWORD);
  30. UPSMINIDRIVER_API DWORD UPSGetState(void);
  31. UPSMINIDRIVER_API void UPSCancelWait(void);
  32. UPSMINIDRIVER_API void UPSTurnOff(DWORD);
  33. // UPSGetState values
  34. #define UPS_ONLINE 1
  35. #define UPS_ONBATTERY 2
  36. #define UPS_LOWBATTERY 4
  37. #define UPS_NOCOMM 8
  38. // UPSInit error values
  39. #define UPS_INITUNKNOWNERROR 0
  40. #define UPS_INITOK 1
  41. #define UPS_INITNOSUCHDRIVER 2
  42. #define UPS_INITBADINTERFACE 3
  43. #define UPS_INITREGISTRYERROR 4
  44. #define UPS_INITCOMMOPENERROR 5
  45. #define UPS_INITCOMMSETUPERROR 6
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49. #endif