Store the kernel32 module handle globally to avoid some
[wine/multimedia.git] / include / ntsecapi.h
blob09adf8c0064486c960a18a2beeb9255b3e68499b
1 /*
2 * Copyright (C) 1999 Juergen Schmied
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_NTSECAPI_H
20 #define __WINE_NTSECAPI_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* defined(__cplusplus) */
26 /* Policy access rights */
27 #define POLICY_VIEW_LOCAL_INFORMATION 0x00000001L
28 #define POLICY_VIEW_AUDIT_INFORMATION 0x00000002L
29 #define POLICY_GET_PRIVATE_INFORMATION 0x00000004L
30 #define POLICY_TRUST_ADMIN 0x00000008L
31 #define POLICY_CREATE_ACCOUNT 0x00000010L
32 #define POLICY_CREATE_SECRET 0x00000020L
33 #define POLICY_CREATE_PRIVILEGE 0x00000040L
34 #define POLICY_SET_DEFAULT_QUOTA_LIMITS 0x00000080L
35 #define POLICY_SET_AUDIT_REQUIREMENTS 0x00000100L
36 #define POLICY_AUDIT_LOG_ADMIN 0x00000200L
37 #define POLICY_SERVER_ADMIN 0x00000400L
38 #define POLICY_LOOKUP_NAMES 0x00000800L
39 #define POLICY_NOTIFICATION 0x00001000L
41 #define POLICY_ALL_ACCESS ( \
42 STANDARD_RIGHTS_REQUIRED | \
43 POLICY_VIEW_LOCAL_INFORMATION | \
44 POLICY_VIEW_AUDIT_INFORMATION | \
45 POLICY_GET_PRIVATE_INFORMATION | \
46 POLICY_TRUST_ADMIN | \
47 POLICY_CREATE_ACCOUNT | \
48 POLICY_CREATE_SECRET | \
49 POLICY_CREATE_PRIVILEGE | \
50 POLICY_SET_DEFAULT_QUOTA_LIMITS | \
51 POLICY_SET_AUDIT_REQUIREMENTS | \
52 POLICY_AUDIT_LOG_ADMIN | \
53 POLICY_SERVER_ADMIN | \
54 POLICY_LOOKUP_NAMES)
57 #define POLICY_READ ( \
58 STANDARD_RIGHTS_READ | \
59 POLICY_VIEW_AUDIT_INFORMATION | \
60 POLICY_GET_PRIVATE_INFORMATION)
62 #define POLICY_WRITE ( \
63 STANDARD_RIGHTS_WRITE | \
64 POLICY_TRUST_ADMIN | \
65 POLICY_CREATE_ACCOUNT | \
66 POLICY_CREATE_SECRET | \
67 POLICY_CREATE_PRIVILEGE | \
68 POLICY_SET_DEFAULT_QUOTA_LIMITS | \
69 POLICY_SET_AUDIT_REQUIREMENTS | \
70 POLICY_AUDIT_LOG_ADMIN | \
71 POLICY_SERVER_ADMIN)
73 #define POLICY_EXECUTE ( \
74 STANDARD_RIGHTS_EXECUTE | \
75 POLICY_VIEW_LOCAL_INFORMATION | \
76 POLICY_LOOKUP_NAMES)
78 typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
79 typedef STRING LSA_STRING, *PLSA_STRING;
80 typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
82 typedef PVOID LSA_HANDLE, *PLSA_HANDLE;
84 NTSTATUS WINAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
86 typedef enum
88 PolicyAuditLogInformation = 1,
89 PolicyAuditEventsInformation,
90 PolicyPrimaryDomainInformation,
91 PolicyPdAccountInformation,
92 PolicyAccountDomainInformation,
93 PolicyLsaServerRoleInformation,
94 PolicyReplicaSourceInformation,
95 PolicyDefaultQuotaInformation,
96 PolicyModificationInformation,
97 PolicyAuditFullSetInformation,
98 PolicyAuditFullQueryInformation,
99 PolicyDnsDomainInformation
100 } POLICY_INFORMATION_CLASS, *PPOLICY_INFORMATION_CLASS;
102 typedef ULONG POLICY_AUDIT_EVENT_OPTIONS, *PPOLICY_AUDIT_EVENT_OPTIONS;
104 typedef struct _POLICY_AUDIT_EVENTS_INFO
106 BOOLEAN AuditingMode;
107 PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions;
108 ULONG MaximumAuditEventCount;
109 } POLICY_AUDIT_EVENTS_INFO, *PPOLICY_AUDIT_EVENTS_INFO;
111 typedef struct _POLICY_PRIMARY_DOMAIN_INFO
113 LSA_UNICODE_STRING Name;
114 PSID Sid;
115 } POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO;
117 typedef struct _POLICY_ACCOUNT_DOMAIN_INFO
119 LSA_UNICODE_STRING DomainName;
120 PSID DomainSid;
121 } POLICY_ACCOUNT_DOMAIN_INFO, *PPOLICY_ACCOUNT_DOMAIN_INFO;
124 NTSTATUS WINAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
126 NTSTATUS WINAPI LsaFreeMemory(PVOID);
127 NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle);
128 ULONG WINAPI LsaNtStatusToWinError(NTSTATUS Status);
131 #ifdef __cplusplus
132 } /* extern "C" */
133 #endif /* defined(__cplusplus) */
135 #endif /* !defined(__WINE_NTSECAPI_H) */