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.

194 lines
4.4 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. //
  19. // Structures
  20. //
  21. typedef struct _PORT_PARAMS
  22. {
  23. HDEVINFO DeviceInfoSet;
  24. PSP_DEVINFO_DATA DeviceInfoData;
  25. HCOMDB hComDB;
  26. PBYTE PortUsage;
  27. DWORD PortUsageSize;
  28. BOOL ShowStartCom;
  29. DWORD NumChildren;
  30. TCHAR szComName[20];
  31. } PORT_PARAMS, *PPORT_PARAMS;
  32. typedef struct
  33. {
  34. TCHAR szComName[20];
  35. HDEVINFO DeviceInfoSet;
  36. SP_DEVINFO_DATA DeviceInfoData;
  37. HKEY hDeviceKey;
  38. DWORD NewComNum;
  39. } CHILD_DATA, *PCHILD_DATA;
  40. ///////////////////////////////////////////////////////////////////////////////////
  41. // Cyclades-Z Property Page Prototypes
  42. ///////////////////////////////////////////////////////////////////////////////////
  43. void
  44. InitOurPropParams(
  45. IN OUT PPORT_PARAMS Params,
  46. IN HDEVINFO DeviceInfoSet,
  47. IN PSP_DEVINFO_DATA DeviceInfoData,
  48. IN PTCHAR StrSettings
  49. );
  50. HPROPSHEETPAGE
  51. InitSettingsPage(
  52. PROPSHEETPAGE * Psp,
  53. OUT PPORT_PARAMS Params
  54. );
  55. UINT CALLBACK
  56. PortSettingsDlgCallback(
  57. HWND hwnd,
  58. UINT uMsg,
  59. LPPROPSHEETPAGE ppsp
  60. );
  61. INT_PTR APIENTRY
  62. PortSettingsDlgProc(
  63. IN HWND hDlg,
  64. IN UINT uMessage,
  65. IN WPARAM wParam,
  66. IN LPARAM lParam
  67. );
  68. BOOL
  69. SavePortSettings(
  70. IN HWND DialogHwnd,
  71. IN PPORT_PARAMS Params
  72. );
  73. BOOL
  74. SavePortSettingsDlg(
  75. IN HWND DialogHwnd,
  76. IN PPORT_PARAMS Params
  77. );
  78. //Cyclades-Z
  79. void
  80. RestoreDefaults(
  81. HWND DialogHwnd,
  82. PPORT_PARAMS Params
  83. );
  84. ULONG
  85. FillNumberOfPortsText(
  86. IN HWND DialogHwnd,
  87. IN PPORT_PARAMS Params
  88. );
  89. BOOL
  90. FillStartComCb(
  91. HWND ParentHwnd,
  92. PPORT_PARAMS Params
  93. );
  94. ULONG
  95. GetPortName(
  96. IN DEVINST PortInst,
  97. IN OUT TCHAR *ComName,
  98. IN ULONG ComNameSize
  99. );
  100. DWORD
  101. CheckComRange(
  102. HWND ParentHwnd,
  103. PPORT_PARAMS Params,
  104. DWORD nCom
  105. );
  106. // Return codes for CheckComRange:
  107. #define COM_RANGE_OK 0
  108. #define COM_RANGE_TOO_BIG 1
  109. #define COM_RANGE_MEM_ERR 2
  110. BOOL
  111. TryToOpen(
  112. IN PTCHAR szCom
  113. );
  114. BOOL
  115. NewComAvailable(
  116. IN PPORT_PARAMS Params,
  117. IN DWORD NewComNum
  118. );
  119. ULONG
  120. GetPortData(
  121. IN DEVINST PortInst,
  122. OUT PCHILD_DATA ChildPtr
  123. );
  124. void
  125. ClosePortData(
  126. IN PCHILD_DATA ChildPtr
  127. );
  128. void
  129. EnactComNameChanges(
  130. IN HWND ParentHwnd,
  131. IN PPORT_PARAMS Params,
  132. IN PCHILD_DATA ChildPtr
  133. );
  134. // Context help header file and arrays for devmgr ports tab
  135. // Created 2/21/98 by WGruber NTUA and DoronH NTDEV
  136. //
  137. // "Port Settings" Dialog Box
  138. //
  139. #if 0
  140. #define IDH_NOHELP ((DWORD)-1)
  141. #define IDH_DEVMGR_PORTSET_ADVANCED 15840 // "&Advanced" (Button)
  142. #define IDH_DEVMGR_PORTSET_BPS 15841 // "" (ComboBox)
  143. #define IDH_DEVMGR_PORTSET_DATABITS 15842 // "" (ComboBox)
  144. #define IDH_DEVMGR_PORTSET_PARITY 15843 // "" (ComboBox)
  145. #define IDH_DEVMGR_PORTSET_STOPBITS 15844 // "" (ComboBox)
  146. #define IDH_DEVMGR_PORTSET_FLOW 15845 // "" (ComboBox)
  147. #define IDH_DEVMGR_PORTSET_DEFAULTS 15892 // "&Restore Defaults" (Button)
  148. //
  149. // "Advanced Communications Port Properties" Dialog Box
  150. //
  151. #define IDH_DEVMGR_PORTSET_ADV_USEFIFO 16885 // "&Use FIFO buffers (requires 16550 compatible UART)" (Button)
  152. #define IDH_DEVMGR_PORTSET_ADV_TRANS 16842 // "" (msctls_trackbar32)
  153. #define IDH_DEVMGR_PORTSET_ADV_DEVICES 161027 // "" (ComboBox)
  154. #define IDH_DEVMGR_PORTSET_ADV_RECV 16821 // "" (msctls_trackbar32)
  155. #define IDH_DEVMGR_PORTSET_ADV_NUMBER 16846 // "" (ComboBox)
  156. #define IDH_DEVMGR_PORTSET_ADV_DEFAULTS 16844
  157. #endif
  158. #include "cyzhelp.h"
  159. #endif // PP_H