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.

144 lines
6.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997-2002.
  5. //
  6. // File: LogHrAPI.h
  7. //
  8. // Contents:
  9. //
  10. //----------------------------------------------------------------------------
  11. // loghours.h : header file
  12. #if !defined(_LOGHOURS_H_)
  13. #define _LOGHOURS_H_
  14. #define CB_SCHEDULE_ARRAY_LENGTH 21 // Number of bytes in the schedule array.
  15. #define cbDsScheduleArrayLength 84 // Number of bytes in the schedule array
  16. /////////////////////////////////////////////////////////////////////////////
  17. //
  18. // Exported Functions
  19. //
  20. // UiScheduleDialog()
  21. //
  22. // Invoke a dialog to set/modify a schedule, for example
  23. // -- the logon hours for a particular user
  24. // -- the schedule for a connection
  25. //
  26. // RETURNS
  27. // Return S_OK if the user clicked on the OK button.
  28. // Return S_FALSE if the user clicked on the Cancel button.
  29. // Return E_OUTOFMEMORY if there is not enough memory.
  30. /// Return E_UNEXPECTED if an expected error occured (eg: bad parameter)
  31. //
  32. // INTERFACE NOTES
  33. // Each bit in the array represents one hour. As a result, the
  34. // expected length of the array should be (24 / 8) * 7 = 21 bytes.
  35. // For convenience, the first day of the week is Sunday and
  36. // the last day is Saturday.
  37. // Consequently, the first bit of the array represents the schedule
  38. // for Sunday during period 12 AM to 1 AM.
  39. // - If *pprgbData is NULL, then the routine will allocate
  40. // an array of 21 bytes using LocalAlloc(). The caller
  41. // is responsible of releasing the memory using LocalFree().
  42. // - If *pprgbData is not NULL, the routine expect the array to contain
  43. // 21 bytes of data and re-uses the array as its output parameter.
  44. //
  45. // HISTORY
  46. // 17-Jul-97 t-danm Creation.
  47. // 16-Sep-97 jonn Changed to UiScheduleDialog
  48. // 26-Mar-98 bryanwal Changed to ConnectionScheduleDialog
  49. //
  50. ///////////////////////////////////////////////////////////////////////////////
  51. // Flags for LogonScheduleDialogEx, DialinHoursDialogEx,
  52. // ConnectionScheduleDialogEx, ReplicationScheduleDialogEx
  53. ///////////////////////////////////////////////////////////////////////////////
  54. // The input data is in GMT
  55. #define SCHED_FLAG_INPUT_GMT 0x00000000 // default
  56. // The input data is in local time.
  57. #define SCHED_FLAG_INPUT_LOCAL_TIME 0x00000001 // supported only in
  58. // LogonScheduleDialogEx and
  59. // DialinHoursDialogEx
  60. #define SCHED_FLAG_READ_ONLY 0x00000002 // the dialog is read-only
  61. // This version accepts data only in GMT
  62. HRESULT LogonScheduleDialog(HWND hwndParent, // parent window
  63. BYTE ** pprgbData, // pointer to pointer to array of 21 bytes
  64. LPCTSTR pszTitle); // dialog title
  65. // This version allows the caller to specify if the data is in GMT or local time
  66. HRESULT LogonScheduleDialogEx (HWND hwndParent, // parent window
  67. BYTE ** pprgbData, // pointer to pointer to array of 21 bytes
  68. LPCTSTR pszTitle, // dialog title
  69. DWORD dwFlags);
  70. // 13-May-98 weijiang
  71. // clone of LogScheduleDialog, using different dialog template -- IDD_DIALINHOUR
  72. // to set hours for dialin
  73. // This version accepts data only in GMT
  74. HRESULT DialinHoursDialog(HWND hwndParent, // parent window
  75. BYTE ** pprgbData, // pointer to pointer to array of 21 bytes
  76. LPCTSTR pszTitle); // dialog title
  77. // This version allows the caller to specify if the data is in GMT or local time
  78. HRESULT DialinHoursDialogEx (HWND hwndParent, // parent window
  79. BYTE ** pprgbData, // pointer to pointer to array of 21 bytes
  80. LPCTSTR pszTitle, // dialog title
  81. DWORD dwFlags);
  82. // ConnectionScheduleDialog()
  83. //
  84. // This function takes the same form as LogonScheduleDialog(), but it modifies
  85. // the schedule for DS replication. This schedule has 4 bits per hours,
  86. // one for each 15-minute period, so the array contains 84 bytes instead of 21.
  87. //
  88. // NOTE: ConnectionScheduleDialog takes the schedule in GMT
  89. //
  90. // HISTORY
  91. // 02-Jan-98 jonn Creation.
  92. // 26-Mar-98 bryanwal Changed to ConnectionScheduleDialog
  93. //
  94. HRESULT ConnectionScheduleDialog(HWND hwndParent, // parent window
  95. BYTE ** pprgbData, // pointer to pointer to array of 84 bytes
  96. LPCTSTR pszTitle); // dialog title
  97. HRESULT ConnectionScheduleDialogEx(HWND hwndParent, // parent window
  98. BYTE ** pprgbData, // pointer to pointer to array of 84 bytes
  99. LPCTSTR pszTitle, // dialog title
  100. DWORD dwFlags);
  101. // Same as ConnectionScheduleDialog, but 2 states are shown
  102. HRESULT ReplicationScheduleDialog(HWND hwndParent, // parent window
  103. BYTE ** pprgbData, // pointer to pointer to array of 84 bytes
  104. LPCTSTR pszTitle); // dialog title
  105. HRESULT ReplicationScheduleDialogEx(HWND hwndParent, // parent window
  106. BYTE ** pprgbData, // pointer to pointer to array of 84 bytes
  107. LPCTSTR pszTitle, // dialog title
  108. DWORD dwFlags); // option flags
  109. // DirSyncScheduleDialog()
  110. //
  111. // This function takes the same form as LogonScheduleDialog(), but it modifies
  112. // the schedule for Directory Synchronization.
  113. //
  114. // HISTORY
  115. // 11-Sep-98 bryanwal Added DirSyncScheduleDialog
  116. //
  117. HRESULT DirSyncScheduleDialog(HWND hwndParent, // parent window
  118. BYTE ** pprgbData, // pointer to pointer to array of 84 bytes
  119. LPCTSTR pszTitle); // dialog title
  120. HRESULT DirSyncScheduleDialogEx(HWND hwndParent, // parent window
  121. BYTE ** pprgbData, // pointer to pointer to array of 84 bytes
  122. LPCTSTR pszTitle, // dialog title
  123. DWORD dwFlags); // option flags
  124. #endif // !defined(_LOGHOURS_H_)