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.

38 lines
2.0 KiB

  1. class ISAUserInfo : public IDispatch
  2. {
  3. public:
  4. virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSAUsers(
  5. /* [out] */ VARIANT __RPC_FAR *pbstrArrUsers,
  6. /* [out] */ VARIANT __RPC_FAR *pboolArrUserTypes,
  7. /* [out] */ VARIANT __RPC_FAR *pSidArrUserSids,
  8. /* [in] */ VARIANT_BOOL vboolWantSid,
  9. /* [retval][out] */ VARIANT_BOOL __RPC_FAR *vboolRetVal) = 0;
  10. virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetFileAccessAllowedAces(
  11. /* [in] */ BSTR bstrFileName,
  12. /* [out] */ VARIANT __RPC_FAR *pvArrSid,
  13. /* [retval][out] */ VARIANT_BOOL __RPC_FAR *vboolRetVal) = 0;
  14. virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetFileAccessAllowedAces(
  15. /* [in] */ BSTR bstrFileName,
  16. /* [in] */ VARIANT __RPC_FAR *pvArrSid,
  17. /* [retval][out] */ VARIANT_BOOL __RPC_FAR *vboolRetVal) = 0;
  18. virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE DoIHaveAccess(
  19. /* [in] */ BSTR bstrFileName,
  20. /* [retval][out] */ VARIANT_BOOL __RPC_FAR *vboolRetVal) = 0;
  21. };
  22. const IID IID_ISAUserInfo = {0x84F238D0,0xA0D7,0x11D2,{0x85,0x52,0x00,0x10,0x4B,0xCC,0x1E,0xCB}};
  23. const CLSID CLSID_SAUserInfo = {0x84F238D1,0xA0D7,0x11D2,{0x85,0x52,0x00,0x10,0x4B,0xCC,0x1E,0xCB}};
  24. HRESULT GetUserList(ISAUserInfo *pSAUserInfo, BSTR **ppbstrSAUserNames, VARIANT_BOOL **ppvboolUserTypes, PSID **ppsidSAUsers, LONG **ppsidSAUsersLength, DWORD *pdwNumSAUsers);
  25. HRESULT UnpackSidFromVariant(VARIANT *pvarSid, PSID *ppSid, LONG *plSidLength);
  26. void ShowUsersAllowedAccess(BSTR bstrSAUserNames[], VARIANT_BOOL vboolIsSAUserAdmin[], PSID ppsidSAUsers[], PSID ppsidAAUsers[], DWORD dwNumSAUsers, DWORD dwNumAASids);
  27. VARIANT_BOOL UserSidFound(PSID psidSAUser, LONG psidSAUserLength, PSID ppsidAAUsers[], LONG ppsidAAUsersLength[], DWORD dwNumAASids);
  28. HRESULT PackSidInVariant(VARIANT **ppVarSid, PSID pSid, LONG lSidLength);