Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenwincred.h
Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 2006 Robert Shearman (for CodeWeavers) 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00017 */ 00018 00019 #ifndef _WINCRED_H_ 00020 #define _WINCRED_H_ 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00026 #ifndef __SECHANDLE_DEFINED__ 00027 #define __SECHANDLE_DEFINED__ 00028 typedef struct _SecHandle 00029 { 00030 ULONG_PTR dwLower; 00031 ULONG_PTR dwUpper; 00032 } SecHandle, *PSecHandle; 00033 #endif 00034 00035 typedef SecHandle CtxtHandle; 00036 typedef PSecHandle PCtxtHandle; 00037 00038 typedef struct _CREDENTIAL_ATTRIBUTEA 00039 { 00040 LPSTR Keyword; 00041 DWORD Flags; 00042 DWORD ValueSize; 00043 LPBYTE Value; 00044 } CREDENTIAL_ATTRIBUTEA, *PCREDENTIAL_ATTRIBUTEA; 00045 00046 typedef struct _CREDENTIAL_ATTRIBUTEW 00047 { 00048 LPWSTR Keyword; 00049 DWORD Flags; 00050 DWORD ValueSize; 00051 LPBYTE Value; 00052 } CREDENTIAL_ATTRIBUTEW, *PCREDENTIAL_ATTRIBUTEW; 00053 00054 DECL_WINELIB_TYPE_AW(CREDENTIAL_ATTRIBUTE) 00055 DECL_WINELIB_TYPE_AW(PCREDENTIAL_ATTRIBUTE) 00056 00057 typedef struct _CREDENTIALA 00058 { 00059 DWORD Flags; 00060 DWORD Type; 00061 LPSTR TargetName; 00062 LPSTR Comment; 00063 FILETIME LastWritten; 00064 DWORD CredentialBlobSize; 00065 LPBYTE CredentialBlob; 00066 DWORD Persist; 00067 DWORD AttributeCount; 00068 PCREDENTIAL_ATTRIBUTEA Attributes; 00069 LPSTR TargetAlias; 00070 LPSTR UserName; 00071 } CREDENTIALA, *PCREDENTIALA; 00072 00073 typedef struct _CREDENTIALW 00074 { 00075 DWORD Flags; 00076 DWORD Type; 00077 LPWSTR TargetName; 00078 LPWSTR Comment; 00079 FILETIME LastWritten; 00080 DWORD CredentialBlobSize; 00081 LPBYTE CredentialBlob; 00082 DWORD Persist; 00083 DWORD AttributeCount; 00084 PCREDENTIAL_ATTRIBUTEW Attributes; 00085 LPWSTR TargetAlias; 00086 LPWSTR UserName; 00087 } CREDENTIALW, *PCREDENTIALW; 00088 00089 DECL_WINELIB_TYPE_AW(CREDENTIAL) 00090 DECL_WINELIB_TYPE_AW(PCREDENTIAL) 00091 00092 typedef struct _CREDUI_INFOA 00093 { 00094 DWORD cbSize; 00095 HWND hwndParent; 00096 PCSTR pszMessageText; 00097 PCSTR pszCaptionText; 00098 HBITMAP hbmBanner; 00099 } CREDUI_INFOA, *PCREDUI_INFOA; 00100 00101 typedef struct _CREDUI_INFOW 00102 { 00103 DWORD cbSize; 00104 HWND hwndParent; 00105 PCWSTR pszMessageText; 00106 PCWSTR pszCaptionText; 00107 HBITMAP hbmBanner; 00108 } CREDUI_INFOW, *PCREDUI_INFOW; 00109 00110 typedef enum _CRED_MARSHAL_TYPE { 00111 CertCredential = 1, 00112 UsernameTargetCredential 00113 } CRED_MARSHAL_TYPE, *PCRED_MARSHAL_TYPE; 00114 00115 typedef struct _CREDENTIAL_TARGET_INFORMATIONA { 00116 LPSTR TargetName; 00117 LPSTR NetbiosServerName; 00118 LPSTR DnsServerName; 00119 LPSTR NetbiosDomainName; 00120 LPSTR DnsDomainName; 00121 LPSTR DnsTreeName; 00122 LPSTR PackageName; 00123 ULONG Flags; 00124 DWORD CredTypeCount; 00125 LPDWORD CredTypes; 00126 } CREDENTIAL_TARGET_INFORMATIONA, *PCREDENTIAL_TARGET_INFORMATIONA; 00127 00128 typedef struct _CREDENTIAL_TARGET_INFORMATIONW { 00129 LPWSTR TargetName; 00130 LPWSTR NetbiosServerName; 00131 LPWSTR DnsServerName; 00132 LPWSTR NetbiosDomainName; 00133 LPWSTR DnsDomainName; 00134 LPWSTR DnsTreeName; 00135 LPWSTR PackageName; 00136 ULONG Flags; 00137 DWORD CredTypeCount; 00138 LPDWORD CredTypes; 00139 } CREDENTIAL_TARGET_INFORMATIONW, *PCREDENTIAL_TARGET_INFORMATIONW; 00140 00141 #ifdef UNICODE 00142 typedef CREDENTIAL_TARGET_INFORMATIONW CREDENTIAL_TARGET_INFORMATION; 00143 typedef PCREDENTIAL_TARGET_INFORMATIONW PCREDENTIAL_TARGET_INFORMATION; 00144 #else 00145 typedef CREDENTIAL_TARGET_INFORMATIONA CREDENTIAL_TARGET_INFORMATION; 00146 typedef PCREDENTIAL_TARGET_INFORMATIONA PCREDENTIAL_TARGET_INFORMATION; 00147 #endif /* UNICODE */ 00148 00149 DECL_WINELIB_TYPE_AW(CREDUI_INFO) 00150 DECL_WINELIB_TYPE_AW(PCREDUI_INFO) 00151 00152 #define CRED_MAX_STRING_LENGTH 256 00153 #define CRED_MAX_USERNAME_LENGTH 513 00154 #define CRED_MAX_GENERIC_TARGET_NAME_LENGTH 32767 00155 #define CRED_MAX_DOMAIN_TARGET_NAME_LENGTH 337 00156 #define CRED_MAX_VALUE_SIZE 256 00157 #define CRED_MAX_ATTRIBUTES 64 00158 00159 #define CRED_MAX_BLOB_SIZE 512 00160 00161 #define CREDUI_MAX_MESSAGE_LENGTH 32767 00162 #define CREDUI_MAX_CAPTION_LENGTH 128 00163 #define CREDUI_MAX_GENERIC_TARGET_LENGTH CRED_MAX_GENERIC_TARGET_NAME_LENGTH 00164 #define CREDUI_MAX_DOMAIN_TARGET_LENGTH CRED_MAX_DOMAIN_TARGET_LENGTH 00165 #define CREDUI_MAX_USERNAME_LENGTH CRED_MAX_USERNAME_LENGTH 00166 #define CREDUI_MAX_PASSWORD_LENGTH (CRED_MAX_CREDENTIAL_BLOB_SIZE / 2) 00167 00168 /* flags for CREDENTIAL::Flags */ 00169 #define CRED_FLAGS_PASSWORD_FOR_CERT 0x0001 00170 #define CRED_FLAGS_PROMPT_NOW 0x0002 00171 #define CRED_FLAGS_USERNAME_TARGET 0x0004 00172 #define CRED_FLAGS_OWF_CRED_BLOB 0x0008 00173 #define CRED_FLAGS_VALID_FLAGS 0x000f 00174 00175 /* values for CREDENTIAL::Type */ 00176 #define CRED_TYPE_GENERIC 1 00177 #define CRED_TYPE_DOMAIN_PASSWORD 2 00178 #define CRED_TYPE_DOMAIN_CERTIFICATE 3 00179 #define CRED_TYPE_DOMAIN_VISIBLE_PASSWORD 4 00180 #define CRED_TYPE_MAXIMUM 5 00181 00182 /* values for CREDENTIAL::Persist */ 00183 #define CRED_PERSIST_NONE 0 00184 #define CRED_PERSIST_SESSION 1 00185 #define CRED_PERSIST_LOCAL_MACHINE 2 00186 #define CRED_PERSIST_ENTERPRISE 3 00187 00188 #define CREDUI_FLAGS_INCORRECT_PASSWORD 0x00000001 00189 #define CREDUI_FLAGS_DO_NOT_PERSIST 0x00000002 00190 #define CREDUI_FLAGS_REQUEST_ADMINISTRATOR 0x00000004 00191 #define CREDUI_FLAGS_EXCLUDE_CERTIFICATES 0x00000008 00192 #define CREDUI_FLAGS_REQUIRE_CERTIFICATE 0x00000010 00193 #define CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX 0x00000040 00194 #define CREDUI_FLAGS_ALWAYS_SHOW_UI 0x00000080 00195 #define CREDUI_FLAGS_REQUIRE_SMARTCARD 0x00000100 00196 #define CREDUI_FLAGS_PASSWORD_ONLY_OK 0x00000200 00197 #define CREDUI_FLAGS_VALIDATE_USERNAME 0x00000400 00198 #define CREDUI_FLAGS_COMPLETE_USERNAME 0x00000800 00199 #define CREDUI_FLAGS_PERSIST 0x00001000 00200 #define CREDUI_FLAGS_SERVER_CREDENTIAL 0x00004000 00201 #define CREDUI_FLAGS_EXPECT_CONFIRMATION 0x00020000 00202 #define CREDUI_FLAGS_GENERIC_CREDENTIALS 0x00040000 00203 #define CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS 0x00080000 00204 #define CREDUI_FLAGS_KEEP_USERNAME 0x00100000 00205 00206 /* flags for CredWrite and CredWriteDomainCredentials */ 00207 #define CRED_PRESERVE_CREDENTIAL_BLOB 0x00000001 00208 00209 BOOL WINAPI CredDeleteA(LPCSTR,DWORD,DWORD); 00210 BOOL WINAPI CredDeleteW(LPCWSTR,DWORD,DWORD); 00211 #define CredDelete WINELIB_NAME_AW(CredDelete) 00212 BOOL WINAPI CredEnumerateA(LPCSTR,DWORD,DWORD *,PCREDENTIALA **); 00213 BOOL WINAPI CredEnumerateW(LPCWSTR,DWORD,DWORD *,PCREDENTIALW **); 00214 #define CredEnumerate WINELIB_NAME_AW(CredEnumerate) 00215 VOID WINAPI CredFree(PVOID); 00216 BOOL WINAPI CredReadA(LPCSTR,DWORD,DWORD,PCREDENTIALA *); 00217 BOOL WINAPI CredReadW(LPCWSTR,DWORD,DWORD,PCREDENTIALW *); 00218 #define CredRead WINELIB_NAME_AW(CredRead) 00219 BOOL WINAPI CredRenameA(LPCSTR,LPCSTR,DWORD,DWORD); 00220 BOOL WINAPI CredRenameW(LPCWSTR,LPCWSTR,DWORD,DWORD); 00221 #define CredRename WINELIB_NAME_AW(CredRename) 00222 BOOL WINAPI CredWriteA(PCREDENTIALA,DWORD); 00223 BOOL WINAPI CredWriteW(PCREDENTIALW,DWORD); 00224 #define CredWrite WINELIB_NAME_AW(CredWrite) 00225 00226 DWORD WINAPI CredUICmdLinePromptForCredentialsW(PCWSTR,PCtxtHandle,DWORD,PWSTR,ULONG,PWSTR,ULONG,PBOOL,DWORD); 00227 DWORD WINAPI CredUICmdLinePromptForCredentialsA(PCSTR,PCtxtHandle,DWORD,PSTR,ULONG,PSTR,ULONG,PBOOL,DWORD); 00228 #define CredUICmdLinePromptForCredentials WINELIB_NAME_AW(CredUICmdLinePromptForCredentials) 00229 DWORD WINAPI CredUIConfirmCredentialsW(PCWSTR,BOOL); 00230 DWORD WINAPI CredUIConfirmCredentialsA(PCSTR,BOOL); 00231 #define CredUIConfirmCredentials WINELIB_NAME_AW(CredUIConfirmCredentials) 00232 DWORD WINAPI CredUIParseUserNameW(PCWSTR,PWSTR,ULONG,PWSTR,ULONG); 00233 DWORD WINAPI CredUIParseUserNameA(PCSTR,PSTR,ULONG,PSTR,ULONG); 00234 #define CredUIParseUserName WINELIB_NAME_AW(CredUIParseUserName) 00235 DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW,PCWSTR,PCtxtHandle,DWORD,PWSTR,ULONG,PWSTR,ULONG,PBOOL,DWORD); 00236 DWORD WINAPI CredUIPromptForCredentialsA(PCREDUI_INFOA,PCSTR,PCtxtHandle,DWORD,PSTR,ULONG,PSTR,ULONG,PBOOL,DWORD); 00237 #define CredUIPromptForCredentials WINELIB_NAME_AW(CredUIPromptForCredentials) 00238 DWORD WINAPI CredUIStoreSSOCredW(PCWSTR,PCWSTR,PCWSTR,BOOL); 00239 /* Note: no CredUIStoreSSOCredA in PSDK header */ 00240 DWORD WINAPI CredUIReadSSOCredW(PCWSTR,PWSTR*); 00241 /* Note: no CredUIReadSSOCredA in PSDK header */ 00242 00243 BOOL WINAPI CredReadDomainCredentialsW(PCREDENTIAL_TARGET_INFORMATIONW TargetInfo, DWORD Flags, DWORD *Count, PCREDENTIALW **Credential); 00244 BOOL WINAPI CredReadDomainCredentialsA(PCREDENTIAL_TARGET_INFORMATIONA TargetInfo, DWORD Flags, DWORD *Count, PCREDENTIALA **Credential); 00245 BOOL WINAPI CredWriteDomainCredentialsW(PCREDENTIAL_TARGET_INFORMATIONW TargetInfo, PCREDENTIALW Credential, DWORD Flags); 00246 BOOL WINAPI CredWriteDomainCredentialsA(PCREDENTIAL_TARGET_INFORMATIONA TargetInfo, PCREDENTIALA Credential, DWORD Flags); 00247 BOOL WINAPI CredUnmarshalCredentialW(LPCWSTR MarshaledCredential, PCRED_MARSHAL_TYPE CredType, PVOID *Credential); 00248 BOOL WINAPI CredUnmarshalCredentialA(LPCSTR MarshaledCredential, PCRED_MARSHAL_TYPE CredType, PVOID *Credential); 00249 00250 #ifdef UNICODE 00251 #define CredReadDomainCredentials CredReadDomainCredentialsW 00252 #define CredWriteDomainCredentials CredWriteDomainCredentialsW 00253 #define CredUnmarshalCredential CredUnmarshalCredentialW 00254 #else 00255 #define CredReadDomainCredentials CredReadDomainCredentialsA 00256 #define CredWriteDomainCredentials CredWriteDomainCredentialsA 00257 #define CredUnmarshalCredential CredUnmarshalCredentialA 00258 #endif /* UNICODE */ 00259 00260 #ifdef __cplusplus 00261 } 00262 #endif 00263 00264 #endif /* _WINCRED_H_ */ Generated on Sat May 26 2012 04:31:24 for ReactOS by
1.7.6.1
|