1*c2c66affSColin Finck /* 2*c2c66affSColin Finck * Copyright (C) 2006 Robert Shearman (for CodeWeavers) 3*c2c66affSColin Finck * 4*c2c66affSColin Finck * This library is free software; you can redistribute it and/or 5*c2c66affSColin Finck * modify it under the terms of the GNU Lesser General Public 6*c2c66affSColin Finck * License as published by the Free Software Foundation; either 7*c2c66affSColin Finck * version 2.1 of the License, or (at your option) any later version. 8*c2c66affSColin Finck * 9*c2c66affSColin Finck * This library is distributed in the hope that it will be useful, 10*c2c66affSColin Finck * but WITHOUT ANY WARRANTY; without even the implied warranty of 11*c2c66affSColin Finck * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12*c2c66affSColin Finck * Lesser General Public License for more details. 13*c2c66affSColin Finck * 14*c2c66affSColin Finck * You should have received a copy of the GNU Lesser General Public 15*c2c66affSColin Finck * License along with this library; if not, write to the Free Software 16*c2c66affSColin Finck * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 17*c2c66affSColin Finck */ 18*c2c66affSColin Finck 19*c2c66affSColin Finck #ifndef _WINCRED_H_ 20*c2c66affSColin Finck #define _WINCRED_H_ 21*c2c66affSColin Finck 22*c2c66affSColin Finck #ifdef __cplusplus 23*c2c66affSColin Finck extern "C" { 24*c2c66affSColin Finck #endif 25*c2c66affSColin Finck 26*c2c66affSColin Finck #ifdef _ADVAPI32_ 27*c2c66affSColin Finck #define WINADVAPI 28*c2c66affSColin Finck #else 29*c2c66affSColin Finck #define WINADVAPI DECLSPEC_IMPORT 30*c2c66affSColin Finck #endif 31*c2c66affSColin Finck 32*c2c66affSColin Finck #ifndef __SECHANDLE_DEFINED__ 33*c2c66affSColin Finck #define __SECHANDLE_DEFINED__ 34*c2c66affSColin Finck typedef struct _SecHandle 35*c2c66affSColin Finck { 36*c2c66affSColin Finck ULONG_PTR dwLower; 37*c2c66affSColin Finck ULONG_PTR dwUpper; 38*c2c66affSColin Finck } SecHandle, *PSecHandle; 39*c2c66affSColin Finck #endif 40*c2c66affSColin Finck 41*c2c66affSColin Finck #ifndef __WINE_CTXTHANDLE_DEFINED__ 42*c2c66affSColin Finck #define __WINE_CTXTHANDLE_DEFINED__ 43*c2c66affSColin Finck typedef SecHandle CtxtHandle; 44*c2c66affSColin Finck typedef PSecHandle PCtxtHandle; 45*c2c66affSColin Finck #endif 46*c2c66affSColin Finck 47*c2c66affSColin Finck typedef struct _CREDENTIAL_ATTRIBUTEA 48*c2c66affSColin Finck { 49*c2c66affSColin Finck LPSTR Keyword; 50*c2c66affSColin Finck DWORD Flags; 51*c2c66affSColin Finck DWORD ValueSize; 52*c2c66affSColin Finck LPBYTE Value; 53*c2c66affSColin Finck } CREDENTIAL_ATTRIBUTEA, *PCREDENTIAL_ATTRIBUTEA; 54*c2c66affSColin Finck 55*c2c66affSColin Finck typedef struct _CREDENTIAL_ATTRIBUTEW 56*c2c66affSColin Finck { 57*c2c66affSColin Finck LPWSTR Keyword; 58*c2c66affSColin Finck DWORD Flags; 59*c2c66affSColin Finck DWORD ValueSize; 60*c2c66affSColin Finck LPBYTE Value; 61*c2c66affSColin Finck } CREDENTIAL_ATTRIBUTEW, *PCREDENTIAL_ATTRIBUTEW; 62*c2c66affSColin Finck 63*c2c66affSColin Finck DECL_WINELIB_TYPE_AW(CREDENTIAL_ATTRIBUTE) 64*c2c66affSColin Finck DECL_WINELIB_TYPE_AW(PCREDENTIAL_ATTRIBUTE) 65*c2c66affSColin Finck 66*c2c66affSColin Finck typedef struct _CREDENTIALA 67*c2c66affSColin Finck { 68*c2c66affSColin Finck DWORD Flags; 69*c2c66affSColin Finck DWORD Type; 70*c2c66affSColin Finck LPSTR TargetName; 71*c2c66affSColin Finck LPSTR Comment; 72*c2c66affSColin Finck FILETIME LastWritten; 73*c2c66affSColin Finck DWORD CredentialBlobSize; 74*c2c66affSColin Finck _Field_size_bytes_(CredentialBlobSize) LPBYTE CredentialBlob; 75*c2c66affSColin Finck DWORD Persist; 76*c2c66affSColin Finck DWORD AttributeCount; 77*c2c66affSColin Finck PCREDENTIAL_ATTRIBUTEA Attributes; 78*c2c66affSColin Finck LPSTR TargetAlias; 79*c2c66affSColin Finck LPSTR UserName; 80*c2c66affSColin Finck } CREDENTIALA, *PCREDENTIALA; 81*c2c66affSColin Finck 82*c2c66affSColin Finck typedef struct _CREDENTIALW 83*c2c66affSColin Finck { 84*c2c66affSColin Finck DWORD Flags; 85*c2c66affSColin Finck DWORD Type; 86*c2c66affSColin Finck LPWSTR TargetName; 87*c2c66affSColin Finck LPWSTR Comment; 88*c2c66affSColin Finck FILETIME LastWritten; 89*c2c66affSColin Finck DWORD CredentialBlobSize; 90*c2c66affSColin Finck LPBYTE CredentialBlob; 91*c2c66affSColin Finck DWORD Persist; 92*c2c66affSColin Finck DWORD AttributeCount; 93*c2c66affSColin Finck PCREDENTIAL_ATTRIBUTEW Attributes; 94*c2c66affSColin Finck LPWSTR TargetAlias; 95*c2c66affSColin Finck LPWSTR UserName; 96*c2c66affSColin Finck } CREDENTIALW, *PCREDENTIALW; 97*c2c66affSColin Finck 98*c2c66affSColin Finck DECL_WINELIB_TYPE_AW(CREDENTIAL) 99*c2c66affSColin Finck DECL_WINELIB_TYPE_AW(PCREDENTIAL) 100*c2c66affSColin Finck 101*c2c66affSColin Finck typedef struct _CREDENTIAL_TARGET_INFORMATIONA 102*c2c66affSColin Finck { 103*c2c66affSColin Finck LPSTR TargetName; 104*c2c66affSColin Finck LPSTR NetbiosServerName; 105*c2c66affSColin Finck LPSTR DnsServerName; 106*c2c66affSColin Finck LPSTR NetbiosDomainName; 107*c2c66affSColin Finck LPSTR DnsDomainName; 108*c2c66affSColin Finck LPSTR DnsTreeName; 109*c2c66affSColin Finck LPSTR PackageName; 110*c2c66affSColin Finck DWORD Flags; 111*c2c66affSColin Finck DWORD CredTypeCount; 112*c2c66affSColin Finck LPDWORD CredTypes; 113*c2c66affSColin Finck } CREDENTIAL_TARGET_INFORMATIONA, *PCREDENTIAL_TARGET_INFORMATIONA; 114*c2c66affSColin Finck 115*c2c66affSColin Finck typedef struct _CREDENTIAL_TARGET_INFORMATIONW 116*c2c66affSColin Finck { 117*c2c66affSColin Finck LPWSTR TargetName; 118*c2c66affSColin Finck LPWSTR NetbiosServerName; 119*c2c66affSColin Finck LPWSTR DnsServerName; 120*c2c66affSColin Finck LPWSTR NetbiosDomainName; 121*c2c66affSColin Finck LPWSTR DnsDomainName; 122*c2c66affSColin Finck LPWSTR DnsTreeName; 123*c2c66affSColin Finck LPWSTR PackageName; 124*c2c66affSColin Finck DWORD Flags; 125*c2c66affSColin Finck DWORD CredTypeCount; 126*c2c66affSColin Finck LPDWORD CredTypes; 127*c2c66affSColin Finck } CREDENTIAL_TARGET_INFORMATIONW, *PCREDENTIAL_TARGET_INFORMATIONW; 128*c2c66affSColin Finck 129*c2c66affSColin Finck DECL_WINELIB_TYPE_AW(CREDENTIAL_TARGET_INFORMATION) 130*c2c66affSColin Finck DECL_WINELIB_TYPE_AW(PCREDENTIAL_TARGET_INFORMATION) 131*c2c66affSColin Finck 132*c2c66affSColin Finck typedef struct _CREDUI_INFOA 133*c2c66affSColin Finck { 134*c2c66affSColin Finck DWORD cbSize; 135*c2c66affSColin Finck HWND hwndParent; 136*c2c66affSColin Finck PCSTR pszMessageText; 137*c2c66affSColin Finck PCSTR pszCaptionText; 138*c2c66affSColin Finck HBITMAP hbmBanner; 139*c2c66affSColin Finck } CREDUI_INFOA, *PCREDUI_INFOA; 140*c2c66affSColin Finck 141*c2c66affSColin Finck typedef struct _CREDUI_INFOW 142*c2c66affSColin Finck { 143*c2c66affSColin Finck DWORD cbSize; 144*c2c66affSColin Finck HWND hwndParent; 145*c2c66affSColin Finck PCWSTR pszMessageText; 146*c2c66affSColin Finck PCWSTR pszCaptionText; 147*c2c66affSColin Finck HBITMAP hbmBanner; 148*c2c66affSColin Finck } CREDUI_INFOW, *PCREDUI_INFOW; 149*c2c66affSColin Finck 150*c2c66affSColin Finck DECL_WINELIB_TYPE_AW(CREDUI_INFO) 151*c2c66affSColin Finck DECL_WINELIB_TYPE_AW(PCREDUI_INFO) 152*c2c66affSColin Finck 153*c2c66affSColin Finck typedef enum _CRED_MARSHAL_TYPE 154*c2c66affSColin Finck { 155*c2c66affSColin Finck CertCredential = 1, 156*c2c66affSColin Finck UsernameTargetCredential, 157*c2c66affSColin Finck BinaryBlobCredential 158*c2c66affSColin Finck } CRED_MARSHAL_TYPE, *PCRED_MARSHAL_TYPE; 159*c2c66affSColin Finck 160*c2c66affSColin Finck #define CERT_HASH_LENGTH 20 161*c2c66affSColin Finck 162*c2c66affSColin Finck typedef struct _CERT_CREDENTIAL_INFO 163*c2c66affSColin Finck { 164*c2c66affSColin Finck ULONG cbSize; 165*c2c66affSColin Finck UCHAR rgbHashOfCert[CERT_HASH_LENGTH]; 166*c2c66affSColin Finck } CERT_CREDENTIAL_INFO, *PCERT_CREDENTIAL_INFO; 167*c2c66affSColin Finck 168*c2c66affSColin Finck typedef struct _USERNAME_TARGET_CREDENTIAL_INFO 169*c2c66affSColin Finck { 170*c2c66affSColin Finck LPWSTR UserName; 171*c2c66affSColin Finck } USERNAME_TARGET_CREDENTIAL_INFO; 172*c2c66affSColin Finck 173*c2c66affSColin Finck typedef struct _BINARY_BLOB_CREDENTIAL_INFO 174*c2c66affSColin Finck { 175*c2c66affSColin Finck ULONG cbBlob; 176*c2c66affSColin Finck LPBYTE pbBlob; 177*c2c66affSColin Finck } BINARY_BLOB_CREDENTIAL_INFO, *PBINARY_BLOB_CREDENTIAL_INFO; 178*c2c66affSColin Finck 179*c2c66affSColin Finck #define CRED_MAX_STRING_LENGTH 256 180*c2c66affSColin Finck #define CRED_MAX_USERNAME_LENGTH 513 181*c2c66affSColin Finck #define CRED_MAX_GENERIC_TARGET_NAME_LENGTH 32767 182*c2c66affSColin Finck #define CRED_MAX_DOMAIN_TARGET_NAME_LENGTH 337 183*c2c66affSColin Finck #define CRED_MAX_VALUE_SIZE 256 184*c2c66affSColin Finck #define CRED_MAX_ATTRIBUTES 64 185*c2c66affSColin Finck 186*c2c66affSColin Finck #define CRED_MAX_BLOB_SIZE 512 187*c2c66affSColin Finck #define CRED_MAX_CREDENTIAL_BLOB_SIZE (5 * CRED_MAX_BLOB_SIZE) 188*c2c66affSColin Finck 189*c2c66affSColin Finck #define CREDUI_MAX_MESSAGE_LENGTH 32767 190*c2c66affSColin Finck #define CREDUI_MAX_CAPTION_LENGTH 128 191*c2c66affSColin Finck #define CREDUI_MAX_GENERIC_TARGET_LENGTH CRED_MAX_GENERIC_TARGET_NAME_LENGTH 192*c2c66affSColin Finck #define CREDUI_MAX_DOMAIN_TARGET_LENGTH CRED_MAX_DOMAIN_TARGET_LENGTH 193*c2c66affSColin Finck #define CREDUI_MAX_USERNAME_LENGTH CRED_MAX_USERNAME_LENGTH 194*c2c66affSColin Finck #define CREDUI_MAX_PASSWORD_LENGTH (CRED_MAX_CREDENTIAL_BLOB_SIZE / 2) 195*c2c66affSColin Finck 196*c2c66affSColin Finck /* flags for CREDENTIAL::Flags */ 197*c2c66affSColin Finck #define CRED_FLAGS_PASSWORD_FOR_CERT 0x0001 198*c2c66affSColin Finck #define CRED_FLAGS_PROMPT_NOW 0x0002 199*c2c66affSColin Finck #define CRED_FLAGS_USERNAME_TARGET 0x0004 200*c2c66affSColin Finck #define CRED_FLAGS_OWF_CRED_BLOB 0x0008 201*c2c66affSColin Finck #define CRED_FLAGS_VALID_FLAGS 0x000f 202*c2c66affSColin Finck 203*c2c66affSColin Finck /* values for CREDENTIAL::Type */ 204*c2c66affSColin Finck #define CRED_TYPE_GENERIC 1 205*c2c66affSColin Finck #define CRED_TYPE_DOMAIN_PASSWORD 2 206*c2c66affSColin Finck #define CRED_TYPE_DOMAIN_CERTIFICATE 3 207*c2c66affSColin Finck #define CRED_TYPE_DOMAIN_VISIBLE_PASSWORD 4 208*c2c66affSColin Finck #define CRED_TYPE_GENERIC_CERTIFICATE 5 209*c2c66affSColin Finck #define CRED_TYPE_MAXIMUM 6 210*c2c66affSColin Finck #define CRED_TYPE_MAXIMUM_EX (CRED_TYPE_MAXIMUM+1000) 211*c2c66affSColin Finck 212*c2c66affSColin Finck /* values for CREDENTIAL::Persist */ 213*c2c66affSColin Finck #define CRED_PERSIST_NONE 0 214*c2c66affSColin Finck #define CRED_PERSIST_SESSION 1 215*c2c66affSColin Finck #define CRED_PERSIST_LOCAL_MACHINE 2 216*c2c66affSColin Finck #define CRED_PERSIST_ENTERPRISE 3 217*c2c66affSColin Finck 218*c2c66affSColin Finck /* values for CREDENTIAL_TARGET_INFORMATION::Flags */ 219*c2c66affSColin Finck #define CRED_TI_SERVER_FORMAT_UNKNOWN 1 220*c2c66affSColin Finck #define CRED_TI_DOMAIN_FORMAT_UNKNOWN 2 221*c2c66affSColin Finck #define CRED_TI_ONLY_PASSWORD_REQUIRED 4 222*c2c66affSColin Finck 223*c2c66affSColin Finck #define CREDUI_FLAGS_INCORRECT_PASSWORD 0x00000001 224*c2c66affSColin Finck #define CREDUI_FLAGS_DO_NOT_PERSIST 0x00000002 225*c2c66affSColin Finck #define CREDUI_FLAGS_REQUEST_ADMINISTRATOR 0x00000004 226*c2c66affSColin Finck #define CREDUI_FLAGS_EXCLUDE_CERTIFICATES 0x00000008 227*c2c66affSColin Finck #define CREDUI_FLAGS_REQUIRE_CERTIFICATE 0x00000010 228*c2c66affSColin Finck #define CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX 0x00000040 229*c2c66affSColin Finck #define CREDUI_FLAGS_ALWAYS_SHOW_UI 0x00000080 230*c2c66affSColin Finck #define CREDUI_FLAGS_REQUIRE_SMARTCARD 0x00000100 231*c2c66affSColin Finck #define CREDUI_FLAGS_PASSWORD_ONLY_OK 0x00000200 232*c2c66affSColin Finck #define CREDUI_FLAGS_VALIDATE_USERNAME 0x00000400 233*c2c66affSColin Finck #define CREDUI_FLAGS_COMPLETE_USERNAME 0x00000800 234*c2c66affSColin Finck #define CREDUI_FLAGS_PERSIST 0x00001000 235*c2c66affSColin Finck #define CREDUI_FLAGS_SERVER_CREDENTIAL 0x00004000 236*c2c66affSColin Finck #define CREDUI_FLAGS_EXPECT_CONFIRMATION 0x00020000 237*c2c66affSColin Finck #define CREDUI_FLAGS_GENERIC_CREDENTIALS 0x00040000 238*c2c66affSColin Finck #define CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS 0x00080000 239*c2c66affSColin Finck #define CREDUI_FLAGS_KEEP_USERNAME 0x00100000 240*c2c66affSColin Finck 241*c2c66affSColin Finck /* flags for CredWrite and CredWriteDomainCredentials */ 242*c2c66affSColin Finck #define CRED_PRESERVE_CREDENTIAL_BLOB 0x00000001 243*c2c66affSColin Finck 244*c2c66affSColin Finck WINADVAPI BOOL WINAPI CredDeleteA(_In_ LPCSTR, _In_ DWORD, _Reserved_ DWORD); 245*c2c66affSColin Finck WINADVAPI BOOL WINAPI CredDeleteW(_In_ LPCWSTR, _In_ DWORD, _Reserved_ DWORD); 246*c2c66affSColin Finck #define CredDelete WINELIB_NAME_AW(CredDelete) 247*c2c66affSColin Finck 248*c2c66affSColin Finck WINADVAPI 249*c2c66affSColin Finck BOOL 250*c2c66affSColin Finck WINAPI 251*c2c66affSColin Finck CredEnumerateA( 252*c2c66affSColin Finck _In_opt_ LPCSTR, 253*c2c66affSColin Finck _Reserved_ DWORD, 254*c2c66affSColin Finck _Out_ DWORD *Count, 255*c2c66affSColin Finck _Outptr_result_buffer_(*Count) PCREDENTIALA **); 256*c2c66affSColin Finck 257*c2c66affSColin Finck WINADVAPI 258*c2c66affSColin Finck BOOL 259*c2c66affSColin Finck WINAPI 260*c2c66affSColin Finck CredEnumerateW( 261*c2c66affSColin Finck _In_opt_ LPCWSTR, 262*c2c66affSColin Finck _Reserved_ DWORD, 263*c2c66affSColin Finck _Out_ DWORD *Count, 264*c2c66affSColin Finck _Outptr_result_buffer_(*Count) PCREDENTIALW **); 265*c2c66affSColin Finck 266*c2c66affSColin Finck #define CredEnumerate WINELIB_NAME_AW(CredEnumerate) 267*c2c66affSColin Finck 268*c2c66affSColin Finck WINADVAPI VOID WINAPI CredFree(_In_ PVOID); 269*c2c66affSColin Finck 270*c2c66affSColin Finck WINADVAPI 271*c2c66affSColin Finck BOOL 272*c2c66affSColin Finck WINAPI 273*c2c66affSColin Finck CredGetSessionTypes( 274*c2c66affSColin Finck _In_ DWORD MaximumPersistCount, 275*c2c66affSColin Finck _Out_writes_(MaximumPersistCount) LPDWORD); 276*c2c66affSColin Finck 277*c2c66affSColin Finck WINADVAPI BOOL WINAPI CredIsMarshaledCredentialA(_In_ LPCSTR); 278*c2c66affSColin Finck WINADVAPI BOOL WINAPI CredIsMarshaledCredentialW(_In_ LPCWSTR); 279*c2c66affSColin Finck #define CredIsMarshaledCredential WINELIB_NAME_AW(CredIsMarshaledCredential) 280*c2c66affSColin Finck 281*c2c66affSColin Finck WINADVAPI 282*c2c66affSColin Finck BOOL 283*c2c66affSColin Finck WINAPI 284*c2c66affSColin Finck CredMarshalCredentialA( 285*c2c66affSColin Finck _In_ CRED_MARSHAL_TYPE, 286*c2c66affSColin Finck _In_ PVOID, 287*c2c66affSColin Finck _Out_ LPSTR *); 288*c2c66affSColin Finck 289*c2c66affSColin Finck WINADVAPI 290*c2c66affSColin Finck BOOL 291*c2c66affSColin Finck WINAPI 292*c2c66affSColin Finck CredMarshalCredentialW( 293*c2c66affSColin Finck _In_ CRED_MARSHAL_TYPE, 294*c2c66affSColin Finck _In_ PVOID, 295*c2c66affSColin Finck _Out_ LPWSTR *); 296*c2c66affSColin Finck 297*c2c66affSColin Finck #define CredMarshalCredential WINELIB_NAME_AW(CredMarshalCredential) 298*c2c66affSColin Finck 299*c2c66affSColin Finck WINADVAPI 300*c2c66affSColin Finck BOOL 301*c2c66affSColin Finck WINAPI 302*c2c66affSColin Finck CredReadA( 303*c2c66affSColin Finck _In_ LPCSTR, 304*c2c66affSColin Finck _In_ DWORD, 305*c2c66affSColin Finck _Reserved_ DWORD, 306*c2c66affSColin Finck _Out_ PCREDENTIALA *); 307*c2c66affSColin Finck 308*c2c66affSColin Finck WINADVAPI 309*c2c66affSColin Finck BOOL 310*c2c66affSColin Finck WINAPI 311*c2c66affSColin Finck CredReadW( 312*c2c66affSColin Finck _In_ LPCWSTR, 313*c2c66affSColin Finck _In_ DWORD, 314*c2c66affSColin Finck _Reserved_ DWORD, 315*c2c66affSColin Finck _Out_ PCREDENTIALW *); 316*c2c66affSColin Finck 317*c2c66affSColin Finck #define CredRead WINELIB_NAME_AW(CredRead) 318*c2c66affSColin Finck 319*c2c66affSColin Finck WINADVAPI 320*c2c66affSColin Finck BOOL 321*c2c66affSColin Finck WINAPI 322*c2c66affSColin Finck CredReadDomainCredentialsA( 323*c2c66affSColin Finck _In_ PCREDENTIAL_TARGET_INFORMATIONA, 324*c2c66affSColin Finck _In_ DWORD, 325*c2c66affSColin Finck _Out_ DWORD *Count, 326*c2c66affSColin Finck _Outptr_result_buffer_(*Count) PCREDENTIALA **); 327*c2c66affSColin Finck 328*c2c66affSColin Finck WINADVAPI 329*c2c66affSColin Finck BOOL 330*c2c66affSColin Finck WINAPI 331*c2c66affSColin Finck CredReadDomainCredentialsW( 332*c2c66affSColin Finck _In_ PCREDENTIAL_TARGET_INFORMATIONW, 333*c2c66affSColin Finck _In_ DWORD, 334*c2c66affSColin Finck _Out_ DWORD *Count, 335*c2c66affSColin Finck _Outptr_result_buffer_(*Count) PCREDENTIALW **); 336*c2c66affSColin Finck 337*c2c66affSColin Finck #define CredReadDomainCredentials WINELIB_NAME_AW(CredReadDomainCredentials) 338*c2c66affSColin Finck 339*c2c66affSColin Finck WINADVAPI 340*c2c66affSColin Finck BOOL 341*c2c66affSColin Finck WINAPI 342*c2c66affSColin Finck CredRenameA( 343*c2c66affSColin Finck _In_ LPCSTR, 344*c2c66affSColin Finck _In_ LPCSTR, 345*c2c66affSColin Finck _In_ DWORD, 346*c2c66affSColin Finck _Reserved_ DWORD); 347*c2c66affSColin Finck 348*c2c66affSColin Finck WINADVAPI 349*c2c66affSColin Finck BOOL 350*c2c66affSColin Finck WINAPI 351*c2c66affSColin Finck CredRenameW( 352*c2c66affSColin Finck _In_ LPCWSTR, 353*c2c66affSColin Finck _In_ LPCWSTR, 354*c2c66affSColin Finck _In_ DWORD, 355*c2c66affSColin Finck _Reserved_ DWORD); 356*c2c66affSColin Finck 357*c2c66affSColin Finck #define CredRename WINELIB_NAME_AW(CredRename) 358*c2c66affSColin Finck 359*c2c66affSColin Finck WINADVAPI 360*c2c66affSColin Finck BOOL 361*c2c66affSColin Finck WINAPI 362*c2c66affSColin Finck CredUnmarshalCredentialA( 363*c2c66affSColin Finck _In_ LPCSTR, 364*c2c66affSColin Finck _Out_ PCRED_MARSHAL_TYPE, 365*c2c66affSColin Finck _Out_ PVOID *); 366*c2c66affSColin Finck 367*c2c66affSColin Finck WINADVAPI 368*c2c66affSColin Finck BOOL 369*c2c66affSColin Finck WINAPI 370*c2c66affSColin Finck CredUnmarshalCredentialW( 371*c2c66affSColin Finck _In_ LPCWSTR, 372*c2c66affSColin Finck _Out_ PCRED_MARSHAL_TYPE, 373*c2c66affSColin Finck _Out_ PVOID *); 374*c2c66affSColin Finck 375*c2c66affSColin Finck #define CredUnmarshalCredential WINELIB_NAME_AW(CredUnmarshalCredential) 376*c2c66affSColin Finck 377*c2c66affSColin Finck WINADVAPI BOOL WINAPI CredWriteA(_In_ PCREDENTIALA, _In_ DWORD); 378*c2c66affSColin Finck WINADVAPI BOOL WINAPI CredWriteW(_In_ PCREDENTIALW, _In_ DWORD); 379*c2c66affSColin Finck #define CredWrite WINELIB_NAME_AW(CredWrite) 380*c2c66affSColin Finck 381*c2c66affSColin Finck DWORD 382*c2c66affSColin Finck WINAPI 383*c2c66affSColin Finck CredUICmdLinePromptForCredentialsW( 384*c2c66affSColin Finck _In_opt_ PCWSTR, 385*c2c66affSColin Finck _Reserved_ PCtxtHandle, 386*c2c66affSColin Finck _In_ DWORD, 387*c2c66affSColin Finck _Inout_updates_(ulUserBufferSize) PWSTR, 388*c2c66affSColin Finck _In_ ULONG ulUserBufferSize, 389*c2c66affSColin Finck _Inout_updates_(ulPasswordBufferSize) PWSTR, 390*c2c66affSColin Finck _In_ ULONG ulPasswordBufferSize, 391*c2c66affSColin Finck _Inout_opt_ PBOOL, 392*c2c66affSColin Finck _In_ DWORD); 393*c2c66affSColin Finck 394*c2c66affSColin Finck DWORD 395*c2c66affSColin Finck WINAPI 396*c2c66affSColin Finck CredUICmdLinePromptForCredentialsA( 397*c2c66affSColin Finck _In_opt_ PCSTR, 398*c2c66affSColin Finck _Reserved_ PCtxtHandle, 399*c2c66affSColin Finck _In_ DWORD, 400*c2c66affSColin Finck _Inout_updates_(ulUserBufferSize) PSTR, 401*c2c66affSColin Finck _In_ ULONG ulUserBufferSize, 402*c2c66affSColin Finck _Inout_updates_(ulPasswordBufferSize) PSTR, 403*c2c66affSColin Finck _In_ ULONG ulPasswordBufferSize, 404*c2c66affSColin Finck _Inout_opt_ PBOOL, 405*c2c66affSColin Finck _In_ DWORD); 406*c2c66affSColin Finck 407*c2c66affSColin Finck #define CredUICmdLinePromptForCredentials WINELIB_NAME_AW(CredUICmdLinePromptForCredentials) 408*c2c66affSColin Finck 409*c2c66affSColin Finck DWORD WINAPI CredUIConfirmCredentialsW(_In_ PCWSTR, _In_ BOOL); 410*c2c66affSColin Finck DWORD WINAPI CredUIConfirmCredentialsA(_In_ PCSTR, _In_ BOOL); 411*c2c66affSColin Finck #define CredUIConfirmCredentials WINELIB_NAME_AW(CredUIConfirmCredentials) 412*c2c66affSColin Finck 413*c2c66affSColin Finck DWORD 414*c2c66affSColin Finck WINAPI 415*c2c66affSColin Finck CredUIParseUserNameW( 416*c2c66affSColin Finck _In_ PCWSTR, 417*c2c66affSColin Finck _Out_writes_(userBufferSize) PWSTR, 418*c2c66affSColin Finck _In_ ULONG userBufferSize, 419*c2c66affSColin Finck _Out_writes_(domainBufferSize) PWSTR, 420*c2c66affSColin Finck _In_ ULONG domainBufferSize); 421*c2c66affSColin Finck 422*c2c66affSColin Finck DWORD 423*c2c66affSColin Finck WINAPI 424*c2c66affSColin Finck CredUIParseUserNameA( 425*c2c66affSColin Finck _In_ PCSTR, 426*c2c66affSColin Finck _Out_writes_(userBufferSize) PSTR, 427*c2c66affSColin Finck _In_ ULONG userBufferSize, 428*c2c66affSColin Finck _Out_writes_(domainBufferSize) PSTR, 429*c2c66affSColin Finck _In_ ULONG domainBufferSize); 430*c2c66affSColin Finck 431*c2c66affSColin Finck #define CredUIParseUserName WINELIB_NAME_AW(CredUIParseUserName) 432*c2c66affSColin Finck 433*c2c66affSColin Finck DWORD 434*c2c66affSColin Finck WINAPI 435*c2c66affSColin Finck CredUIPromptForCredentialsW( 436*c2c66affSColin Finck _In_opt_ PCREDUI_INFOW, 437*c2c66affSColin Finck _In_opt_ PCWSTR, 438*c2c66affSColin Finck _Reserved_ PCtxtHandle, 439*c2c66affSColin Finck _In_ DWORD, 440*c2c66affSColin Finck _Inout_updates_(ulUserNameBufferSize) PWSTR, 441*c2c66affSColin Finck _In_ ULONG ulUserNameBufferSize, 442*c2c66affSColin Finck _Inout_updates_(ulPasswordBufferSize) PWSTR, 443*c2c66affSColin Finck _In_ ULONG ulPasswordBufferSize, 444*c2c66affSColin Finck _Inout_opt_ PBOOL, 445*c2c66affSColin Finck _In_ DWORD); 446*c2c66affSColin Finck 447*c2c66affSColin Finck DWORD 448*c2c66affSColin Finck WINAPI 449*c2c66affSColin Finck CredUIPromptForCredentialsA( 450*c2c66affSColin Finck _In_opt_ PCREDUI_INFOA, 451*c2c66affSColin Finck _In_opt_ PCSTR, 452*c2c66affSColin Finck _Reserved_ PCtxtHandle, 453*c2c66affSColin Finck _In_ DWORD, 454*c2c66affSColin Finck _Inout_updates_(ulUserNameBufferSize) PSTR, 455*c2c66affSColin Finck _In_ ULONG ulUserNameBufferSize, 456*c2c66affSColin Finck _Inout_updates_(ulPasswordBufferSize) PSTR, 457*c2c66affSColin Finck _In_ ULONG ulPasswordBufferSize, 458*c2c66affSColin Finck _Inout_opt_ PBOOL, 459*c2c66affSColin Finck _In_ DWORD); 460*c2c66affSColin Finck 461*c2c66affSColin Finck #define CredUIPromptForCredentials WINELIB_NAME_AW(CredUIPromptForCredentials) 462*c2c66affSColin Finck 463*c2c66affSColin Finck DWORD 464*c2c66affSColin Finck WINAPI 465*c2c66affSColin Finck CredUIStoreSSOCredW( 466*c2c66affSColin Finck _In_opt_ PCWSTR, 467*c2c66affSColin Finck _In_ PCWSTR, 468*c2c66affSColin Finck _In_ PCWSTR, 469*c2c66affSColin Finck _In_ BOOL); 470*c2c66affSColin Finck 471*c2c66affSColin Finck /* Note: no CredUIStoreSSOCredA in PSDK header */ 472*c2c66affSColin Finck DWORD WINAPI CredUIReadSSOCredW(_In_opt_ PCWSTR, _Outptr_ PWSTR*); 473*c2c66affSColin Finck /* Note: no CredUIReadSSOCredA in PSDK header */ 474*c2c66affSColin Finck 475*c2c66affSColin Finck #ifdef __cplusplus 476*c2c66affSColin Finck } 477*c2c66affSColin Finck #endif 478*c2c66affSColin Finck 479*c2c66affSColin Finck #endif /* _WINCRED_H_ */ 480