VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/wincred.h@ 78046

Last change on this file since 78046 was 53206, checked in by vboxsync, 10 years ago

Devices/vmsvga: header fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 11.0 KB
Line 
1/*
2 * Copyright (C) 2006 Robert Shearman (for CodeWeavers)
3 *
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.
8 *
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.
13 *
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19/*
20 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#ifndef _WINCRED_H_
29#define _WINCRED_H_
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#ifdef _ADVAPI32_
36#define WINADVAPI
37#else
38#define WINADVAPI DECLSPEC_IMPORT
39#endif
40
41#ifndef __SECHANDLE_DEFINED__
42#define __SECHANDLE_DEFINED__
43typedef struct _SecHandle
44{
45 ULONG_PTR dwLower;
46 ULONG_PTR dwUpper;
47} SecHandle, *PSecHandle;
48#endif
49
50#ifndef __WINE_CTXTHANDLE_DEFINED__
51#define __WINE_CTXTHANDLE_DEFINED__
52typedef SecHandle CtxtHandle;
53typedef PSecHandle PCtxtHandle;
54#endif
55
56typedef struct _CREDENTIAL_ATTRIBUTEA
57{
58 LPSTR Keyword;
59 DWORD Flags;
60 DWORD ValueSize;
61 LPBYTE Value;
62} CREDENTIAL_ATTRIBUTEA, *PCREDENTIAL_ATTRIBUTEA;
63
64typedef struct _CREDENTIAL_ATTRIBUTEW
65{
66 LPWSTR Keyword;
67 DWORD Flags;
68 DWORD ValueSize;
69 LPBYTE Value;
70} CREDENTIAL_ATTRIBUTEW, *PCREDENTIAL_ATTRIBUTEW;
71
72DECL_WINELIB_TYPE_AW(CREDENTIAL_ATTRIBUTE)
73DECL_WINELIB_TYPE_AW(PCREDENTIAL_ATTRIBUTE)
74
75typedef struct _CREDENTIALA
76{
77 DWORD Flags;
78 DWORD Type;
79 LPSTR TargetName;
80 LPSTR Comment;
81 FILETIME LastWritten;
82 DWORD CredentialBlobSize;
83 LPBYTE CredentialBlob;
84 DWORD Persist;
85 DWORD AttributeCount;
86 PCREDENTIAL_ATTRIBUTEA Attributes;
87 LPSTR TargetAlias;
88 LPSTR UserName;
89} CREDENTIALA, *PCREDENTIALA;
90
91typedef struct _CREDENTIALW
92{
93 DWORD Flags;
94 DWORD Type;
95 LPWSTR TargetName;
96 LPWSTR Comment;
97 FILETIME LastWritten;
98 DWORD CredentialBlobSize;
99 LPBYTE CredentialBlob;
100 DWORD Persist;
101 DWORD AttributeCount;
102 PCREDENTIAL_ATTRIBUTEW Attributes;
103 LPWSTR TargetAlias;
104 LPWSTR UserName;
105} CREDENTIALW, *PCREDENTIALW;
106
107DECL_WINELIB_TYPE_AW(CREDENTIAL)
108DECL_WINELIB_TYPE_AW(PCREDENTIAL)
109
110typedef struct _CREDENTIAL_TARGET_INFORMATIONA
111{
112 LPSTR TargetName;
113 LPSTR NetbiosServerName;
114 LPSTR DnsServerName;
115 LPSTR NetbiosDomainName;
116 LPSTR DnsDomainName;
117 LPSTR DnsTreeName;
118 LPSTR PackageName;
119 DWORD Flags;
120 DWORD CredTypeCount;
121 LPDWORD CredTypes;
122} CREDENTIAL_TARGET_INFORMATIONA, *PCREDENTIAL_TARGET_INFORMATIONA;
123
124typedef struct _CREDENTIAL_TARGET_INFORMATIONW
125{
126 LPWSTR TargetName;
127 LPWSTR NetbiosServerName;
128 LPWSTR DnsServerName;
129 LPWSTR NetbiosDomainName;
130 LPWSTR DnsDomainName;
131 LPWSTR DnsTreeName;
132 LPWSTR PackageName;
133 DWORD Flags;
134 DWORD CredTypeCount;
135 LPDWORD CredTypes;
136} CREDENTIAL_TARGET_INFORMATIONW, *PCREDENTIAL_TARGET_INFORMATIONW;
137
138DECL_WINELIB_TYPE_AW(CREDENTIAL_TARGET_INFORMATION)
139DECL_WINELIB_TYPE_AW(PCREDENTIAL_TARGET_INFORMATION)
140
141typedef struct _CREDUI_INFOA
142{
143 DWORD cbSize;
144 HWND hwndParent;
145 PCSTR pszMessageText;
146 PCSTR pszCaptionText;
147 HBITMAP hbmBanner;
148} CREDUI_INFOA, *PCREDUI_INFOA;
149
150typedef struct _CREDUI_INFOW
151{
152 DWORD cbSize;
153 HWND hwndParent;
154 PCWSTR pszMessageText;
155 PCWSTR pszCaptionText;
156 HBITMAP hbmBanner;
157} CREDUI_INFOW, *PCREDUI_INFOW;
158
159DECL_WINELIB_TYPE_AW(CREDUI_INFO)
160DECL_WINELIB_TYPE_AW(PCREDUI_INFO)
161
162typedef enum _CRED_MARSHAL_TYPE
163{
164 CertCredential = 1,
165 UsernameTargetCredential,
166 BinaryBlobCredential
167} CRED_MARSHAL_TYPE, *PCRED_MARSHAL_TYPE;
168
169#define CERT_HASH_LENGTH 20
170
171typedef struct _CERT_CREDENTIAL_INFO
172{
173 ULONG cbSize;
174 UCHAR rgbHashOfCert[CERT_HASH_LENGTH];
175} CERT_CREDENTIAL_INFO, *PCERT_CREDENTIAL_INFO;
176
177typedef struct _USERNAME_TARGET_CREDENTIAL_INFO
178{
179 LPWSTR UserName;
180} USERNAME_TARGET_CREDENTIAL_INFO;
181
182typedef struct _BINARY_BLOB_CREDENTIAL_INFO
183{
184 ULONG cbBlob;
185 LPBYTE pbBlob;
186} BINARY_BLOB_CREDENTIAL_INFO, *PBINARY_BLOB_CREDENTIAL_INFO;
187
188#define CRED_MAX_STRING_LENGTH 256
189#define CRED_MAX_USERNAME_LENGTH 513
190#define CRED_MAX_GENERIC_TARGET_NAME_LENGTH 32767
191#define CRED_MAX_DOMAIN_TARGET_NAME_LENGTH 337
192#define CRED_MAX_VALUE_SIZE 256
193#define CRED_MAX_ATTRIBUTES 64
194
195#define CRED_MAX_BLOB_SIZE 512
196
197#define CREDUI_MAX_MESSAGE_LENGTH 32767
198#define CREDUI_MAX_CAPTION_LENGTH 128
199#define CREDUI_MAX_GENERIC_TARGET_LENGTH CRED_MAX_GENERIC_TARGET_NAME_LENGTH
200#define CREDUI_MAX_DOMAIN_TARGET_LENGTH CRED_MAX_DOMAIN_TARGET_LENGTH
201#define CREDUI_MAX_USERNAME_LENGTH CRED_MAX_USERNAME_LENGTH
202#define CREDUI_MAX_PASSWORD_LENGTH (CRED_MAX_CREDENTIAL_BLOB_SIZE / 2)
203
204/* flags for CREDENTIAL::Flags */
205#define CRED_FLAGS_PASSWORD_FOR_CERT 0x0001
206#define CRED_FLAGS_PROMPT_NOW 0x0002
207#define CRED_FLAGS_USERNAME_TARGET 0x0004
208#define CRED_FLAGS_OWF_CRED_BLOB 0x0008
209#define CRED_FLAGS_VALID_FLAGS 0x000f
210
211/* values for CREDENTIAL::Type */
212#define CRED_TYPE_GENERIC 1
213#define CRED_TYPE_DOMAIN_PASSWORD 2
214#define CRED_TYPE_DOMAIN_CERTIFICATE 3
215#define CRED_TYPE_DOMAIN_VISIBLE_PASSWORD 4
216#define CRED_TYPE_GENERIC_CERTIFICATE 5
217#define CRED_TYPE_MAXIMUM 6
218#define CRED_TYPE_MAXIMUM_EX (CRED_TYPE_MAXIMUM+1000)
219
220/* values for CREDENTIAL::Persist */
221#define CRED_PERSIST_NONE 0
222#define CRED_PERSIST_SESSION 1
223#define CRED_PERSIST_LOCAL_MACHINE 2
224#define CRED_PERSIST_ENTERPRISE 3
225
226/* values for CREDENTIAL_TARGET_INFORMATION::Flags */
227#define CRED_TI_SERVER_FORMAT_UNKNOWN 1
228#define CRED_TI_DOMAIN_FORMAT_UNKNOWN 2
229#define CRED_TI_ONLY_PASSWORD_REQUIRED 4
230
231#define CREDUI_FLAGS_INCORRECT_PASSWORD 0x00000001
232#define CREDUI_FLAGS_DO_NOT_PERSIST 0x00000002
233#define CREDUI_FLAGS_REQUEST_ADMINISTRATOR 0x00000004
234#define CREDUI_FLAGS_EXCLUDE_CERTIFICATES 0x00000008
235#define CREDUI_FLAGS_REQUIRE_CERTIFICATE 0x00000010
236#define CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX 0x00000040
237#define CREDUI_FLAGS_ALWAYS_SHOW_UI 0x00000080
238#define CREDUI_FLAGS_REQUIRE_SMARTCARD 0x00000100
239#define CREDUI_FLAGS_PASSWORD_ONLY_OK 0x00000200
240#define CREDUI_FLAGS_VALIDATE_USERNAME 0x00000400
241#define CREDUI_FLAGS_COMPLETE_USERNAME 0x00000800
242#define CREDUI_FLAGS_PERSIST 0x00001000
243#define CREDUI_FLAGS_SERVER_CREDENTIAL 0x00004000
244#define CREDUI_FLAGS_EXPECT_CONFIRMATION 0x00020000
245#define CREDUI_FLAGS_GENERIC_CREDENTIALS 0x00040000
246#define CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS 0x00080000
247#define CREDUI_FLAGS_KEEP_USERNAME 0x00100000
248
249/* flags for CredWrite and CredWriteDomainCredentials */
250#define CRED_PRESERVE_CREDENTIAL_BLOB 0x00000001
251
252WINADVAPI BOOL WINAPI CredDeleteA(LPCSTR,DWORD,DWORD);
253WINADVAPI BOOL WINAPI CredDeleteW(LPCWSTR,DWORD,DWORD);
254#define CredDelete WINELIB_NAME_AW(CredDelete)
255WINADVAPI BOOL WINAPI CredEnumerateA(LPCSTR,DWORD,DWORD *,PCREDENTIALA **);
256WINADVAPI BOOL WINAPI CredEnumerateW(LPCWSTR,DWORD,DWORD *,PCREDENTIALW **);
257#define CredEnumerate WINELIB_NAME_AW(CredEnumerate)
258WINADVAPI VOID WINAPI CredFree(PVOID);
259WINADVAPI BOOL WINAPI CredGetSessionTypes(DWORD,LPDWORD);
260WINADVAPI BOOL WINAPI CredIsMarshaledCredentialA(LPCSTR);
261WINADVAPI BOOL WINAPI CredIsMarshaledCredentialW(LPCWSTR);
262#define CredIsMarshaledCredential WINELIB_NAME_AW(CredIsMarshaledCredential)
263WINADVAPI BOOL WINAPI CredMarshalCredentialA(CRED_MARSHAL_TYPE,PVOID,LPSTR *);
264WINADVAPI BOOL WINAPI CredMarshalCredentialW(CRED_MARSHAL_TYPE,PVOID,LPWSTR *);
265#define CredMarshalCredential WINELIB_NAME_AW(CredMarshalCredential)
266WINADVAPI BOOL WINAPI CredReadA(LPCSTR,DWORD,DWORD,PCREDENTIALA *);
267WINADVAPI BOOL WINAPI CredReadW(LPCWSTR,DWORD,DWORD,PCREDENTIALW *);
268#define CredRead WINELIB_NAME_AW(CredRead)
269WINADVAPI BOOL WINAPI CredReadDomainCredentialsA(PCREDENTIAL_TARGET_INFORMATIONA,DWORD,DWORD *,PCREDENTIALA **);
270WINADVAPI BOOL WINAPI CredReadDomainCredentialsW(PCREDENTIAL_TARGET_INFORMATIONW,DWORD,DWORD *,PCREDENTIALW **);
271#define CredReadDomainCredentials WINELIB_NAME_AW(CredReadDomainCredentials)
272WINADVAPI BOOL WINAPI CredRenameA(LPCSTR,LPCSTR,DWORD,DWORD);
273WINADVAPI BOOL WINAPI CredRenameW(LPCWSTR,LPCWSTR,DWORD,DWORD);
274#define CredRename WINELIB_NAME_AW(CredRename)
275WINADVAPI BOOL WINAPI CredUnmarshalCredentialA(LPCSTR,PCRED_MARSHAL_TYPE,PVOID *);
276WINADVAPI BOOL WINAPI CredUnmarshalCredentialW(LPCWSTR,PCRED_MARSHAL_TYPE,PVOID *);
277#define CredUnmarshalCredential WINELIB_NAME_AW(CredUnmarshalCredential)
278WINADVAPI BOOL WINAPI CredWriteA(PCREDENTIALA,DWORD);
279WINADVAPI BOOL WINAPI CredWriteW(PCREDENTIALW,DWORD);
280#define CredWrite WINELIB_NAME_AW(CredWrite)
281
282DWORD WINAPI CredUICmdLinePromptForCredentialsW(PCWSTR,PCtxtHandle,DWORD,PWSTR,ULONG,PWSTR,ULONG,PBOOL,DWORD);
283DWORD WINAPI CredUICmdLinePromptForCredentialsA(PCSTR,PCtxtHandle,DWORD,PSTR,ULONG,PSTR,ULONG,PBOOL,DWORD);
284#define CredUICmdLinePromptForCredentials WINELIB_NAME_AW(CredUICmdLinePromptForCredentials)
285DWORD WINAPI CredUIConfirmCredentialsW(PCWSTR,BOOL);
286DWORD WINAPI CredUIConfirmCredentialsA(PCSTR,BOOL);
287#define CredUIConfirmCredentials WINELIB_NAME_AW(CredUIConfirmCredentials)
288DWORD WINAPI CredUIParseUserNameW(PCWSTR,PWSTR,ULONG,PWSTR,ULONG);
289DWORD WINAPI CredUIParseUserNameA(PCSTR,PSTR,ULONG,PSTR,ULONG);
290#define CredUIParseUserName WINELIB_NAME_AW(CredUIParseUserName)
291DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW,PCWSTR,PCtxtHandle,DWORD,PWSTR,ULONG,PWSTR,ULONG,PBOOL,DWORD);
292DWORD WINAPI CredUIPromptForCredentialsA(PCREDUI_INFOA,PCSTR,PCtxtHandle,DWORD,PSTR,ULONG,PSTR,ULONG,PBOOL,DWORD);
293#define CredUIPromptForCredentials WINELIB_NAME_AW(CredUIPromptForCredentials)
294DWORD WINAPI CredUIStoreSSOCredW(PCWSTR,PCWSTR,PCWSTR,BOOL);
295/* Note: no CredUIStoreSSOCredA in PSDK header */
296DWORD WINAPI CredUIReadSSOCredW(PCWSTR,PWSTR*);
297/* Note: no CredUIReadSSOCredA in PSDK header */
298
299#ifdef __cplusplus
300}
301#endif
302
303#endif /* _WINCRED_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette