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.

67 lines
1.6 KiB

  1. /* Copyright 1999 American Power Conversion, All Rights Reserverd
  2. *
  3. * Description:
  4. * DLL entry points for the APC UpsMiniDriver interface
  5. *
  6. *
  7. * Revision History:
  8. * mholly 14Apr1999 Created
  9. *
  10. */
  11. #ifndef _INC_APCUPS_H_
  12. #define _INC_APCUPS_H_
  13. // The following ifdef block is the standard way of creating macros which
  14. // make exporting from a DLL simpler. All files within this DLL are compiled
  15. // with the APCUPS_EXPORTS symbol defined on the command line. this symbol
  16. // should not be defined on any project that uses this DLL. This way any
  17. // other project whose source files include this file see APCUPS_API
  18. // functions as being imported from a DLL, wheras this DLL sees symbols
  19. // defined with this macro as being exported.
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #ifdef APCUPS_EXPORTS
  24. #define APCUPS_API
  25. #else
  26. #define APCUPS_API __declspec(dllimport)
  27. #endif
  28. //
  29. // UPS MiniDriver Interface
  30. //
  31. APCUPS_API DWORD WINAPI UPSInit();
  32. APCUPS_API void WINAPI UPSStop(void);
  33. APCUPS_API void WINAPI UPSWaitForStateChange(DWORD, DWORD);
  34. APCUPS_API DWORD WINAPI UPSGetState(void);
  35. APCUPS_API void WINAPI UPSCancelWait(void);
  36. APCUPS_API void WINAPI UPSTurnOff(DWORD);
  37. //
  38. // values returned from UPSGetState
  39. //
  40. #define UPS_ONLINE 1
  41. #define UPS_ONBATTERY 2
  42. #define UPS_LOWBATTERY 4
  43. #define UPS_NOCOMM 8
  44. //
  45. // error values returned from UPSInit
  46. //
  47. #define UPS_INITUNKNOWNERROR 0
  48. #define UPS_INITOK 1
  49. #define UPS_INITNOSUCHDRIVER 2
  50. #define UPS_INITBADINTERFACE 3
  51. #define UPS_INITREGISTRYERROR 4
  52. #define UPS_INITCOMMOPENERROR 5
  53. #define UPS_INITCOMMSETUPERROR 6
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #endif