home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 April / PCWorld_2008-04_cd.bin / temacd / devc++ / devcpp-4.9.9.2_setup.exe / aclapi.h < prev    next >
C/C++ Source or Header  |  2005-01-29  |  6KB  |  118 lines

  1. #ifndef _ACLAPI_H
  2. #define _ACLAPI_H
  3. #if __GNUC__ >= 3
  4. #pragma GCC system_header
  5. #endif
  6.  
  7. #include <windows.h>
  8. #include <accctrl.h>
  9.  
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13.  
  14. VOID WINAPI BuildExplicitAccessWithNameA(PEXPLICIT_ACCESS_A,LPSTR,DWORD,ACCESS_MODE,DWORD);
  15. VOID WINAPI BuildExplicitAccessWithNameW(PEXPLICIT_ACCESS_W,LPWSTR,DWORD,ACCESS_MODE,DWORD);
  16. DWORD WINAPI BuildSecurityDescriptorA(PTRUSTEE_A,PTRUSTEE_A ,ULONG,PEXPLICIT_ACCESS_A,
  17.   ULONG,PEXPLICIT_ACCESS_A,PSECURITY_DESCRIPTOR,PULONG,PSECURITY_DESCRIPTOR*);
  18. DWORD WINAPI BuildSecurityDescriptorW(PTRUSTEE_W,PTRUSTEE_W ,ULONG,PEXPLICIT_ACCESS_W,
  19.   ULONG,PEXPLICIT_ACCESS_W,PSECURITY_DESCRIPTOR,PULONG,PSECURITY_DESCRIPTOR*);
  20. VOID WINAPI BuildTrusteeWithNameA(PTRUSTEE_A,LPSTR);
  21. VOID WINAPI BuildTrusteeWithNameW(PTRUSTEE_W,LPWSTR);
  22. VOID WINAPI BuildTrusteeWithObjectsAndNameA(PTRUSTEE_A,POBJECTS_AND_NAME_A,SE_OBJECT_TYPE,
  23.   LPSTR,LPSTR,LPSTR);
  24. VOID WINAPI BuildTrusteeWithObjectsAndNameW(PTRUSTEE_W,POBJECTS_AND_NAME_W,SE_OBJECT_TYPE,
  25.   LPWSTR,LPWSTR,LPWSTR);
  26. VOID WINAPI BuildTrusteeWithObjectsAndSidA(PTRUSTEE_A,POBJECTS_AND_SID,GUID*,GUID*,PSID);
  27. VOID WINAPI BuildTrusteeWithObjectsAndSidW(PTRUSTEE_W,POBJECTS_AND_SID,GUID*,GUID*,PSID);
  28. VOID WINAPI BuildTrusteeWithSidA(PTRUSTEE_A,PSID);
  29. VOID WINAPI BuildTrusteeWithSidW(PTRUSTEE_W,PSID);
  30. DWORD WINAPI GetAuditedPermissionsFromAclA(PACL,PTRUSTEE_A,PACCESS_MASK,PACCESS_MASK);
  31. DWORD WINAPI GetAuditedPermissionsFromAclW(PACL,PTRUSTEE_W,PACCESS_MASK,PACCESS_MASK);
  32. DWORD WINAPI GetEffectiveRightsFromAclA(PACL,PTRUSTEE_A,PACCESS_MASK);
  33. DWORD WINAPI GetEffectiveRightsFromAclW(PACL,PTRUSTEE_W,PACCESS_MASK);
  34. DWORD WINAPI GetExplicitEntriesFromAclA(PACL,PULONG,PEXPLICIT_ACCESS_A*);
  35. DWORD WINAPI GetExplicitEntriesFromAclW(PACL,PULONG,PEXPLICIT_ACCESS_W*);
  36. #if (_WIN32_WINNT >= 0x0501)
  37. DWORD WINAPI GetInheritanceSourceA(LPSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,BOOL,GUID**,DWORD,PACL,void*,PGENERIC_MAPPING,PINHERITED_FROMA);
  38. DWORD WINAPI GetInheritanceSourceW(LPWSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,BOOL,GUID**,DWORD,PACL,void*,PGENERIC_MAPPING,PINHERITED_FROMW);
  39. #endif
  40. DWORD WINAPI GetNamedSecurityInfoA(LPSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,
  41.   PSID*,PSID*,PACL*,PACL*,PSECURITY_DESCRIPTOR*);
  42. DWORD WINAPI GetNamedSecurityInfoW(LPWSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,
  43.   PSID*,PSID*,PACL*,PACL*,PSECURITY_DESCRIPTOR*);
  44. DWORD WINAPI GetSecurityInfo(HANDLE,SE_OBJECT_TYPE,SECURITY_INFORMATION,
  45.   PSID*,PSID*,PACL*,PACL*,PSECURITY_DESCRIPTOR*);
  46. TRUSTEE_FORM WINAPI GetTrusteeFormA(PTRUSTEE_A);
  47. TRUSTEE_FORM WINAPI GetTrusteeFormW(PTRUSTEE_W);
  48. LPSTR WINAPI GetTrusteeNameA(PTRUSTEE_A);
  49. LPWSTR WINAPI GetTrusteeNameW(PTRUSTEE_W);
  50. TRUSTEE_TYPE WINAPI GetTrusteeTypeA(PTRUSTEE_A);
  51. TRUSTEE_TYPE WINAPI GetTrusteeTypeW(PTRUSTEE_W);
  52. DWORD WINAPI LookupSecurityDescriptorPartsA(PTRUSTEE_A*,PTRUSTEE_A*,PULONG,PEXPLICIT_ACCESS_A*,
  53.   PULONG,PEXPLICIT_ACCESS_A*,PSECURITY_DESCRIPTOR);
  54. DWORD WINAPI LookupSecurityDescriptorPartsW(PTRUSTEE_W*,PTRUSTEE_W*,PULONG,PEXPLICIT_ACCESS_W*,
  55.   PULONG,PEXPLICIT_ACCESS_W*,PSECURITY_DESCRIPTOR);
  56. DWORD WINAPI SetEntriesInAclA(ULONG,PEXPLICIT_ACCESS_A,PACL,PACL*);
  57. DWORD WINAPI SetEntriesInAclW(ULONG,PEXPLICIT_ACCESS_W,PACL,PACL*);
  58. DWORD WINAPI SetNamedSecurityInfoA(LPSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,PSID,PSID,PACL,PACL);
  59. DWORD WINAPI SetNamedSecurityInfoW(LPWSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,PSID,PSID,PACL,PACL);
  60. DWORD WINAPI SetSecurityInfo(HANDLE,SE_OBJECT_TYPE,SECURITY_INFORMATION,PSID,PSID,PACL,PACL);
  61. VOID WINAPI BuildImpersonateExplicitAccessWithNameA(PEXPLICIT_ACCESS_A,LPSTR,PTRUSTEE_A,DWORD,ACCESS_MODE,DWORD);
  62. VOID WINAPI BuildImpersonateExplicitAccessWithNameW(PEXPLICIT_ACCESS_W,LPWSTR,PTRUSTEE_W,DWORD,ACCESS_MODE,DWORD);
  63. VOID WINAPI BuildImpersonateTrusteeA(PTRUSTEE_A,PTRUSTEE_A);
  64. VOID WINAPI BuildImpersonateTrusteeW(PTRUSTEE_W,PTRUSTEE_W);
  65. PTRUSTEE_A WINAPI GetMultipleTrusteeA(PTRUSTEE_A);
  66. PTRUSTEE_W WINAPI GetMultipleTrusteeW(PTRUSTEE_W);
  67. MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationA(PTRUSTEE_A);
  68. MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationW(PTRUSTEE_W);
  69.  
  70. #ifdef UNICODE
  71. #define BuildExplicitAccessWithName  BuildExplicitAccessWithNameW
  72. #define BuildSecurityDescriptor  BuildSecurityDescriptorW
  73. #define BuildTrusteeWithName  BuildTrusteeWithNameW
  74. #define BuildTrusteeWithObjectsAndName  BuildTrusteeWithObjectsAndNameW
  75. #define BuildTrusteeWithObjectsAndSid  BuildTrusteeWithObjectsAndSidW
  76. #define BuildTrusteeWithSid  BuildTrusteeWithSidW
  77. #define GetAuditedPermissionsFromAcl  GetAuditedPermissionsFromAclW
  78. #define GetEffectiveRightsFromAcl  GetEffectiveRightsFromAclW
  79. #define GetExplicitEntriesFromAcl  GetExplicitEntriesFromAclW
  80. #define GetNamedSecurityInfo  GetNamedSecurityInfoW
  81. #define GetTrusteeForm  GetTrusteeFormW
  82. #define GetTrusteeName  GetTrusteeNameW
  83. #define GetTrusteeType  GetTrusteeTypeW
  84. #define LookupSecurityDescriptorParts  LookupSecurityDescriptorPartsW
  85. #define SetEntriesInAcl  SetEntriesInAclW
  86. #define SetNamedSecurityInfo  SetNamedSecurityInfoW
  87. #define BuildImpersonateExplicitAccessWithName  BuildImpersonateExplicitAccessWithNameW
  88. #define BuildImpersonateTrustee  BuildImpersonateTrusteeW
  89. #define GetMultipleTrustee  GetMultipleTrusteeW
  90. #define GetMultipleTrusteeOperation  GetMultipleTrusteeOperationW
  91. #else
  92. #define BuildExplicitAccessWithName  BuildExplicitAccessWithNameA
  93. #define BuildSecurityDescriptor  BuildSecurityDescriptorA
  94. #define BuildTrusteeWithName  BuildTrusteeWithNameA
  95. #define BuildTrusteeWithObjectsAndName  BuildTrusteeWithObjectsAndNameA
  96. #define BuildTrusteeWithObjectsAndSid  BuildTrusteeWithObjectsAndSidA
  97. #define BuildTrusteeWithSid  BuildTrusteeWithSidA
  98. #define GetAuditedPermissionsFromAcl  GetAuditedPermissionsFromAclA
  99. #define GetEffectiveRightsFromAcl  GetEffectiveRightsFromAclA
  100. #define GetExplicitEntriesFromAcl  GetExplicitEntriesFromAclA
  101. #define GetNamedSecurityInfo  GetNamedSecurityInfoA
  102. #define GetTrusteeForm  GetTrusteeFormA
  103. #define GetTrusteeName  GetTrusteeNameA
  104. #define GetTrusteeType  GetTrusteeTypeA
  105. #define LookupSecurityDescriptorParts  LookupSecurityDescriptorPartsA
  106. #define SetEntriesInAcl  SetEntriesInAclA
  107. #define SetNamedSecurityInfo  SetNamedSecurityInfoA
  108. #define BuildImpersonateExplicitAccessWithName  BuildImpersonateExplicitAccessWithNameA
  109. #define BuildImpersonateTrustee  BuildImpersonateTrusteeA
  110. #define GetMultipleTrustee  GetMultipleTrusteeA
  111. #define GetMultipleTrusteeOperation  GetMultipleTrusteeOperationA
  112. #endif /* UNICODE */
  113.  
  114. #ifdef __cplusplus
  115. }
  116. #endif
  117. #endif
  118.