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.

163 lines
3.9 KiB

  1. #ifndef PP_H
  2. #define PP_H
  3. #define SERIAL_ADVANCED_SETTINGS
  4. #include "msports.h"
  5. #ifdef USE_P_TRACE_ERR
  6. #define P_TRACE_ERR(_x) MessageBox( GetFocus(), TEXT(_x), TEXT("ports traceerr"), MB_OK | MB_ICONINFORMATION );
  7. #define W_TRACE_ERR(_x) MessageBox( GetFocus(), _x, TEXT("ports traceerr"), MB_OK | MB_ICONINFORMATION );
  8. #else
  9. #define P_TRACE_ERR(_x)
  10. #define W_TRACE_ERR(_x)
  11. #endif
  12. #define DO_COM_PORT_RENAMES
  13. #define RX_MIN 1
  14. #define RX_MAX 14
  15. #define TX_MIN 1
  16. #define TX_MAX 16
  17. TCHAR m_szDevMgrHelp[];
  18. #if defined(_X86_)
  19. //
  20. // For NEC PC98. Following definition comes from user\inc\kbd.h.
  21. // The value must be the same as value in kbd.h.
  22. //
  23. #define NLSKBD_OEM_NEC 0x0D
  24. #endif // FE_SB && _X86_
  25. //
  26. // Structures
  27. //
  28. typedef struct _ADVANCED_DATA
  29. {
  30. BOOL HidePolling;
  31. BOOL UseFifoBuffersControl;
  32. BOOL UseFifoBuffers;
  33. BOOL UseRxFIFOControl;
  34. BOOL UseTxFIFOControl;
  35. DWORD FifoRxMax;
  36. DWORD FifoTxMax;
  37. DWORD RxFIFO;
  38. DWORD TxFIFO;
  39. DWORD PollingPeriod;
  40. TCHAR szComName[20];
  41. TCHAR szNewComName[20];
  42. HKEY hDeviceKey; // (like ROOT\LEGACY_BEEP\0000)
  43. HCOMDB hComDB;
  44. HDEVINFO DeviceInfoSet;
  45. PSP_DEVINFO_DATA DeviceInfoData;
  46. } ADVANCED_DATA, *PADVANCED_DATA;
  47. ///////////////////////////////////////////////////////////////////////////////////
  48. // Advanced Dialog Prototypes
  49. ///////////////////////////////////////////////////////////////////////////////////
  50. ULONG
  51. FillPortNameCb(
  52. HWND ParentHwnd,
  53. PADVANCED_DATA Params
  54. );
  55. INT_PTR APIENTRY
  56. AdvancedPortsDlgProc(
  57. IN HWND hDlg,
  58. IN UINT uMessage,
  59. IN WPARAM wParam,
  60. IN LPARAM lParam
  61. );
  62. ULONG
  63. FillAdvancedDlg(
  64. IN HWND DialogHwnd,
  65. IN PADVANCED_DATA AdvancedData
  66. );
  67. BOOL
  68. DisplayAdvancedDialog(
  69. IN HWND DialogHwnd,
  70. IN OUT PADVANCED_DATA AdvancedData
  71. );
  72. void
  73. InitializeControls(
  74. IN HWND DialogHwnd,
  75. IN PADVANCED_DATA AdvancedData
  76. );
  77. void
  78. RestoreAdvancedDefaultState(
  79. IN HWND DialogHwnd,
  80. IN PADVANCED_DATA AdvancedData
  81. );
  82. ULONG
  83. SaveAdvancedSettings(
  84. IN HWND DialogHwnd,
  85. IN PADVANCED_DATA AdvancedData
  86. );
  87. void
  88. SetTrackbarTicks(
  89. IN HWND TrackbarHwnd,
  90. IN DWORD MinVal,
  91. IN DWORD MaxVal
  92. );
  93. void
  94. SetLabelText(
  95. IN HWND LabelHwnd,
  96. IN DWORD ResId,
  97. IN ULONG Value
  98. );
  99. void
  100. HandleTrackbarChange(
  101. IN HWND DialogHwnd,
  102. IN HWND TrackbarHwnd
  103. );
  104. void
  105. EnableFifoControls(
  106. HWND DialogHwnd,
  107. BOOL Enabled
  108. );
  109. // Context help header file and arrays for devmgr ports tab
  110. // Created 2/21/98 by WGruber NTUA and DoronH NTDEV
  111. //
  112. // "Cyclom-Y Port Advanced Settings" Dialog Box
  113. //
  114. #define IDH_NOHELP ((DWORD)-1)
  115. #define IDH_DEVMGR_PORTSET_ADVANCED 15840 // "&Advanced" (Button)
  116. #define IDH_DEVMGR_PORTSET_BPS 15841 // "" (ComboBox)
  117. #define IDH_DEVMGR_PORTSET_DATABITS 15842 // "" (ComboBox)
  118. #define IDH_DEVMGR_PORTSET_PARITY 15843 // "" (ComboBox)
  119. #define IDH_DEVMGR_PORTSET_STOPBITS 15844 // "" (ComboBox)
  120. #define IDH_DEVMGR_PORTSET_FLOW 15845 // "" (ComboBox)
  121. #define IDH_DEVMGR_PORTSET_DEFAULTS 15892 // "&Restore Defaults" (Button)
  122. //
  123. // "Advanced Communications Port Properties" Dialog Box
  124. //
  125. #define IDH_DEVMGR_PORTSET_ADV_USEFIFO 16885 // "&Use FIFO buffers (requires 16550 compatible UART)" (Button)
  126. #define IDH_DEVMGR_PORTSET_ADV_TRANS 16842 // "" (msctls_trackbar32)
  127. #define IDH_DEVMGR_PORTSET_ADV_DEVICES 161027 // "" (ComboBox)
  128. #define IDH_DEVMGR_PORTSET_ADV_RECV 16821 // "" (msctls_trackbar32)
  129. #define IDH_DEVMGR_PORTSET_ADV_NUMBER 16846 // "" (ComboBox)
  130. #define IDH_DEVMGR_PORTSET_ADV_DEFAULTS 16844
  131. #endif // PP_H