hid: Add the hidsdi.h header.
[wine] / include / wincred.h
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 #ifndef _WINCRED_H_
20 #define _WINCRED_H_
21
22 #ifndef __SECHANDLE_DEFINED__
23 #define __SECHANDLE_DEFINED__
24 typedef struct _SecHandle
25 {
26     ULONG_PTR dwLower;
27     ULONG_PTR dwUpper;
28 } SecHandle, *PSecHandle;
29 #endif
30
31 typedef SecHandle CtxtHandle;
32 typedef PSecHandle PCtxtHandle;
33
34 typedef struct _CREDUI_INFOA
35 {
36     DWORD cbSize;
37     HWND hwndParent;
38     PCSTR pszMessageText;
39     PCSTR pszCaptionText;
40     HBITMAP hbmBanner;
41 } CREDUI_INFOA, *PCREDUI_INFOA;
42
43 typedef struct _CREDUI_INFOW
44 {
45     DWORD cbSize;
46     HWND hwndParent;
47     PCWSTR pszMessageText;
48     PCWSTR pszCaptionText;
49     HBITMAP hbmBanner;
50 } CREDUI_INFOW, *PCREDUI_INFOW;
51
52 #define CRED_MAX_STRING_LENGTH              256
53 #define CRED_MAX_USERNAME_LENGTH            513
54 #define CRED_MAX_GENERIC_TARGET_NAME_LENGTH 32767
55 #define CRED_MAX_DOMAIN_TARGET_NAME_LENGTH  337
56 #define CRED_MAX_VALUE_SIZE                 256
57 #define CRED_MAX_ATTRIBUTES                 64
58
59 #define CRED_MAX_BLOB_SIZE                  512
60
61 #define CREDUI_MAX_MESSAGE_LENGTH 32767
62 #define CREDUI_MAX_CAPTION_LENGTH 128
63 #define CREDUI_MAX_GENERIC_TARGET_LENGTH CRED_MAX_GENERIC_TARGET_NAME_LENGTH
64 #define CREDUI_MAX_DOMAIN_TARGET_LENGTH CRED_MAX_DOMAIN_TARGET_LENGTH
65 #define CREDUI_MAX_USERNAME_LENGTH CRED_MAX_USERNAME_LENGTH
66 #define CREDUI_MAX_PASSWORD_LENGTH (CRED_MAX_CREDENTIAL_BLOB_SIZE / 2)
67
68 #define CREDUI_FLAGS_INCORRECT_PASSWORD             0x00000001
69 #define CREDUI_FLAGS_DO_NOT_PERSIST                 0x00000002
70 #define CREDUI_FLAGS_REQUEST_ADMINISTRATOR          0x00000004
71 #define CREDUI_FLAGS_EXCLUDE_CERTIFICATES           0x00000008
72 #define CREDUI_FLAGS_REQUIRE_CERTIFICATE            0x00000010
73 #define CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX            0x00000040
74 #define CREDUI_FLAGS_ALWAYS_SHOW_UI                 0x00000080
75 #define CREDUI_FLAGS_REQUIRE_SMARTCARD              0x00000100
76 #define CREDUI_FLAGS_PASSWORD_ONLY_OK               0x00000200
77 #define CREDUI_FLAGS_VALIDATE_USERNAME              0x00000400
78 #define CREDUI_FLAGS_COMPLETE_USERNAME              0x00000800
79 #define CREDUI_FLAGS_PERSIST                        0x00001000
80 #define CREDUI_FLAGS_SERVER_CREDENTIAL              0x00004000
81 #define CREDUI_FLAGS_EXPECT_CONFIRMATION            0x00020000
82 #define CREDUI_FLAGS_GENERIC_CREDENTIALS            0x00040000
83 #define CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS    0x00080000
84 #define CREDUI_FLAGS_KEEP_USERNAME                  0x00100000
85
86 DWORD WINAPI CredUICmdLinePromptForCredentialsW(PCWSTR,PCWSTR,PCtxtHandle,DWORD,PWSTR,ULONG,PWSTR,ULONG,BOOL*,DWORD);
87 DWORD WINAPI CredUICmdLinePromptForCredentialsA(PCSTR,PCSTR,PCtxtHandle,DWORD,PSTR,ULONG,PSTR,ULONG,BOOL*,DWORD);
88 #define      CredUICmdLinePromptForCredentials WINELIB_NAME_AW(CredUICmdLinePromptForCredentials)
89 DWORD WINAPI CredUIConfirmCredentialsW(PCWSTR,BOOL);
90 DWORD WINAPI CredUIConfirmCredentialsA(PCSTR,BOOL);
91 #define      CredUIConfirmCredentials WINELIB_NAME_AW(CredUIConfirmCredentials)
92 DWORD WINAPI CredUIParseUserNameW(PCWSTR,PWSTR,ULONG,PWSTR,ULONG);
93 DWORD WINAPI CredUIParseUserNameA(PCSTR,PSTR,ULONG,PSTR,ULONG);
94 #define      CredUIParseUserName WINELIB_NAME_AW(CredUIParseUserName)
95 DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW,PCWSTR,PCtxtHandle,DWORD,PWSTR,ULONG,PWSTR,ULONG,BOOL*,DWORD);
96 DWORD WINAPI CredUIPromptForCredentialsA(PCREDUI_INFOA,PCSTR,PCtxtHandle,DWORD,PSTR,ULONG,PSTR,ULONG,BOOL*,DWORD);
97 #define      CredUIPromptForCredentials WINELIB_NAME_AW(CredUIPromptForCredentials)
98 DWORD WINAPI CredUIStoreSSOCredW(PCWSTR,PCWSTR,PCWSTR,BOOL);
99 /* Note: no CredUIStoreSSOCredA in PSDK header */
100 DWORD WINAPI CredUIReadSSOCredW(PCWSTR,PWSTR*);
101 /* Note: no CredUIReadSSOCredA in PSDK header */
102
103 #endif /* _WINCRED_H_ */