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.

84 lines
2.6 KiB

  1. // ----------------------------------------------------------------------------
  2. //
  3. // _UMTool.h
  4. //
  5. // Header for Insight.lib
  6. //
  7. // Author: J. Eckhardt, ECO Kommunikation
  8. //
  9. // This code was written for ECO Kommunikation Insight
  10. // (c) 1997-99 ECO Kommunikation
  11. // ----------------------------------------------------------------------------
  12. #ifndef __UMTOOL_H_
  13. #define __UMTOOL_H_
  14. // --------------------------------------------
  15. // type definitions
  16. typedef struct
  17. {
  18. HANDLE orgStation;
  19. HANDLE userStation;
  20. } desktop_access_ts, *desktop_access_tsp;
  21. // ------------------------------
  22. #define NAME_LEN 300
  23. #define USER_GUEST 0
  24. #define USER_USER 1
  25. #define USER_SUPERVISOR 2
  26. #define USER_DISTRIBUTOR 3
  27. #define USER_VENDOR 4
  28. // YX 06-11-99 moved from utilman.c
  29. #define STOP_UTILMAN_SERVICE_EVENT _TEXT("StopUtilityManagerEvent")
  30. typedef struct
  31. {
  32. TCHAR userName[NAME_LEN];
  33. TCHAR name[NAME_LEN];
  34. DWORD type;
  35. DWORD user;
  36. } desktop_ts, *desktop_tsp;
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40. // --------------------------------------------
  41. // macros
  42. #include "w95trace.h"
  43. // --------------------------------------------
  44. // desktop prototypes
  45. BOOL InitDesktopAccess(desktop_access_tsp dAccess);
  46. VOID ExitDesktopAccess(desktop_access_tsp dAccess);
  47. BOOL QueryCurrentDesktop(desktop_tsp desktop,BOOL onlyType);
  48. BOOL SwitchToCurrentDesktop(void);
  49. VOID WaitDesktopChanged(desktop_tsp desktop);
  50. // --------------------------------------------
  51. // event prototypes
  52. HANDLE BuildEvent(LPTSTR name,BOOL manualRest,BOOL initialState,BOOL inherit);
  53. // --------------------------------------------
  54. // memory mapped files
  55. HANDLE CreateIndependentMemory(LPTSTR name, DWORD size, BOOL inherit);
  56. LPVOID AccessIndependentMemory(LPTSTR name, DWORD size, DWORD dwDesiredAccess, PDWORD_PTR accessID);
  57. void UnAccessIndependentMemory(LPVOID data, DWORD_PTR accessID);
  58. void DeleteIndependentMemory(HANDLE id);
  59. // --------------------------------------------
  60. // security descriptor
  61. typedef struct
  62. {
  63. PSID psidUser;
  64. PSID psidGroup;
  65. } obj_sec_descr_ts,*obj_sec_descr_tsp;
  66. typedef struct
  67. {
  68. obj_sec_descr_ts objsd;
  69. SECURITY_ATTRIBUTES sa;
  70. } obj_sec_attr_ts, *obj_sec_attr_tsp;
  71. void InitSecurityAttributes(obj_sec_attr_tsp psa);
  72. void InitSecurityAttributesEx(obj_sec_attr_tsp psa, DWORD dwAccessMaskOwner, DWORD dwAccessMaskWorld);
  73. void ClearSecurityAttributes(obj_sec_attr_tsp psa);
  74. PSID EveryoneSid(BOOL fFetch);
  75. PSID AdminSid(BOOL fFetch);
  76. PSID InteractiveUserSid(BOOL fFetch);
  77. PSID SystemSid(BOOL fFetch);
  78. void InitWellknownSids();
  79. void UninitWellknownSids();
  80. #ifdef __cplusplus
  81. }
  82. #endif
  83. #endif //__UMTOOL_H_