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.

130 lines
4.2 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 1993-1994
  4. *
  5. * TITLE: LIGHTS.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: Nick Manson
  10. *
  11. * DATE: 25 May 1994
  12. *
  13. * Internal header information for LIGHTS.C
  14. *
  15. ********************************************************************************
  16. *
  17. * CHANGE LOG:
  18. *
  19. * DATE REV DESCRIPTION
  20. * ----------- --- -------------------------------------------------------------
  21. * 29 Jun 1994 NRM Added MMWM_NOTIFYCALL message and sub-messages. Split off
  22. * TAPI related info to linefunc.h
  23. * 19 Jun 1994 NRM Removed MMWM_DESTROY message (redundant) and added
  24. * MAXRCSTRING (length of labels from RC file)
  25. * 25 May 1994 NRM Original implementation.
  26. *
  27. *******************************************************************************/
  28. #ifndef _INC_LIGHTS
  29. #define _INC_LIGHTS
  30. //--------------------------------------------------------------------------
  31. // Include files
  32. #define INC_OLE2 // REVIEW: don't include ole.h in windows.h
  33. #include <windows.h>
  34. #include <windowsx.h>
  35. #include <shellapi.h>
  36. #include <stdarg.h>
  37. #include <assert.h>
  38. #include <devioctl.h>
  39. #include <ntddser.h>
  40. #include <ntddmodm.h>
  41. #include "resource.h"
  42. #include "lightsid.h"
  43. //--------------------------------------------------------------------------
  44. // Debug Macros
  45. #ifdef DEBUG
  46. #define DPRINTF(sz) OutputDebugString("LIGHTS.EXE: "sz"\r\n");
  47. #define ASSERT(exp) if (!(exp)) {DPRINTF("Assert failure\n");DebugBreak();}
  48. #else //ifdef DEBUG
  49. #define DPRINTF(sz)
  50. #define ASSERT(exp)
  51. #endif //ifdef DEBUG
  52. //--------------------------------------------------------------------------
  53. // Internal Constant definitions.
  54. #define MODEMMONITOR_CLASSNAME "ModemMonitor_Main"
  55. // Initialize the contents of the ModemMeter window.
  56. #define MMWM_INITDIALOG (WM_USER + 100)
  57. // Private tray icon notification message sent to the ModemMeter window.
  58. #define MMWM_NOTIFYICON (WM_USER + 101)
  59. // Timer ID and frequencies.
  60. #define MDMSTATUS_UPDATE_TIMER_ID 1
  61. #define MDMSTATUS_UPDATE_TIMER_TIMEOUT 250
  62. #define MDMSTATUS_UPDATE_TIMER_COUNT 20 // 20 * 250 millisec.
  63. #define MDMSTATUS_STALE_TIMER_COUNT 1000 // 1000 * 250 millisec.
  64. // Maximum size of a resource string table string.
  65. #define MAXRCSTRING 64
  66. // The number of tray icons used.
  67. #define NUMBER_OF_ICONS 4
  68. // The number of lights states.
  69. #define NUMBER_OF_LIGHTS 2
  70. // The number of text time strings.
  71. #define NUMBER_OF_STRINGS 9
  72. #define MODEM_TIME_STRING_SIZE 35
  73. // Modem Bitmap size information
  74. #define MODEM_BITMAP_WIDTH 260
  75. #define MODEM_BITMAP_HEIGHT 97
  76. // Image-relative position of the controls
  77. #define TXL_X_OFFSET 130
  78. #define TXL_Y_OFFSET 51
  79. #define RXL_X_OFFSET 146
  80. #define RXL_Y_OFFSET 59
  81. #define TXT_X_OFFSET 0
  82. #define TXT_Y_OFFSET 79
  83. #define RXT_X_OFFSET 0
  84. #define RXT_Y_OFFSET 83
  85. //--------------------------------------------------------------------------
  86. // Unimodem Device IOCTL interface definitions
  87. // Unimodem VXD DeviceIOControl identification numbers.
  88. #define UNIMODEM_IOCTL_GET_STATISTICS 0x0000A007
  89. // Unimodem VXD DeviceIOControl data structure.
  90. typedef struct _ApiStats {
  91. VOID * hPort; // was MODEMINFORMATION * hPort;
  92. DWORD fConnected;
  93. DWORD DCERate;
  94. DWORD dwPerfRead;
  95. DWORD dwPerfWrite;
  96. } APISTATS;
  97. // Modem Connection Information Management structure
  98. typedef struct _SYSTEM_MODEM_STATUS {
  99. BOOL Connected;
  100. BOOL Reading;
  101. BOOL Writing;
  102. DWORD DCERate;
  103. DWORD dwPerfRead;
  104. DWORD dwPerfWrite;
  105. } SYSTEM_MODEM_STATUS, *LPSYSTEM_MODEM_STATUS;
  106. // Context sensitive help array used by the WinHelp engine.
  107. extern DWORD gaLights[];
  108. void NEAR PASCAL ContextHelp (LPDWORD, UINT, WPARAM, LPARAM);
  109. #endif // _INC_LIGHTS