Some header upgrades

svn path=/trunk/; revision=24485
This commit is contained in:
Thomas Bluemel 2006-10-11 11:44:40 +00:00
parent d395d0ad39
commit c0c399894e
10 changed files with 318 additions and 104 deletions

View file

@ -54,4 +54,129 @@ typedef struct
* call. */
} PARAM_ATTRIBUTES;
typedef struct
{
unsigned char ServerMustSize : 1; /* 0x01 - the server must perform a
* sizing pass. */
unsigned char ClientMustSize : 1; /* 0x02 - the client must perform a
* sizing pass. */
unsigned char HasReturn : 1; /* 0x04 - procedure has a return value. */
unsigned char HasPipes : 1; /* 0x08 - the pipe package should be used. */
unsigned char Unused : 1; /* 0x10 - not used */
unsigned char HasAsyncUuid : 1; /* 0x20 - indicates an asynchronous DCOM
* procedure. */
unsigned char HasExtensions : 1; /* 0x40 - indicates that Win2000
* extensions are in use. */
unsigned char HasAsyncHandle : 1; /* 0x80 - indicates an asynchronous RPC
* procedure. */
} INTERPRETER_OPT_FLAGS, *PINTERPRETER_OPT_FLAGS;
typedef struct
{
unsigned char HasNewCorrDesc : 1; /* 0x01 - indicates new correlation
* descriptors in use. */
unsigned char ClientCorrCheck : 1; /* 0x02 - client needs correlation
* check. */
unsigned char ServerCorrCheck : 1; /* 0x04 - server needs correlation
* check. */
unsigned char HasNotify : 1; /* 0x08 - should call MIDL [notify]
* routine @ NotifyIndex. */
unsigned char HasNotify2 : 1; /* 0x10 - should call MIDL [notify_flag] routine @
* NotifyIndex. */
unsigned char Unused : 3;
} INTERPRETER_OPT_FLAGS2, *PINTERPRETER_OPT_FLAGS2;
/* Win2000 extensions */
typedef struct
{
/* size in bytes of all following extensions */
unsigned char Size;
INTERPRETER_OPT_FLAGS2 Flags2;
/* client cache size hint */
unsigned short ClientCorrHint;
/* server cache size hint */
unsigned short ServerCorrHint;
/* index of routine in MIDL_STUB_DESC::NotifyRoutineTable to call if
* HasNotify or HasNotify2 flag set */
unsigned short NotifyIndex;
} NDR_PROC_HEADER_EXTS;
typedef struct
{
/* size in bytes of all following extensions */
unsigned char Size;
INTERPRETER_OPT_FLAGS2 Flags2;
/* client cache size hint */
unsigned short ClientCorrHint;
/* server cache size hint */
unsigned short ServerCorrHint;
/* index of routine in MIDL_STUB_DESC::NotifyRoutineTable to call if
* HasNotify or HasNotify2 flag set */
unsigned short NotifyIndex;
/* needed only on IA64 to cope with float/register loading */
unsigned short FloatArgMask;
} NDR_PROC_HEADER_EXTS64;
typedef enum
{
FC_BYTE = 0x01, /* 0x01 */
FC_CHAR, /* 0x02 */
FC_SMALL, /* 0x03 */
FC_USMALL, /* 0x04 */
FC_WCHAR, /* 0x05 */
FC_SHORT, /* 0x06 */
FC_USHORT, /* 0x07 */
FC_LONG, /* 0x08 */
FC_ULONG, /* 0x09 */
FC_FLOAT, /* 0x0a */
FC_HYPER, /* 0x0b */
FC_DOUBLE, /* 0x0c */
FC_ENUM16, /* 0x0d */
FC_ENUM32, /* 0x0e */
FC_IGNORE, /* 0x0f */
FC_ERROR_STATUS_T, /* 0x10 */
FC_RP, /* 0x11 */ /* reference pointer */
FC_UP, /* 0x12 */ /* unique pointer */
FC_OP, /* 0x13 */ /* object pointer */
FC_FP, /* 0x14 */ /* full pointer */
FC_STRUCT, /* 0x15 */ /* simple structure */
FC_PSTRUCT, /* 0x16 */ /* simple structure w/ pointers */
FC_CSTRUCT, /* 0x17 */ /* conformant structure */
FC_CPSTRUCT, /* 0x18 */ /* conformant structure w/ pointers */
FC_CVSTRUCT, /* 0x19 */ /* conformant varying struct */
FC_BOGUS_STRUCT, /* 0x1a */ /* complex structure */
FC_CARRAY, /* 0x1b */ /* conformant array */
FC_CVARRAY, /* 0x1c */ /* conformant varying array */
FC_SMFARRAY, /* 0x1d */ /* small (<64K) fixed array */
FC_LGFARRAY, /* 0x1e */ /* large (>= 64k) fixed array */
FC_SMVARRAY, /* 0x1f */ /* small (<64k) varying array */
FC_LGVARRAY, /* 0x20 */ /* large (>= 64k) varying array */
FC_BOGUS_ARRAY, /* 0x21 */ /* complex array */
} FORMAT_CHARACTER;
/* flags for all handle types */
#define HANDLE_PARAM_IS_VIA_PTR 0x80
#define HANDLE_PARAM_IS_IN 0x40
#define HANDLE_PARAM_IS_OUT 0x20
#define HANDLE_PARAM_IS_RETURN 0x10
/* flags for context handles */
#define NDR_STRICT_CONTEXT_HANDLE 0x08
#define NDR_CONTEXT_HANDLE_NOSERIALIZE 0x04
#define NDR_CONTEXT_HANDLE_SERIALIZE 0x02
#define NDR_CONTEXT_HANDLE_CANNOT_BE_NULL 0x01
#endif

View file

@ -123,11 +123,11 @@ extern "C" {
#define TRUST_TYPE_MIT 3
#define TRUST_TYPE_DCE 4
#if !defined(_NTDEF_H) && !defined(_SUBAUTH_H)
#if !defined(_NTDEF_)
typedef LONG NTSTATUS, *PNTSTATUS;
#endif
#if defined (_NTDEF_H)
#if defined (_NTDEF_)
typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
typedef STRING LSA_STRING, *PLSA_STRING;
typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
@ -158,6 +158,9 @@ typedef struct _LSA_OBJECT_ATTRIBUTES {
PVOID SecurityQualityOfService;
} LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
typedef LSA_UNICODE_STRING UNICODE_STRING, *PUNICODE_STRING;
typedef LSA_STRING STRING, *PSTRING ;
#endif
typedef enum _MSV1_0_LOGON_SUBMIT_TYPE {
@ -374,13 +377,6 @@ typedef struct _LSA_TRANSLATED_NAME {
LONG DomainIndex;
} LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
#if !defined(_NTDEF_) && !defined(UNICODE_STRING)
typedef LSA_UNICODE_STRING UNICODE_STRING, *PUNICODE_STRING;
#endif
#if !defined(_NTDEF_) && !defined(STRING)
typedef LSA_STRING STRING, *PSTRING ;
#endif
typedef struct _MSV1_0_INTERACTIVE_LOGON {
MSV1_0_LOGON_SUBMIT_TYPE MessageType;
UNICODE_STRING LogonDomainName;

View file

@ -12,6 +12,13 @@
extern "C" {
#endif
#include <objfwd.h>
#ifdef CONST_VTABLE
#define CONST_VTBL const
#else
#define CONST_VTBL
#endif
#define TARGET_IS_NT50_OR_LATER 1
#define TARGET_IS_NT40_OR_LATER 1
#define TARGET_IS_NT351_OR_WIN95_OR_LATER 1

View file

@ -10,11 +10,24 @@
extern "C" {
#endif
#define SCHANNEL_NAME_A "Schannel"
#define SCHANNEL_NAME_W L"Schannel"
#ifdef UNICODE
#define SCHANNEL_NAME SCHANNEL_NAME_W
#else
#define SCHANNEL_NAME SCHANNEL_NAME_A
#endif
#define SCH_CRED_V1 1
#define SCH_CRED_V2 2
#define SCH_CRED_VERSION 2
#define SCH_CRED_V3 3
#define SCHANNEL_CRED_VERSION 4
#define SCHANNEL_SHUTDOWN 1
/* ? Do these belong here or in wincrypt.h */
#define AUTHTYPE_CLIENT 1
#define AUTHTYPE_SERVER 2
#define SCHANNEL_RENEGOTIATE 0
#define SCHANNEL_SHUTDOWN 1
#define SCHANNEL_ALERT 2
#define SCHANNEL_SESSION 3
#define SP_PROT_TLS1_CLIENT 128
#define SP_PROT_TLS1_SERVER 64
@ -22,65 +35,96 @@ extern "C" {
#define SP_PROT_SSL3_SERVER 16
#define SP_PROT_SSL2_CLIENT 8
#define SP_PROT_SSL2_SERVER 4
#define SP_PROT_PCT1_SERVER 1
#define SP_PROT_PCT1_CLIENT 2
#define SP_PROT_PCT1_SERVER 1
#define SP_PROT_PCT1 (SP_PROT_PCT1_CLIENT|SP_PROT_PCT1_SERVER)
#define SP_PROT_TLS1 (SP_PROT_TLS1_CLIENT|SP_PROT_TLS1_SERVER)
#define SP_PROT_SSL2 (SP_PROT_SSL2_CLIENT|SP_PROT_SSL2_SERVER)
#define SP_PROT_SSL3 (SP_PROT_SSL3_CLIENT|SP_PROT_SSL3_SERVER)
#define SP_PROT_TLS1 (SP_PROT_TLS1_CLIENT | SP_PROT_TLS1_SERVER)
#define SP_PROT_SSL3 (SP_PROT_SSL3_CLIENT | SP_PROT_SSL3_SERVER)
#define SP_PROT_SSL2 (SP_PROT_SSL2_CLIENT | SP_PROT_SSL2_SERVER)
#define SP_PROT_PCT1 (SP_PROT_PCT1_CLIENT | SP_PROT_PCT1_SERVER)
#define SCH_CRED_NO_SYSTEM_MAPPER 2
#define SCH_CRED_NO_SERVERNAME_CHECK 4
#define SCH_CRED_MANUAL_CRED_VALIDATION 8
#define SCH_CRED_NO_DEFAULT_CREDS 16
#define SCH_CRED_AUTO_CRED_VALIDATION 32
#define SCH_CRED_REVOCATION_CHECK_CHAIN 512
#define SCH_CRED_REVOCATION_CHECK_END_CERT 256
#define SCH_CRED_NO_SYSTEM_MAPPER 2
#define SCH_CRED_NO_SERVERNAME_CHECK 4
#define SCH_CRED_MANUAL_CRED_VALIDATION 8
#define SCH_CRED_NO_DEFAULT_CREDS 16
#define SCH_CRED_AUTO_CRED_VALIDATION 32
#define SCH_CRED_USE_DEFAULT_CREDS 64
#define SCH_CRED_REVOCATION_CHECK_CHAIN_END_CERT 256
#define SCH_CRED_REVOCATION_CHECK_CHAIN 512
#define SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 1024
#define SCH_CRED_IGNORE_NO_REVOCATION_CHECK 2048
#define SCH_CRED_IGNORE_REVOCATION_OFFLINE 4096
#define SCH_CRED_USE_DEFAULT_CREDS 64
#define SCH_CRED_IGNORE_NO_REVOCATION_CHECK 2048
#define SCH_CRED_IGNORE_REVOCATION_OFFLINE 4096
typedef struct _SCHANNEL_CRED {
DWORD dwVersion;
DWORD cCreds;
PCCERT_CONTEXT* paCred;
HCERTSTORE hRootStore;
DWORD cMappers;
struct _HMAPPER** aphMappers;
DWORD cSupportedAlgs;
ALG_ID* palgSupportedAlgs;
DWORD grbitEnabledProtocols;
DWORD dwMinimumCypherStrength;
DWORD dwMaximumCypherStrength;
DWORD dwSessionLifespan;
DWORD dwFlags;
DWORD reserved;
#define SECPKG_ATTR_ISSUER_LIST 0x50
#define SECPKG_ATTR_REMOTE_CRED 0x51
#define SECPKG_ATTR_LOCAL_CRED 0x52
#define SECPKG_ATTR_REMOTE_CERT_CONTEXT 0x53
#define SECPKG_ATTR_LOCAL_CERT_CONTEXT 0x54
#define SECPKG_ATTR_ROOT_STORE 0x55
#define SECPKG_ATTR_SUPPORTED_ALGS 0x56
#define SECPKG_ATTR_CIPHER_STRENGTHS 0x57
#define SECPKG_ATTR_SUPPORTED_PROTOCOLS 0x58
#define SECPKG_ATTR_ISSUER_LIST_EX 0x59
#define SECPKG_ATTR_CONNECTION_INFO 0x5a
#define SECPKG_ATTR_EAP_KEY_BLOCK 0x5b
#define SECPKG_ATTR_MAPPED_CRED_ATTR 0x5c
#define SECPKG_ATTR_SESSION_INFO 0x5d
#define SECPKG_ATTR_APP_DATA 0x5e
#define UNISP_RPC_ID 14
struct _HMAPPER;
typedef struct _SCHANNEL_CRED
{
DWORD dwVersion;
DWORD cCreds;
PCCERT_CONTEXT *paCred;
HCERTSTORE hRootStore;
DWORD cMappers;
struct _HMAPPER **aphMappers;
DWORD cSupportedAlgs;
ALG_ID *palgSupportedAlgs;
DWORD grbitEnabledProtocols;
DWORD dwMinimumCipherStrength;
DWORD dwMaximumCipherStrength;
DWORD dwSessionLength;
DWORD dwFlags;
DWORD reserved;
} SCHANNEL_CRED, *PSCHANNEL_CRED;
typedef struct _SecPkgCred_SupportedAlgs {
DWORD cSupportedAlgs;
ALG_ID* palgSupportedAlgs;
typedef struct _SecPkgCred_SupportedAlgs
{
DWORD cSupportedAlgs;
ALG_ID *palgSupportedAlgs;
} SecPkgCred_SupportedAlgs, *PSecPkgCred_SupportedAlgs;
typedef struct _SecPkgCred_CypherStrengths {
DWORD dwMinimumCypherStrength;
DWORD dwMaximumCypherStrength;
} SecPkgCred_CypherStrengths, *PSecPkgCred_CypherStrengths;
typedef struct _SecPkgCred_SupportedProtocols {
DWORD grbitProtocol;
typedef struct _SecPkgCred_CipherStrengths
{
DWORD dwMinimumCipherStrength;
DWORD dwMaximumCipherStrength;
} SecPkgCred_CipherStrengths, *PSecPkgCred_CipherStrengths;
typedef struct _SecPkgCred_SupportedProtocols
{
DWORD grbitProtocol;
} SecPkgCred_SupportedProtocols, *PSecPkgCred_SupportedProtocols;
typedef struct _SecPkgContext_IssuerListInfoEx {
PCERT_NAME_BLOB aIssuers;
DWORD cIssuers;
typedef struct _SecPkgContext_IssuerListInfoEx
{
PCERT_NAME_BLOB aIssuers;
DWORD cIssuers;
} SecPkgContext_IssuerListInfoEx, *PSecPkgContext_IssuerListInfoEx;
typedef struct _SecPkgContext_ConnectionInfo {
DWORD dwProtocol;
ALG_ID aiCipher;
DWORD dwCipherStrength;
ALG_ID aiHash;
DWORD dwHashStrength;
ALG_ID aiExch;
DWORD dwExchStrength;
typedef struct _SecPkgContext_ConnectionInfo
{
DWORD dwProtocol;
ALG_ID aiCipher;
DWORD dwCipherStrength;
ALG_ID aiHash;
DWORD dwHashStrength;
ALG_ID aiExch;
DWORD dwExchStrength;
} SecPkgContext_ConnectionInfo, *PSecPkgContext_ConnectionInfo;
#ifdef __cplusplus

View file

@ -4,37 +4,6 @@
#pragma GCC system_header
#endif
#define SEC_E_OK 0
#define SEC_E_CERT_EXPIRED (-2146893016)
#define SEC_E_INCOMPLETE_MESSAGE (-2146893032)
#define SEC_E_INSUFFICIENT_MEMORY (-2146893056)
#define SEC_E_INTERNAL_ERROR (-2146893052)
#define SEC_E_INVALID_HANDLE (-2146893055)
#define SEC_E_INVALID_TOKEN (-2146893048)
#define SEC_E_LOGON_DENIED (-2146893044)
#define SEC_E_NO_AUTHENTICATING_AUTHORITY (-2146893039)
#define SEC_E_NO_CREDENTIALS (-2146893042)
#define SEC_E_TARGET_UNKNOWN (-2146893053)
#define SEC_E_UNSUPPORTED_FUNCTION (-2146893054)
#define SEC_E_UNTRUSTED_ROOT (-2146893019)
#define SEC_E_WRONG_PRINCIPAL (-2146893022)
#define SEC_E_SECPKG_NOT_FOUND (-2146893051)
#define SEC_E_QOP_NOT_SUPPORTED (-2146893046)
#define SEC_E_UNKNOWN_CREDENTIALS (-2146893043)
#define SEC_E_NOT_OWNER (-2146893050)
#define SEC_I_RENEGOTIATE 590625
#define SEC_I_COMPLETE_AND_CONTINUE 590612
#define SEC_I_COMPLETE_NEEDED 590611
#define SEC_I_CONTINUE_NEEDED 590610
#define SEC_I_INCOMPLETE_CREDENTIALS 590624
/* always a char */
typedef char SEC_CHAR;
typedef wchar_t SEC_WCHAR;
typedef long SECURITY_STATUS;
#define SEC_FAR
#include <sspi.h>
#include <ntsecpkg.h>
#include <secext.h>

View file

@ -788,6 +788,9 @@ typedef struct _SYSTEMTIME {
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME,*LPSYSTEMTIME,*PSYSTEMTIME;
#if (_WIN32_WINNT >= 0x0500)
typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK ;
#endif
typedef struct _WIN32_FILE_ATTRIBUTE_DATA {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
@ -1144,6 +1147,9 @@ BOOL WINAPI BackupWrite(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
BOOL WINAPI Beep(DWORD,DWORD);
HANDLE WINAPI BeginUpdateResourceA(LPCSTR,BOOL);
HANDLE WINAPI BeginUpdateResourceW(LPCWSTR,BOOL);
#if (_WIN32_WINNT >= 0x0500)
BOOL WINAPI BindIoCompletionCallback(HANDLE,LPOVERLAPPED_COMPLETION_ROUTINE,ULONG);
#endif
BOOL WINAPI BuildCommDCBA(LPCSTR,LPDCB);
BOOL WINAPI BuildCommDCBW(LPCWSTR,LPDCB);
BOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR,LPDCB,LPCOMMTIMEOUTS);
@ -1837,6 +1843,9 @@ BOOL WINAPI QueryMemoryResourceNotification(HANDLE,PBOOL);
BOOL WINAPI QueryPerformanceCounter(PLARGE_INTEGER);
BOOL WINAPI QueryPerformanceFrequency(PLARGE_INTEGER);
DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,DWORD);
#if (_WIN32_WINNT >= 0x0500)
BOOL WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE,PVOID,ULONG);
#endif
void WINAPI RaiseException(DWORD,DWORD,DWORD,const ULONG_PTR*);
BOOL WINAPI ReadDirectoryChangesW(HANDLE,PVOID,DWORD,BOOL,DWORD,PDWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,PVOID,DWORD,DWORD *,DWORD *);
@ -1853,6 +1862,10 @@ HRESULT WINAPI RegisterApplicationRestart(PCWSTR,DWORD);
#endif
HANDLE WINAPI RegisterEventSourceA (LPCSTR,LPCSTR);
HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR);
#if (_WIN32_WINNT >= 0x0500)
BOOL WINAPI RegisterWaitForSingleObject(PHANDLE,HANDLE,WAITORTIMERCALLBACK,PVOID,ULONG,ULONG);
HANDLE WINAPI RegisterWaitForSingleObjectEx(HANDLE,WAITORTIMERCALLBACK,PVOID,ULONG,ULONG);
#endif
#if (_WIN32_WINNT >= 0x0501)
void WINAPI ReleaseActCtx(HANDLE);
#endif
@ -2007,6 +2020,7 @@ BOOL WINAPI UnlockFileEx(HANDLE,DWORD,DWORD,DWORD,LPOVERLAPPED);
#define UnlockSegment(w) GlobalUnfix((HANDLE)(w)) /* Obsolete: Has no effect. */
BOOL WINAPI UnmapViewOfFile(PVOID);
#if (_WIN32_WINNT >= 0x0500)
BOOL WINAPI UnregisterWait(HANDLE);
BOOL WINAPI UnregisterWaitEx(HANDLE,HANDLE);
#endif
BOOL WINAPI UpdateResourceA(HANDLE,LPCSTR,LPCSTR,WORD,PVOID,DWORD);

View file

@ -416,14 +416,31 @@
#define ERROR_PKINIT_FAILURE 1263L
#define ERROR_SMARTCARD_SUBSYSTEM_FAILURE 1264L
#define ERROR_DOWNGRADE_DETECTED 1265L
/* wrong: */
#if 0
#define SEC_E_SMARTCARD_CERT_REVOKED 1266L
#define SEC_E_ISSUING_CA_UNTRUSTED 1267L
#define SEC_E_REVOCATION_OFFLINE_C 1268L
#define SEC_E_PKINIT_CLIENT_FAILUR 1269L
#define SEC_E_SMARTCARD_CERT_EXPIRED 1270L
#endif
#define SEC_E_OK 0
#define SEC_E_CERT_EXPIRED (-2146893016)
#define SEC_E_INCOMPLETE_MESSAGE (-2146893032)
#define SEC_E_INSUFFICIENT_MEMORY (-2146893056)
#define SEC_E_INTERNAL_ERROR (-2146893052)
#define SEC_E_INVALID_HANDLE (-2146893055)
#define SEC_E_INVALID_TOKEN (-2146893048)
#define SEC_E_LOGON_DENIED (-2146893044)
#define SEC_E_NO_AUTHENTICATING_AUTHORITY (-2146893039)
#define SEC_E_NO_CREDENTIALS (-2146893042)
#define SEC_E_TARGET_UNKNOWN (-2146893053)
#define SEC_E_UNSUPPORTED_FUNCTION (-2146893054)
#define SEC_E_UNTRUSTED_ROOT (-2146893019)
#define SEC_E_WRONG_PRINCIPAL (-2146893022)
#define SEC_E_SECPKG_NOT_FOUND (-2146893051)
#define SEC_E_QOP_NOT_SUPPORTED (-2146893046)
#define SEC_E_UNKNOWN_CREDENTIALS (-2146893043)
#define SEC_E_NOT_OWNER (-2146893050)
#define SEC_I_RENEGOTIATE 590625
#define SEC_I_COMPLETE_AND_CONTINUE 590612
#define SEC_I_COMPLETE_NEEDED 590611
#define SEC_I_CONTINUE_NEEDED 590610
#define SEC_I_INCOMPLETE_CREDENTIALS 590624
#define ERROR_MACHINE_LOCKED 1271L
#define ERROR_CALLBACK_SUPPLIED_INVALID_DATA 1273L
#define ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED 1274L
@ -1911,6 +1928,7 @@
#define CO_E_INIT_SCM_EXEC_FAILURE ((HRESULT)0x80004011L)
#define CO_E_INIT_ONLY_SINGLE_THREADED ((HRESULT)0x80004012L)
#define S_OK ((HRESULT)0x00000000L)
#define SEC_E_OK ((HRESULT)0x00000000L)
#define S_FALSE ((HRESULT)0x00000001L)
#define OLE_E_FIRST ((HRESULT)0x80040000L)
#define OLE_E_LAST ((HRESULT)0x800400FFL)

View file

@ -380,6 +380,7 @@ struct sockproto {
#define MSG_OOB 1
#define MSG_PEEK 2
#define MSG_DONTROUTE 4
#define MSG_WAITALL 8
#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
#define MSG_MAXIOVLEN 16
#define MSG_PARTIAL 0x8000

View file

@ -292,8 +292,42 @@ void WSAAPI freeaddrinfo (struct addrinfo*);
int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*,
struct addrinfo**);
char* WSAAPI gai_strerrorA(int);
WCHAR* WSAAPI gai_strerrorW(int);
#define GAI_STRERROR_BUFFER_SIZE 1024
static __inline char*
gai_strerrorA(int ecode)
{
static char buff[GAI_STRERROR_BUFFER_SIZE + 1];
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK,
NULL,
ecode,
MAKELANGID(LANG_NEUTRAL,
SUBLANG_DEFAULT),
(LPSTR)buff,
GAI_STRERROR_BUFFER_SIZE,
NULL);
return buff;
}
static __inline WCHAR*
gai_strerrorW(int ecode)
{
static WCHAR buff[GAI_STRERROR_BUFFER_SIZE + 1];
FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK,
NULL,
ecode,
MAKELANGID(LANG_NEUTRAL,
SUBLANG_DEFAULT),
(LPWSTR)buff,
GAI_STRERROR_BUFFER_SIZE,
NULL);
return buff;
}
#ifdef UNICODE
#define gai_strerror gai_strerrorW
#else

View file

@ -88,7 +88,13 @@
#define RPC_FC_ALIGNM4 0x38
#define RPC_FC_ALIGNM8 0x39
#define RPC_FC_STRUCTPAD1 0x3d
#define RPC_FC_STRUCTPAD2 0x3e
#define RPC_FC_STRUCTPAD3 0x3f
#define RPC_FC_STRUCTPAD4 0x40
#define RPC_FC_STRUCTPAD5 0x41
#define RPC_FC_STRUCTPAD6 0x42
#define RPC_FC_STRUCTPAD7 0x43
#define RPC_FC_STRING_SIZED 0x44