wincred.h revision 930b5f872e89407f445d4000d4e4aaecaa6a0998
/*
* Copyright (C) 2006 Robert Shearman (for CodeWeavers)
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#ifndef _WINCRED_H_
#define _WINCRED_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _ADVAPI32_
#define WINADVAPI
#else
#define WINADVAPI DECLSPEC_IMPORT
#endif
#ifndef __SECHANDLE_DEFINED__
#define __SECHANDLE_DEFINED__
typedef struct _SecHandle
{
} SecHandle, *PSecHandle;
#endif
#ifndef __WINE_CTXTHANDLE_DEFINED__
#define __WINE_CTXTHANDLE_DEFINED__
typedef SecHandle CtxtHandle;
typedef PSecHandle PCtxtHandle;
#endif
typedef struct _CREDENTIAL_ATTRIBUTEA
{
typedef struct _CREDENTIAL_ATTRIBUTEW
{
typedef struct _CREDENTIALA
{
} CREDENTIALA, *PCREDENTIALA;
typedef struct _CREDENTIALW
{
} CREDENTIALW, *PCREDENTIALW;
typedef struct _CREDENTIAL_TARGET_INFORMATIONA
{
typedef struct _CREDENTIAL_TARGET_INFORMATIONW
{
typedef struct _CREDUI_INFOA
{
typedef struct _CREDUI_INFOW
{
typedef enum _CRED_MARSHAL_TYPE
{
CertCredential = 1,
#define CERT_HASH_LENGTH 20
typedef struct _CERT_CREDENTIAL_INFO
{
typedef struct _USERNAME_TARGET_CREDENTIAL_INFO
{
typedef struct _BINARY_BLOB_CREDENTIAL_INFO
{
#define CRED_MAX_STRING_LENGTH 256
#define CRED_MAX_USERNAME_LENGTH 513
#define CRED_MAX_GENERIC_TARGET_NAME_LENGTH 32767
#define CRED_MAX_DOMAIN_TARGET_NAME_LENGTH 337
#define CRED_MAX_VALUE_SIZE 256
#define CRED_MAX_ATTRIBUTES 64
#define CRED_MAX_BLOB_SIZE 512
#define CREDUI_MAX_MESSAGE_LENGTH 32767
#define CREDUI_MAX_CAPTION_LENGTH 128
/* flags for CREDENTIAL::Flags */
#define CRED_FLAGS_PASSWORD_FOR_CERT 0x0001
#define CRED_FLAGS_PROMPT_NOW 0x0002
#define CRED_FLAGS_USERNAME_TARGET 0x0004
#define CRED_FLAGS_OWF_CRED_BLOB 0x0008
#define CRED_FLAGS_VALID_FLAGS 0x000f
/* values for CREDENTIAL::Type */
#define CRED_TYPE_GENERIC 1
#define CRED_TYPE_DOMAIN_PASSWORD 2
#define CRED_TYPE_DOMAIN_CERTIFICATE 3
#define CRED_TYPE_DOMAIN_VISIBLE_PASSWORD 4
#define CRED_TYPE_GENERIC_CERTIFICATE 5
#define CRED_TYPE_MAXIMUM 6
/* values for CREDENTIAL::Persist */
#define CRED_PERSIST_NONE 0
#define CRED_PERSIST_SESSION 1
#define CRED_PERSIST_LOCAL_MACHINE 2
#define CRED_PERSIST_ENTERPRISE 3
/* values for CREDENTIAL_TARGET_INFORMATION::Flags */
#define CRED_TI_SERVER_FORMAT_UNKNOWN 1
#define CRED_TI_DOMAIN_FORMAT_UNKNOWN 2
#define CRED_TI_ONLY_PASSWORD_REQUIRED 4
#define CREDUI_FLAGS_INCORRECT_PASSWORD 0x00000001
#define CREDUI_FLAGS_DO_NOT_PERSIST 0x00000002
#define CREDUI_FLAGS_REQUEST_ADMINISTRATOR 0x00000004
#define CREDUI_FLAGS_EXCLUDE_CERTIFICATES 0x00000008
#define CREDUI_FLAGS_REQUIRE_CERTIFICATE 0x00000010
#define CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX 0x00000040
#define CREDUI_FLAGS_ALWAYS_SHOW_UI 0x00000080
#define CREDUI_FLAGS_REQUIRE_SMARTCARD 0x00000100
#define CREDUI_FLAGS_PASSWORD_ONLY_OK 0x00000200
#define CREDUI_FLAGS_VALIDATE_USERNAME 0x00000400
#define CREDUI_FLAGS_COMPLETE_USERNAME 0x00000800
#define CREDUI_FLAGS_PERSIST 0x00001000
#define CREDUI_FLAGS_SERVER_CREDENTIAL 0x00004000
#define CREDUI_FLAGS_EXPECT_CONFIRMATION 0x00020000
#define CREDUI_FLAGS_GENERIC_CREDENTIALS 0x00040000
#define CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS 0x00080000
#define CREDUI_FLAGS_KEEP_USERNAME 0x00100000
/* flags for CredWrite and CredWriteDomainCredentials */
#define CRED_PRESERVE_CREDENTIAL_BLOB 0x00000001
WINADVAPI BOOL WINAPI CredReadDomainCredentialsA(PCREDENTIAL_TARGET_INFORMATIONA,DWORD,DWORD *,PCREDENTIALA **);
WINADVAPI BOOL WINAPI CredReadDomainCredentialsW(PCREDENTIAL_TARGET_INFORMATIONW,DWORD,DWORD *,PCREDENTIALW **);
DWORD WINAPI CredUICmdLinePromptForCredentialsW(PCWSTR,PCtxtHandle,DWORD,PWSTR,ULONG,PWSTR,ULONG,PBOOL,DWORD);
DWORD WINAPI CredUICmdLinePromptForCredentialsA(PCSTR,PCtxtHandle,DWORD,PSTR,ULONG,PSTR,ULONG,PBOOL,DWORD);
DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW,PCWSTR,PCtxtHandle,DWORD,PWSTR,ULONG,PWSTR,ULONG,PBOOL,DWORD);
DWORD WINAPI CredUIPromptForCredentialsA(PCREDUI_INFOA,PCSTR,PCtxtHandle,DWORD,PSTR,ULONG,PSTR,ULONG,PBOOL,DWORD);
/* Note: no CredUIStoreSSOCredA in PSDK header */
/* Note: no CredUIReadSSOCredA in PSDK header */
#ifdef __cplusplus
}
#endif
#endif /* _WINCRED_H_ */