diff --git a/reactos/include/crt/crtdefs.h b/reactos/include/crt/crtdefs.h index b1f23ed87a1..03bbb9be4e4 100644 --- a/reactos/include/crt/crtdefs.h +++ b/reactos/include/crt/crtdefs.h @@ -4,9 +4,7 @@ * No warranty is given; refer to the file DISCLAIMER within this package. */ #include <_mingw.h> -#ifndef __cplusplus #include -#endif #ifndef _INC_CRTDEFS #define _INC_CRTDEFS diff --git a/reactos/include/ddk/ntifs.h b/reactos/include/ddk/ntifs.h index f0b1999d73d..135d2abc55a 100644 --- a/reactos/include/ddk/ntifs.h +++ b/reactos/include/ddk/ntifs.h @@ -9073,7 +9073,7 @@ typedef struct _SEC_NEGOTIATION_INFO { ULONG Size; ULONG NameLength; - SEC_WCHAR * Name; + SEC_WCHAR *Name; PVOID Reserved; } SEC_NEGOTIATION_INFO, *PSEC_NEGOTIATION_INFO; @@ -9091,7 +9091,8 @@ typedef struct _SEC_CHANNEL_BINDINGS #ifndef _AUTH_IDENTITY_EX2_DEFINED #define _AUTH_IDENTITY_EX2_DEFINED -typedef struct _SEC_WINNT_AUTH_IDENTITY_EX2 { +typedef struct _SEC_WINNT_AUTH_IDENTITY_EX2 +{ ULONG Version; USHORT cbHeaderLength; ULONG cbStructureLength; @@ -9110,7 +9111,8 @@ typedef struct _SEC_WINNT_AUTH_IDENTITY_EX2 { #ifndef _AUTH_IDENTITY_DEFINED #define _AUTH_IDENTITY_DEFINED -typedef struct _SEC_WINNT_AUTH_IDENTITY_W { +typedef struct _SEC_WINNT_AUTH_IDENTITY_W +{ PUSHORT User; ULONG UserLength; PUSHORT Domain; @@ -9128,15 +9130,16 @@ typedef struct _SEC_WINNT_AUTH_IDENTITY_W { #ifndef SEC_WINNT_AUTH_IDENTITY_VERSION #define SEC_WINNT_AUTH_IDENTITY_VERSION 0x200 -typedef struct _SEC_WINNT_AUTH_IDENTITY_EXW { +typedef struct _SEC_WINNT_AUTH_IDENTITY_EXW +{ ULONG Version; ULONG Length; - PUSHORT User; // Non-NULL terminated string. - ULONG UserLength; // # of characters (NOT bytes), not including NULL. - PUSHORT Domain; // Non-NULL terminated string. - ULONG DomainLength; // # of characters (NOT bytes), not including NULL. - PUSHORT Password; // Non-NULL terminated string. - ULONG PasswordLength; // # of characters (NOT bytes), not including NULL. + PUSHORT User; + ULONG UserLength; + PUSHORT Domain; + ULONG DomainLength; + PUSHORT Password; + ULONG PasswordLength; ULONG Flags; PUSHORT PackageList; ULONG PackageListLength; @@ -9165,14 +9168,14 @@ typedef struct _SecBuffer #else __field_bcount(cbBuffer) void SEC_FAR *pvBuffer; #endif -} SecBuffer, * PSecBuffer; +} SecBuffer, *PSecBuffer; typedef struct _SecBufferDesc { ULONG ulVersion; ULONG cBuffers; MIDL_PROP([size_is(cBuffers)]) __field_ecount(cBuffers) PSecBuffer pBuffers; -} SecBufferDesc, SEC_FAR * PSecBufferDesc; +} SecBufferDesc, SEC_FAR *PSecBufferDesc; typedef struct _SecPkgInfoW { @@ -9188,8 +9191,8 @@ typedef struct _SecPkgInfoW typedef struct _SecPkgCredentials_NamesW { - MIDL_PROP([string]) SEC_WCHAR * sUserName; -} SecPkgCredentials_NamesW, * PSecPkgCredentials_NamesW; + MIDL_PROP([string]) SEC_WCHAR *sUserName; +} SecPkgCredentials_NamesW, *PSecPkgCredentials_NamesW; #define SecPkgCredentials_Names SecPkgCredentials_NamesW #define PSecPkgCredentials_Names PSecPkgCredentials_NamesW @@ -9210,11 +9213,13 @@ typedef struct _SecPkgContext_CredentialNameW #define SecPkgContext_CredentialName SecPkgContext_CredentialNameW #define PSecPkgContext_CredentialName PSecPkgContext_CredentialNameW -typedef struct _SecPkgContext_SubjectAttributes { +typedef struct _SecPkgContext_SubjectAttributes +{ PVOID AttributeInfo; } SecPkgContext_SubjectAttributes, *PSecPkgContext_SubjectAttributes; -typedef struct _SecPkgContext_CredInfo { +typedef struct _SecPkgContext_CredInfo +{ SECPKG_CRED_CLASS CredClass; ULONG IsPromptingNeeded; } SecPkgContext_CredInfo, *PSecPkgContext_CredInfo; @@ -9222,7 +9227,7 @@ typedef struct _SecPkgContext_CredInfo { typedef struct _SecPkgContext_NegoPackageInfo { ULONG PackageMask; -} SecPkgContext_NegoPackageInfo, * PSecPkgContext_NegoPackageInfo; +} SecPkgContext_NegoPackageInfo, *PSecPkgContext_NegoPackageInfo; typedef struct _SecPkgContext_NegoStatus { @@ -9255,7 +9260,7 @@ typedef struct _SecPkgContext_Lifespan typedef struct _SecPkgContext_PasswordExpiry { TimeStamp tsPasswordExpires; -} SecPkgContext_PasswordExpiry, * PSecPkgContext_PasswordExpiry; +} SecPkgContext_PasswordExpiry, *PSecPkgContext_PasswordExpiry; typedef struct _SecPkgContext_ProtoInfoW { @@ -9320,7 +9325,7 @@ typedef struct _SecPkgContext_NegotiationInfoW { PSecPkgInfoW PackageInfo ; ULONG NegotiationState ; -} SecPkgContext_NegotiationInfoW, *PSecPkgContext_NegotiationInfoW ; +} SecPkgContext_NegotiationInfoW, *PSecPkgContext_NegotiationInfoW; typedef struct _SecPkgContext_AuthorityW { @@ -9336,7 +9341,7 @@ typedef struct _SecPkgCredentials_SSIProviderW SEC_WCHAR *sProviderName; ULONG ProviderInfoLength; PCHAR ProviderInfo; -} SecPkgCredentials_SSIProviderW, * PSecPkgCredentials_SSIProviderW; +} SecPkgCredentials_SSIProviderW, *PSecPkgCredentials_SSIProviderW; #define SecPkgCredentials_SSIProvider SecPkgCredentials_SSIProviderW #define PSecPkgCredentials_SSIProvider PSecPkgCredentials_SSIProviderW @@ -9347,7 +9352,7 @@ typedef struct _SecPkgContext_LogoffTime #endif /* forward declaration */ -typedef struct _SECURITY_FUNCTION_TABLE_W SecurityFunctionTableW, * PSecurityFunctionTableW; +typedef struct _SECURITY_FUNCTION_TABLE_W SecurityFunctionTableW, *PSecurityFunctionTableW; #define SecurityFunctionTable SecurityFunctionTableW #define PSecurityFunctionTable PSecurityFunctionTableW @@ -9364,15 +9369,15 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY AcceptSecurityContext( - __in_opt PCredHandle phCredential, - __in_opt PCtxtHandle phContext, - __in_opt PSecBufferDesc pInput, - __in ULONG fContextReq, - __in ULONG TargetDataRep, - __in_opt PCtxtHandle phNewContext, - __in_opt PSecBufferDesc pOutput, - __out PULONG pfContextAttr, - __out_opt PTimeStamp ptsExpiry); + _In_opt_ PCredHandle phCredential, + _In_opt_ PCtxtHandle phContext, + _In_opt_ PSecBufferDesc pInput, + _In_ ULONG fContextReq, + _In_ ULONG TargetDataRep, + _In_opt_ PCtxtHandle phNewContext, + _In_opt_ PSecBufferDesc pOutput, + _Out_ PULONG pfContextAttr, + _Out_opt_ PTimeStamp ptsExpiry); typedef SECURITY_STATUS @@ -9391,15 +9396,15 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY AcquireCredentialsHandleW( - __in_opt PSSPI_SEC_STRING pPrincipal, - __in PSSPI_SEC_STRING pPackage, - __in ULONG fCredentialUse, - __in_opt PVOID pvLogonId, - __in_opt PVOID pAuthData, - __in_opt SEC_GET_KEY_FN pGetKeyFn, - __in_opt PVOID pvGetKeyArgument, - __out PCredHandle phCredential, - __out_opt PTimeStamp ptsExpiry); + _In_opt_ PSSPI_SEC_STRING pPrincipal, + _In_ PSSPI_SEC_STRING pPackage, + _In_ ULONG fCredentialUse, + _In_opt_ PVOID pvLogonId, + _In_opt_ PVOID pAuthData, + _In_opt_ SEC_GET_KEY_FN pGetKeyFn, + _In_opt_ PVOID pvGetKeyArgument, + _Out_ PCredHandle phCredential, + _Out_opt_ PTimeStamp ptsExpiry); #define AcquireCredentialsHandle AcquireCredentialsHandleW typedef @@ -9419,14 +9424,14 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY AddCredentialsA( - __in PCredHandle hCredentials, - __in_opt LPSTR pszPrincipal, - __in LPSTR pszPackage, - __in ULONG fCredentialUse, - __in_opt PVOID pAuthData, - __in_opt SEC_GET_KEY_FN pGetKeyFn, - __in_opt PVOID pvGetKeyArgument, - __out_opt PTimeStamp ptsExpiry); + _In_ PCredHandle hCredentials, + _In_opt_ LPSTR pszPrincipal, + _In_ LPSTR pszPackage, + _In_ ULONG fCredentialUse, + _In_opt_ PVOID pAuthData, + _In_opt_ SEC_GET_KEY_FN pGetKeyFn, + _In_opt_ PVOID pvGetKeyArgument, + _Out_opt_ PTimeStamp ptsExpiry); typedef SECURITY_STATUS @@ -9444,14 +9449,14 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY AddCredentialsW( - __in PCredHandle hCredentials, - __in_opt PSSPI_SEC_STRING pPrincipal, - __in PSSPI_SEC_STRING pPackage, - __in ULONG fCredentialUse, - __in_opt PVOID pAuthData, - __in_opt SEC_GET_KEY_FN pGetKeyFn, - __in_opt PVOID pvGetKeyArgument, - __out_opt PTimeStamp ptsExpiry); + _In_ PCredHandle hCredentials, + _In_opt_ PSSPI_SEC_STRING pPrincipal, + _In_ PSSPI_SEC_STRING pPackage, + _In_ ULONG fCredentialUse, + _In_opt_ PVOID pAuthData, + _In_opt_ SEC_GET_KEY_FN pGetKeyFn, + _In_opt_ PVOID pvGetKeyArgument, + _Out_opt_ PTimeStamp ptsExpiry); typedef SECURITY_STATUS @@ -9477,8 +9482,8 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY ApplyControlToken( - __in PCtxtHandle phContext, - __in PSecBufferDesc pInput); + _In_ PCtxtHandle phContext, + _In_ PSecBufferDesc pInput); typedef SECURITY_STATUS @@ -9490,14 +9495,14 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY ChangeAccountPasswordA( - __in SEC_CHAR* pszPackageName, - __in SEC_CHAR* pszDomainName, - __in SEC_CHAR* pszAccountName, - __in SEC_CHAR* pszOldPassword, - __in SEC_CHAR* pszNewPassword, - __in BOOLEAN bImpersonating, - __in ULONG dwReserved, - __inout PSecBufferDesc pOutput); + _In_ SEC_CHAR* pszPackageName, + _In_ SEC_CHAR* pszDomainName, + _In_ SEC_CHAR* pszAccountName, + _In_ SEC_CHAR* pszOldPassword, + _In_ SEC_CHAR* pszNewPassword, + _In_ BOOLEAN bImpersonating, + _In_ ULONG dwReserved, + _Inout_ PSecBufferDesc pOutput); typedef SECURITY_STATUS @@ -9514,14 +9519,14 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY ChangeAccountPasswordW( - __in SEC_WCHAR* pszPackageName, - __in SEC_WCHAR* pszDomainName, - __in SEC_WCHAR* pszAccountName, - __in SEC_WCHAR* pszOldPassword, - __in SEC_WCHAR* pszNewPassword, - __in BOOLEAN bImpersonating, - __in ULONG dwReserved, - __inout PSecBufferDesc pOutput); + _In_ SEC_WCHAR* pszPackageName, + _In_ SEC_WCHAR* pszDomainName, + _In_ SEC_WCHAR* pszAccountName, + _In_ SEC_WCHAR* pszOldPassword, + _In_ SEC_WCHAR* pszNewPassword, + _In_ BOOLEAN bImpersonating, + _In_ ULONG dwReserved, + _Inout_ PSecBufferDesc pOutput); typedef SECURITY_STATUS @@ -9548,8 +9553,8 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY CompleteAuthToken( - __in PCtxtHandle phContext, - __in PSecBufferDesc pToken); + _In_ PCtxtHandle phContext, + _In_ PSecBufferDesc pToken); typedef SECURITY_STATUS @@ -9560,10 +9565,10 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY DecryptMessage( - __in PCtxtHandle phContext, - __inout PSecBufferDesc pMessage, - __in ULONG MessageSeqNo, - __out_opt PULONG pfQOP); + _In_ PCtxtHandle phContext, + _Inout_ PSecBufferDesc pMessage, + _In_ ULONG MessageSeqNo, + _Out_opt_ PULONG pfQOP); typedef SECURITY_STATUS @@ -9577,7 +9582,7 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY DeleteSecurityContext( - __in PCtxtHandle phContext); + _In_ PCtxtHandle phContext); typedef SECURITY_STATUS @@ -9587,10 +9592,10 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY EncryptMessage( - __in PCtxtHandle phContext, - __in ULONG fQOP, - __inout PSecBufferDesc pMessage, - __in ULONG MessageSeqNo); + _In_ PCtxtHandle phContext, + _In_ ULONG fQOP, + _Inout_ PSecBufferDesc pMessage, + _In_ ULONG MessageSeqNo); typedef SECURITY_STATUS @@ -9604,8 +9609,8 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesW( - __out PULONG pcPackages, - __deref_out PSecPkgInfoW * ppPackageInfo); + _Out_ PULONG pcPackages, + _Deref_out_ PSecPkgInfoW* ppPackageInfo); #define EnumerateSecurityPackages EnumerateSecurityPackagesW typedef @@ -9619,10 +9624,10 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY ExportSecurityContext( - __in PCtxtHandle phContext, - __in ULONG fFlags, - __out PSecBuffer pPackedContext, - __out PVOID* pToken); + _In_ PCtxtHandle phContext, + _In_ ULONG fFlags, + _Out_ PSecBuffer pPackedContext, + _Out_ PVOID* pToken); typedef SECURITY_STATUS @@ -9635,18 +9640,18 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY FreeContextBuffer( - __inout PVOID pvContextBuffer); + _Inout_ PVOID pvContextBuffer); typedef SECURITY_STATUS (SEC_ENTRY * FREE_CONTEXT_BUFFER_FN)( - __inout PVOID); + _Inout_ PVOID); KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY FreeCredentialsHandle( - __in PCredHandle phCredential); + _In_ PCredHandle phCredential); typedef SECURITY_STATUS @@ -9657,7 +9662,7 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY ImpersonateSecurityContext( - __in PCtxtHandle phContext); + _In_ PCtxtHandle phContext); typedef SECURITY_STATUS @@ -9668,10 +9673,10 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY ImportSecurityContextW( - __in PSSPI_SEC_STRING pszPackage, - __in PSecBuffer pPackedContext, - __in PVOID Token, - __out PCtxtHandle phContext); + _In_ PSSPI_SEC_STRING pszPackage, + _In_ PSecBuffer pPackedContext, + _In_ PVOID Token, + _Out_ PCtxtHandle phContext); #define ImportSecurityContext ImportSecurityContextW typedef @@ -9687,18 +9692,18 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY InitializeSecurityContextW( - __in_opt PCredHandle phCredential, - __in_opt PCtxtHandle phContext, - __in_opt PSSPI_SEC_STRING pTargetName, - __in ULONG fContextReq, - __in ULONG Reserved1, - __in ULONG TargetDataRep, - __in_opt PSecBufferDesc pInput, - __in ULONG Reserved2, - __inout_opt PCtxtHandle phNewContext, - __inout_opt PSecBufferDesc pOutput, - __out PULONG pfContextAttr, - __out_opt PTimeStamp ptsExpiry); + _In_opt_ PCredHandle phCredential, + _In_opt_ PCtxtHandle phContext, + _In_opt_ PSSPI_SEC_STRING pTargetName, + _In_ ULONG fContextReq, + _In_ ULONG Reserved1, + _In_ ULONG TargetDataRep, + _In_opt_ PSecBufferDesc pInput, + _In_ ULONG Reserved2, + _Inout_opt_ PCtxtHandle phNewContext, + _Inout_opt_ PSecBufferDesc pOutput, + _Out_ PULONG pfContextAttr, + _Out_opt_ PTimeStamp ptsExpiry); #define InitializeSecurityContext InitializeSecurityContextW typedef @@ -9733,10 +9738,10 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY MakeSignature( - __in PCtxtHandle phContext, - __in ULONG fQOP, - __in PSecBufferDesc pMessage, - __in ULONG MessageSeqNo); + _In_ PCtxtHandle phContext, + _In_ ULONG fQOP, + _In_ PSecBufferDesc pMessage, + _In_ ULONG MessageSeqNo); typedef SECURITY_STATUS @@ -9750,9 +9755,9 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY QueryContextAttributesW( - __in PCtxtHandle phContext, - __in ULONG ulAttribute, - __out PVOID pBuffer); + _In_ PCtxtHandle phContext, + _In_ ULONG ulAttribute, + _Out_ PVOID pBuffer); #define QueryContextAttributes QueryContextAttributesW typedef @@ -9767,9 +9772,9 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesW( - __in PCredHandle phCredential, - __in ULONG ulAttribute, - __inout PVOID pBuffer); + _In_ PCredHandle phCredential, + _In_ ULONG ulAttribute, + _Inout_ PVOID pBuffer); #define QueryCredentialsAttributes QueryCredentialsAttributesW typedef @@ -9784,8 +9789,8 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY QuerySecurityContextToken( - __in PCtxtHandle phContext, - __out PVOID * Token); + _In_ PCtxtHandle phContext, + _Out_ PVOID* Token); typedef SECURITY_STATUS @@ -9796,8 +9801,8 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoW( - __in PSSPI_SEC_STRING pPackageName, - __deref_out PSecPkgInfoW *ppPackageInfo); + _In_ PSSPI_SEC_STRING pPackageName, + _Deref_out_ PSecPkgInfoW *ppPackageInfo); #define QuerySecurityPackageInfo QuerySecurityPackageInfoW typedef @@ -9811,7 +9816,7 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY RevertSecurityContext( - __in PCtxtHandle phContext); + _In_ PCtxtHandle phContext); typedef SECURITY_STATUS @@ -9822,10 +9827,10 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY SetContextAttributesW( - __in PCtxtHandle phContext, - __in ULONG ulAttribute, - __in_bcount(cbBuffer) PVOID pBuffer, - __in ULONG cbBuffer); + _In_ PCtxtHandle phContext, + _In_ ULONG ulAttribute, + _In_bytecount_(cbBuffer) PVOID pBuffer, + _In_ ULONG cbBuffer); #define SetContextAttributes SetContextAttributesW typedef @@ -9843,10 +9848,10 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY SetCredentialsAttributesW( - __in PCredHandle phCredential, - __in ULONG ulAttribute, - __in_bcount(cbBuffer) PVOID pBuffer, - __in ULONG cbBuffer); + _In_ PCredHandle phCredential, + _In_ ULONG ulAttribute, + _In_bytecount_(cbBuffer) PVOID pBuffer, + _In_ ULONG cbBuffer); #define SetCredentialsAttributes SetCredentialsAttributesW typedef @@ -9863,10 +9868,10 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY VerifySignature( - __in PCtxtHandle phContext, - __in PSecBufferDesc pMessage, - __in ULONG MessageSeqNo, - __out PULONG pfQOP); + _In_ PCtxtHandle phContext, + _In_ PSecBufferDesc pMessage, + _In_ ULONG MessageSeqNo, + _Out_ PULONG pfQOP); typedef SECURITY_STATUS @@ -9876,59 +9881,57 @@ SECURITY_STATUS ULONG, PULONG); - #if (ISSP_MODE == 0) KSECDDDECLSPEC NTSTATUS NTAPI SecMakeSPN( - __in PUNICODE_STRING ServiceClass, - __in PUNICODE_STRING ServiceName, - __in_opt PUNICODE_STRING InstanceName, - __in_opt USHORT InstancePort, - __in_opt PUNICODE_STRING Referrer, - __inout PUNICODE_STRING Spn, - __out_opt PULONG Length, - __in BOOLEAN Allocate); + _In_ PUNICODE_STRING ServiceClass, + _In_ PUNICODE_STRING ServiceName, + _In_opt_ PUNICODE_STRING InstanceName, + _In_opt_ USHORT InstancePort, + _In_opt_ PUNICODE_STRING Referrer, + _Inout_ PUNICODE_STRING Spn, + _Out_opt_ PULONG Length, + _In_ BOOLEAN Allocate); #if (NTDDI_VERSION >= NTDDI_WINXP) KSECDDDECLSPEC NTSTATUS NTAPI SecMakeSPNEx( - __in PUNICODE_STRING ServiceClass, - __in PUNICODE_STRING ServiceName, - __in_opt PUNICODE_STRING InstanceName, - __in_opt USHORT InstancePort, - __in_opt PUNICODE_STRING Referrer, - __in_opt PUNICODE_STRING TargetInfo, - __inout PUNICODE_STRING Spn, - __out PULONG Length OPTIONAL, - __in BOOLEAN Allocate); + _In_ PUNICODE_STRING ServiceClass, + _In_ PUNICODE_STRING ServiceName, + _In_opt_ PUNICODE_STRING InstanceName, + _In_opt_ USHORT InstancePort, + _In_opt_ PUNICODE_STRING Referrer, + _In_opt_ PUNICODE_STRING TargetInfo, + _Inout_ PUNICODE_STRING Spn, + _Out_ PULONG Length OPTIONAL, + _In_ BOOLEAN Allocate); KSECDDDECLSPEC NTSTATUS SEC_ENTRY SecLookupAccountSid( - __in PSID Sid, - __out PULONG NameSize, - __inout PUNICODE_STRING NameBuffer, - __out PULONG DomainSize OPTIONAL, - __out_opt PUNICODE_STRING DomainBuffer, - __out PSID_NAME_USE NameUse - ); + _In_ PSID Sid, + _Out_ PULONG NameSize, + _Inout_ PUNICODE_STRING NameBuffer, + _Out_ PULONG DomainSize OPTIONAL, + _Out_opt_ PUNICODE_STRING DomainBuffer, + _Out_ PSID_NAME_USE NameUse); KSECDDDECLSPEC NTSTATUS SEC_ENTRY SecLookupAccountName( - __in PUNICODE_STRING Name, - __inout PULONG SidSize, - __out PSID Sid, - __out PSID_NAME_USE NameUse, - __out_opt PULONG DomainSize, // WDK says __out only + ... OPTIONAL - __inout_opt PUNICODE_STRING ReferencedDomain); + _In_ PUNICODE_STRING Name, + _Inout_ PULONG SidSize, + _Out_ PSID Sid, + _Out_ PSID_NAME_USE NameUse, + _Out_opt_ PULONG DomainSize, // WDK says _Out_ only + ... OPTIONAL + _Inout_opt_ PUNICODE_STRING ReferencedDomain); #endif #if (NTDDI_VERSION >= NTDDI_WS03) @@ -9936,10 +9939,10 @@ KSECDDDECLSPEC NTSTATUS SEC_ENTRY SecLookupWellKnownSid( - __in WELL_KNOWN_SID_TYPE SidType, - __out PSID Sid, - __in ULONG SidBufferSize, - __inout_opt PULONG SidSize); + _In_ WELL_KNOWN_SID_TYPE SidType, + _Out_ PSID Sid, + _In_ ULONG SidBufferSize, + _Inout_opt_ PULONG SidSize); #endif #if (NTDDI_VERSION >= NTDDI_VISTA) @@ -9947,16 +9950,16 @@ KSECDDDECLSPEC NTSTATUS NTAPI SecMakeSPNEx2( - __in PUNICODE_STRING ServiceClass, - __in PUNICODE_STRING ServiceName, - __in_opt PUNICODE_STRING InstanceName, - __in_opt USHORT InstancePort, - __in_opt PUNICODE_STRING Referrer, - __in_opt PUNICODE_STRING InTargetInfo, - __inout PUNICODE_STRING Spn, - __out_opt PULONG TotalSize, - __in BOOLEAN Allocate, - __in BOOLEAN IsTargetInfoMarshaled); + _In_ PUNICODE_STRING ServiceClass, + _In_ PUNICODE_STRING ServiceName, + _In_opt_ PUNICODE_STRING InstanceName, + _In_opt_ USHORT InstancePort, + _In_opt_ PUNICODE_STRING Referrer, + _In_opt_ PUNICODE_STRING InTargetInfo, + _Inout_ PUNICODE_STRING Spn, + _Out_opt_ PULONG TotalSize, + _In_ BOOLEAN Allocate, + _In_ BOOLEAN IsTargetInfoMarshaled); #endif #endif /* ISSP_MODE == 0 */ @@ -9966,84 +9969,84 @@ SecMakeSPNEx2( SECURITY_STATUS SEC_ENTRY SspiEncodeAuthIdentityAsStrings( - __in PSEC_WINNT_AUTH_IDENTITY_OPAQUE pAuthIdentity, - __deref_out_opt PCWSTR* ppszUserName, - __deref_out_opt PCWSTR* ppszDomainName, - __deref_opt_out_opt PCWSTR* ppszPackedCredentialsString); + _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE pAuthIdentity, + _Deref_out_opt_ PCWSTR* ppszUserName, + _Deref_out_opt_ PCWSTR* ppszDomainName, + _Deref_opt_out_opt_ PCWSTR* ppszPackedCredentialsString); SECURITY_STATUS SEC_ENTRY SspiValidateAuthIdentity( - __in PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); + _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); SECURITY_STATUS SEC_ENTRY SspiCopyAuthIdentity( - __in PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData, - __deref_out PSEC_WINNT_AUTH_IDENTITY_OPAQUE* AuthDataCopy); + _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData, + _Deref_out_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* AuthDataCopy); VOID SEC_ENTRY SspiFreeAuthIdentity( - __in_opt PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); + _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); VOID SEC_ENTRY SspiZeroAuthIdentity( - __in_opt PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); + _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); VOID SEC_ENTRY SspiLocalFree( - __in_opt PVOID DataBuffer); + _In_opt_ PVOID DataBuffer); SECURITY_STATUS SEC_ENTRY SspiEncodeStringsAsAuthIdentity( - __in_opt PCWSTR pszUserName, - __in_opt PCWSTR pszDomainName, - __in_opt PCWSTR pszPackedCredentialsString, - __deref_out PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppAuthIdentity); + _In_opt_ PCWSTR pszUserName, + _In_opt_ PCWSTR pszDomainName, + _In_opt_ PCWSTR pszPackedCredentialsString, + _Deref_out_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppAuthIdentity); SECURITY_STATUS SEC_ENTRY SspiCompareAuthIdentities( - __in_opt PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity1, - __in_opt PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity2, - __out_opt PBOOLEAN SameSuppliedUser, - __out_opt PBOOLEAN SameSuppliedIdentity); + _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity1, + _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity2, + _Out_opt_ PBOOLEAN SameSuppliedUser, + _Out_opt_ PBOOLEAN SameSuppliedIdentity); SECURITY_STATUS SEC_ENTRY SspiMarshalAuthIdentity( - __in PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity, - __out PULONG AuthIdentityLength, - __deref_out_bcount(*AuthIdentityLength) PCHAR* AuthIdentityByteArray); + _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity, + _Out_ PULONG AuthIdentityLength, + _Deref_out__bcount(*AuthIdentityLength) PCHAR* AuthIdentityByteArray); SECURITY_STATUS SEC_ENTRY SspiUnmarshalAuthIdentity( - __in PULONG AuthIdentityLength, - __in_bcount(AuthIdentityLength) PCHAR AuthIdentityByteArray, - __deref_out PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppAuthIdentity); + _In_ PULONG AuthIdentityLength, + _In__bcount(AuthIdentityLength) PCHAR AuthIdentityByteArray, + _Deref_out_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppAuthIdentity); BOOLEAN SEC_ENTRY SspiIsPromptingNeeded( - __in PULONG ErrorOrNtStatus); + _In_ PULONG ErrorOrNtStatus); SECURITY_STATUS SEC_ENTRY SspiGetTargetHostName( - __in PCWSTR pszTargetName, - __deref_out PWSTR* pszHostName); + _In_ PCWSTR pszTargetName, + _Deref_out_ PWSTR* pszHostName); SECURITY_STATUS SEC_ENTRY SspiExcludePackage( - __in_opt PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity, - __in PCWSTR pszPackageName, - __deref_out PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppNewAuthIdentity); + _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity, + _In_ PCWSTR pszPackageName, + _Deref_out_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppNewAuthIdentity); #define SEC_WINNT_AUTH_IDENTITY_MARSHALLED 0x04 #define SEC_WINNT_AUTH_IDENTITY_ONLY 0x08 diff --git a/reactos/include/psdk/sal.h b/reactos/include/psdk/sal.h index b1a126d8d5a..e3a71cfd31b 100644 --- a/reactos/include/psdk/sal.h +++ b/reactos/include/psdk/sal.h @@ -21,312 +21,695 @@ */ #pragma once -#define __specstrings +#define __ATTR_SAL -#ifdef __cplusplus -#ifndef __nothrow -#define __nothrow __declspec(nothrow) -#endif -#else -#ifndef __nothrow -#define __nothrow -#endif +/* HACK: gcc's C++ headers conflict with oldstyle macros */ +#if !defined(__cplusplus) || !defined(__GNUC__) +#include #endif - -#if defined(_PREFAST_) && !defined(__midl) - -#define SPECSTRINGIZE(x) #x -#define __null __declspec("SAL_null") -#define __notnull __declspec("SAL_notnull") -#define __maybenull __declspec("SAL_maybenull") -#define __readonly __declspec("SAL_readonly") -#define __notreadonly __declspec("SAL_notreadonly") -#define __maybereadonly __declspec("SAL_maybereadonly") -#define __valid __declspec("SAL_valid") -#define __notvalid __declspec("SAL_notvalid") -#define __maybevalid __declspec("SAL_maybevalid") -#define __readableTo(extent) __declspec("SAL_readableTo("SPECSTRINGIZE(extent)")") -#define __elem_readableTo(size) __declspec("SAL_readableTo(elementCount("SPECSTRINGIZE(size)"))") -#define __byte_readableTo(size) __declspec("SAL_readableTo(byteCount("SPECSTRINGIZE(size)"))") -#define __writableTo(size) __declspec("SAL_writableTo("SPECSTRINGIZE(size)")") -#define __elem_writableTo(size) __declspec("SAL_writableTo(elementCount("SPECSTRINGIZE(size)"))") -#define __byte_writableTo(size) __declspec("SAL_writableTo(byteCount("SPECSTRINGIZE(size)"))") -#define __deref __declspec("SAL_deref") -#define __pre __declspec("SAL_pre") -#define __post __declspec("SAL_post") -#define __precond(expr) __pre -#define __postcond(expr) __post -#define __exceptthat __declspec("SAL_except") -#define __execeptthat __exceptthat -#define __refparam __deref __notreadonly -#define __inner_control_entrypoint(category) __declspec("SAL_entrypoint(controlEntry, "SPECSTRINGIZE(category)")") -#define __inner_data_entrypoint(category) __declspec("SAL_entrypoint(dataEntry, "SPECSTRINGIZE(category)")") -#define __inner_success(expr) __declspec("SAL_success("SPECSTRINGIZE(expr)")") -#define __inner_checkReturn __declspec("SAL_checkReturn") -#define __inner_typefix(ctype) __declspec("SAL_typefix("SPECSTRINGIZE(ctype)")") -#define __inner_override __declspec("__override") -#define __inner_callback __declspec("__callback") -#define __inner_blocksOn(resource) __declspec("SAL_blocksOn("SPECSTRINGIZE(resource)")") -#define __inner_fallthrough_dec __inline __nothrow void __FallThrough() {} -#define __inner_fallthrough __FallThrough(); - -#else - -#define __null -#define __notnull -#define __maybenull -#define __readonly -#define __notreadonly -#define __maybereadonly -#define __valid -#define __notvalid -#define __maybevalid -#define __readableTo(extent) -#define __elem_readableTo(size) -#define __byte_readableTo(size) -#define __writableTo(size) -#define __elem_writableTo(size) -#define __byte_writableTo(size) -#define __deref -#define __pre -#define __post -#define __precond(expr) -#define __postcond(expr) -#define __exceptthat -#define __execeptthat -#define __inner_success(expr) -#define __inner_checkReturn -#define __inner_typefix(ctype) -#define __inner_override -#define __inner_callback -#define __inner_blocksOn(resource) -#define __inner_fallthrough_dec -#define __inner_fallthrough -#define __refparam -#define __inner_control_entrypoint(category) -#define __inner_data_entrypoint(category) - -#endif /* defined(_PREFAST_) && !defined(__midl) */ - -#define __bcount(size) __notnull __byte_writableTo(size) -#define __bcount_opt(size) __bcount(size) __exceptthat __maybenull - -#define __ecount(size) __notnull __elem_writableTo(size) -#define __ecount_opt(size) __ecount(size) __exceptthat __maybenull - -#define __in __pre __valid __pre __deref __readonly -#define __in_ecount(size) __in __pre __elem_readableTo(size) -#define __in_bcount(size) __in __pre __byte_readableTo(size) -#define __in_z __in __pre __nullterminated -#define __in_ecount_z(size) __in_ecount(size) __pre __nullterminated -#define __in_bcount_z(size) __in_bcount(size) __pre __nullterminated -#define __in_nz __in -#define __in_ecount_nz(size) __in_ecount(size) -#define __in_bcount_nz(size) __in_bcount(size) -#define __in_opt __in __exceptthat __maybenull -#define __in_ecount_opt(size) __in_ecount(size) __exceptthat __maybenull -#define __in_bcount_opt(size) __in_bcount(size) __exceptthat __maybenull -#define __in_z_opt __in_opt __pre __nullterminated -#define __in_ecount_z_opt(size) __in_ecount_opt(size) __pre __nullterminated -#define __in_bcount_z_opt(size) __in_bcount_opt(size) __pre __nullterminated -#define __in_nz_opt __in_opt -#define __in_ecount_nz_opt(size) __in_ecount_opt(size) -#define __in_bcount_nz_opt(size) __in_bcount_opt(size) - -#define __inout __pre __valid __post __valid __refparam -#define __inout_ecount(size) __out_ecount(size) __pre __valid -#define __inout_bcount(size) __out_bcount(size) __pre __valid -#define __inout_ecount_part(size,length) __out_ecount_part(size,length) __pre __valid __pre __elem_readableTo(length) -#define __inout_bcount_part(size,length) __out_bcount_part(size,length) __pre __valid __pre __byte_readableTo(length) -#define __inout_ecount_full(size) __inout_ecount_part(size,size) -#define __inout_bcount_full(size) __inout_bcount_part(size,size) -#define __inout_z __inout __pre __nullterminated __post __nullterminated -#define __inout_ecount_z(size) __inout_ecount(size) __pre __nullterminated __post __nullterminated -#define __inout_bcount_z(size) __inout_bcount(size) __pre __nullterminated __post __nullterminated -#define __inout_nz __inout -#define __inout_ecount_nz(size) __inout_ecount(size) -#define __inout_bcount_nz(size) __inout_bcount(size) -#define __inout_opt __inout __exceptthat __maybenull -#define __inout_ecount_opt(size) __inout_ecount(size) __exceptthat __maybenull -#define __inout_bcount_opt(size) __inout_bcount(size) __exceptthat __maybenull -#define __inout_ecount_part_opt(size,length) __inout_ecount_part(size,length) __exceptthat __maybenull -#define __inout_bcount_part_opt(size,length) __inout_bcount_part(size,length) __exceptthat __maybenull -#define __inout_ecount_full_opt(size) __inout_ecount_full(size) __exceptthat __maybenull -#define __inout_bcount_full_opt(size) __inout_bcount_full(size) __exceptthat __maybenull -#define __inout_z_opt __inout_opt __pre __nullterminated __post __nullterminated -#define __inout_ecount_z_opt(size) __inout_ecount_opt(size) __pre __nullterminated __post __nullterminated -#define __inout_bcount_z_opt(size) __inout_bcount_opt(size) -#define __inout_nz_opt __inout_opt -#define __inout_ecount_nz_opt(size) __inout_ecount_opt(size) -#define __inout_bcount_nz_opt(size) __inout_bcount_opt(size) - -#define __out __ecount(1) __post __valid __refparam -#define __out_ecount(size) __ecount(size) __post __valid __refparam -#define __out_bcount(size) __bcount(size) __post __valid __refparam -#define __out_ecount_part(size,length) __out_ecount(size) __post __elem_readableTo(length) -#define __out_bcount_part(size,length) __out_bcount(size) __post __byte_readableTo(length) -#define __out_ecount_full(size) __out_ecount_part(size,size) -#define __out_bcount_full(size) __out_bcount_part(size,size) -#define __out_z __post __valid __refparam __post __nullterminated -#define __out_z_opt __post __valid __refparam __post __nullterminated __exceptthat __maybenull -#define __out_ecount_z(size) __ecount(size) __post __valid __refparam __post __nullterminated -#define __out_bcount_z(size) __bcount(size) __post __valid __refparam __post __nullterminated -#define __out_ecount_part_z(size,length) __out_ecount_part(size,length) __post __nullterminated -#define __out_bcount_part_z(size,length) __out_bcount_part(size,length) __post __nullterminated -#define __out_ecount_full_z(size) __out_ecount_full(size) __post __nullterminated -#define __out_bcount_full_z(size) __out_bcount_full(size) __post __nullterminated -#define __out_nz __post __valid __refparam __post -#define __out_nz_opt __post __valid __refparam __post __exceptthat __maybenull -#define __out_ecount_nz(size) __ecount(size) __post __valid __refparam -#define __out_bcount_nz(size) __bcount(size) __post __valid __refparam -#define __out_opt __out __exceptthat __maybenull -#define __out_ecount_opt(size) __out_ecount(size) __exceptthat __maybenull -#define __out_bcount_opt(size) __out_bcount(size) __exceptthat __maybenull -#define __out_ecount_part_opt(size,length) __out_ecount_part(size,length) __exceptthat __maybenull -#define __out_bcount_part_opt(size,length) __out_bcount_part(size,length) __exceptthat __maybenull -#define __out_ecount_full_opt(size) __out_ecount_full(size) __exceptthat __maybenull -#define __out_bcount_full_opt(size) __out_bcount_full(size) __exceptthat __maybenull -#define __out_ecount_z_opt(size) __out_ecount_opt(size) __post __nullterminated -#define __out_bcount_z_opt(size) __out_bcount_opt(size) __post __nullterminated -#define __out_ecount_part_z_opt(size,length) __out_ecount_part_opt(size,length) __post __nullterminated -#define __out_bcount_part_z_opt(size,length) __out_bcount_part_opt(size,length) __post __nullterminated -#define __out_ecount_full_z_opt(size) __out_ecount_full_opt(size) __post __nullterminated -#define __out_bcount_full_z_opt(size) __out_bcount_full_opt(size) __post __nullterminated -#define __out_ecount_nz_opt(size) __out_ecount_opt(size) __post __nullterminated -#define __out_bcount_nz_opt(size) __out_bcount_opt(size) __post __nullterminated - -#define __deref_ecount(size) __ecount(1) __post __elem_readableTo(1) __post __deref __notnull __post __deref __elem_writableTo(size) -#define __deref_bcount(size) __ecount(1) __post __elem_readableTo(1) __post __deref __notnull __post __deref __byte_writableTo(size) -#define __deref_out __deref_ecount(1) __post __deref __valid __refparam -#define __deref_out_ecount(size) __deref_ecount(size) __post __deref __valid __refparam -#define __deref_out_bcount(size) __deref_bcount(size) __post __deref __valid __refparam -#define __deref_out_ecount_part(size,length) __deref_out_ecount(size) __post __deref __elem_readableTo(length) -#define __deref_out_bcount_part(size,length) __deref_out_bcount(size) __post __deref __byte_readableTo(length) -#define __deref_out_ecount_full(size) __deref_out_ecount_part(size,size) -#define __deref_out_bcount_full(size) __deref_out_bcount_part(size,size) -#define __deref_out_z __post __deref __valid __refparam __post __deref __nullterminated -#define __deref_out_ecount_z(size) __deref_out_ecount(size) __post __deref __nullterminated -#define __deref_out_bcount_z(size) __deref_out_ecount(size) __post __deref __nullterminated -#define __deref_out_nz __deref_out -#define __deref_out_ecount_nz(size) __deref_out_ecount(size) -#define __deref_out_bcount_nz(size) __deref_out_ecount(size) -#define __deref_inout __notnull __elem_readableTo(1) __pre __deref __valid __post __deref __valid __refparam -#define __deref_inout_z __deref_inout __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_inout_ecount(size) __deref_inout __pre __deref __elem_writableTo(size) __post __deref __elem_writableTo(size) -#define __deref_inout_bcount(size) __deref_inout __pre __deref __byte_writableTo(size) __post __deref __byte_writableTo(size) -#define __deref_inout_ecount_part(size,length) __deref_inout_ecount(size) __pre __deref __elem_readableTo(length) __post __deref __elem_readableTo(length) -#define __deref_inout_bcount_part(size,length) __deref_inout_bcount(size) __pre __deref __byte_readableTo(length) __post __deref __byte_readableTo(length) -#define __deref_inout_ecount_full(size) __deref_inout_ecount_part(size,size) -#define __deref_inout_bcount_full(size) __deref_inout_bcount_part(size,size) -#define __deref_inout_ecount_z(size) __deref_inout_ecount(size) __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_inout_bcount_z(size) __deref_inout_bcount(size) __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_inout_nz __deref_inout -#define __deref_inout_ecount_nz(size) __deref_inout_ecount(size) -#define __deref_inout_bcount_nz(size) __deref_inout_ecount(size) -#define __deref_ecount_opt(size) __deref_ecount(size) __post __deref __exceptthat __maybenull -#define __deref_bcount_opt(size) __deref_bcount(size) __post __deref __exceptthat __maybenull -#define __deref_out_opt __deref_out __post __deref __exceptthat __maybenull -#define __deref_out_ecount_opt(size) __deref_out_ecount(size) __post __deref __exceptthat __maybenull -#define __deref_out_bcount_opt(size) __deref_out_bcount(size) __post __deref __exceptthat __maybenull -#define __deref_out_ecount_part_opt(size,length) __deref_out_ecount_part(size,length) __post __deref __exceptthat __maybenull -#define __deref_out_bcount_part_opt(size,length) __deref_out_bcount_part(size,length) __post __deref __exceptthat __maybenull -#define __deref_out_ecount_full_opt(size) __deref_out_ecount_full(size) __post __deref __exceptthat __maybenull -#define __deref_out_bcount_full_opt(size) __deref_out_bcount_full(size) __post __deref __exceptthat __maybenull -#define __deref_out_z_opt __post __deref __valid __refparam __execeptthat __maybenull __post __deref __nullterminated -#define __deref_out_ecount_z_opt(size) __deref_out_ecount_opt(size) __post __deref __nullterminated -#define __deref_out_bcount_z_opt(size) __deref_out_bcount_opt(size) __post __deref __nullterminated -#define __deref_out_nz_opt __deref_out_opt -#define __deref_out_ecount_nz_opt(size) __deref_out_ecount_opt(size) -#define __deref_out_bcount_nz_opt(size) __deref_out_bcount_opt(size) -#define __deref_inout_opt __deref_inout __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull -#define __deref_inout_ecount_opt(size) __deref_inout_ecount(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull -#define __deref_inout_bcount_opt(size) __deref_inout_bcount(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull -#define __deref_inout_ecount_part_opt(size,length) __deref_inout_ecount_part(size,length) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull -#define __deref_inout_bcount_part_opt(size,length) __deref_inout_bcount_part(size,length) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull -#define __deref_inout_ecount_full_opt(size) __deref_inout_ecount_full(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull -#define __deref_inout_bcount_full_opt(size) __deref_inout_bcount_full(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull -#define __deref_inout_z_opt __deref_inout_opt __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_inout_ecount_z_opt(size) __deref_inout_ecount_opt(size) __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_inout_bcount_z_opt(size) __deref_inout_bcount_opt(size) __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_inout_nz_opt __deref_inout_opt -#define __deref_inout_ecount_nz_opt(size) __deref_inout_ecount_opt(size) -#define __deref_inout_bcount_nz_opt(size) __deref_inout_bcount_opt(size) - -#define __deref_opt_ecount(size) __deref_ecount(size) __exceptthat __maybenull -#define __deref_opt_bcount(size) __deref_bcount(size) __exceptthat __maybenull -#define __deref_opt_out __deref_out __exceptthat __maybenull -#define __deref_opt_out_z __deref_opt_out __post __deref __nullterminated -#define __deref_opt_out_ecount(size) __deref_out_ecount(size) __exceptthat __maybenull -#define __deref_opt_out_bcount(size) __deref_out_bcount(size) __exceptthat __maybenull -#define __deref_opt_out_ecount_part(size,length) __deref_out_ecount_part(size,length) __exceptthat __maybenull -#define __deref_opt_out_bcount_part(size,length) __deref_out_bcount_part(size,length) __exceptthat __maybenull -#define __deref_opt_out_ecount_full(size) __deref_out_ecount_full(size) __exceptthat __maybenull -#define __deref_opt_out_bcount_full(size) __deref_out_bcount_full(size) __exceptthat __maybenull -#define __deref_opt_inout __deref_inout __exceptthat __maybenull -#define __deref_opt_inout_ecount(size) __deref_inout_ecount(size) __exceptthat __maybenull -#define __deref_opt_inout_bcount(size) __deref_inout_bcount(size) __exceptthat __maybenull -#define __deref_opt_inout_ecount_part(size,length) __deref_inout_ecount_part(size,length) __exceptthat __maybenull -#define __deref_opt_inout_bcount_part(size,length) __deref_inout_bcount_part(size,length) __exceptthat __maybenull -#define __deref_opt_inout_ecount_full(size) __deref_inout_ecount_full(size) __exceptthat __maybenull -#define __deref_opt_inout_bcount_full(size) __deref_inout_bcount_full(size) __exceptthat __maybenull -#define __deref_opt_inout_z __deref_opt_inout __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_opt_inout_ecount_z(size) __deref_opt_inout_ecount(size) __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_opt_inout_bcount_z(size) __deref_opt_inout_bcount(size) __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_opt_inout_nz __deref_opt_inout -#define __deref_opt_inout_ecount_nz(size) __deref_opt_inout_ecount(size) -#define __deref_opt_inout_bcount_nz(size) __deref_opt_inout_bcount(size) -#define __deref_opt_ecount_opt(size) __deref_ecount_opt(size) __exceptthat __maybenull -#define __deref_opt_bcount_opt(size) __deref_bcount_opt(size) __exceptthat __maybenull -#define __deref_opt_out_opt __deref_out_opt __exceptthat __maybenull -#define __deref_opt_out_ecount_opt(size) __deref_out_ecount_opt(size) __exceptthat __maybenull -#define __deref_opt_out_bcount_opt(size) __deref_out_bcount_opt(size) __exceptthat __maybenull -#define __deref_opt_out_ecount_part_opt(size,length) __deref_out_ecount_part_opt(size,length) __exceptthat __maybenull -#define __deref_opt_out_bcount_part_opt(size,length) __deref_out_bcount_part_opt(size,length) __exceptthat __maybenull -#define __deref_opt_out_ecount_full_opt(size) __deref_out_ecount_full_opt(size) __exceptthat __maybenull -#define __deref_opt_out_bcount_full_opt(size) __deref_out_bcount_full_opt(size) __exceptthat __maybenull -#define __deref_opt_out_z_opt __post __deref __valid __refparam __exceptthat __maybenull __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull __post __deref __nullterminated -#define __deref_opt_out_ecount_z_opt(size) __deref_opt_out_ecount_opt(size) __post __deref __nullterminated -#define __deref_opt_out_bcount_z_opt(size) __deref_opt_out_bcount_opt(size) __post __deref __nullterminated -#define __deref_opt_out_nz_opt __deref_opt_out_opt -#define __deref_opt_out_ecount_nz_opt(size) __deref_opt_out_ecount_opt(size) -#define __deref_opt_out_bcount_nz_opt(size) __deref_opt_out_bcount_opt(size) -#define __deref_opt_inout_opt __deref_inout_opt __exceptthat __maybenull -#define __deref_opt_inout_ecount_opt(size) __deref_inout_ecount_opt(size) __exceptthat __maybenull -#define __deref_opt_inout_bcount_opt(size) __deref_inout_bcount_opt(size) __exceptthat __maybenull -#define __deref_opt_inout_ecount_part_opt(size,length) __deref_inout_ecount_part_opt(size,length) __exceptthat __maybenull -#define __deref_opt_inout_bcount_part_opt(size,length) __deref_inout_bcount_part_opt(size,length) __exceptthat __maybenull -#define __deref_opt_inout_ecount_full_opt(size) __deref_inout_ecount_full_opt(size) __exceptthat __maybenull -#define __deref_opt_inout_bcount_full_opt(size) __deref_inout_bcount_full_opt(size) __exceptthat __maybenull -#define __deref_opt_inout_z_opt __deref_opt_inout_opt __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_opt_inout_ecount_z_opt(size) __deref_opt_inout_ecount_opt(size) __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_opt_inout_bcount_z_opt(size) __deref_opt_inout_bcount_opt(size) __pre __deref __nullterminated __post __deref __nullterminated -#define __deref_opt_inout_nz_opt __deref_opt_inout_opt -#define __deref_opt_inout_ecount_nz_opt(size) __deref_opt_inout_ecount_opt(size) -#define __deref_opt_inout_bcount_nz_opt(size) __deref_opt_inout_bcount_opt(size) - -#define __success(expr) __inner_success(expr) -#define __nullterminated __readableTo(sentinel(0)) -#define __nullnullterminated -#define __reserved __pre __null -#define __checkReturn __inner_checkReturn -#define __typefix(ctype) __inner_typefix(ctype) -#define __override __inner_override -#define __callback __inner_callback -#define __format_string -#define __blocksOn(resource) __inner_blocksOn(resource) -#define __control_entrypoint(category) __inner_control_entrypoint(category) -#define __data_entrypoint(category) __inner_data_entrypoint(category) - -#ifndef __fallthrough -__inner_fallthrough_dec -#define __fallthrough __inner_fallthrough -#endif - -#ifndef __analysis_assume #ifdef _PREFAST_ -#define __analysis_assume(expr) __assume(expr) + +#ifndef _USE_DECLSPECS_FOR_SAL +#define _USE_DECLSPECS_FOR_SAL 1 +#endif + +#if !defined(_USE_ATTRIBUTES_FOR_SAL) || _USE_DECLSPECS_FOR_SAL +#define _USE_ATTRIBUTES_FOR_SAL 0 +#endif + +#if !_USE_DECLSPECS_FOR_SAL && !_USE_ATTRIBUTES_FOR_SAL +#if _MSC_VER >= 1400 +#undef _USE_ATTRIBUTES_FOR_SAL +#define _USE_ATTRIBUTES_FOR_SAL 1 #else -#define __analysis_assume(expr) +#undef _USE_DECLSPECS_FOR_SAL +#define _USE_DECLSPECS_FOR_SAL 1 +#endif /* _MSC_VER >= 1400 */ +#endif /* !_USE_DECLSPECS_FOR_SAL && !_USE_ATTRIBUTES_FOR_SAL */ + +#else /* _PREFAST_ */ + +#undef _USE_DECLSPECS_FOR_SAL +#define _USE_DECLSPECS_FOR_SAL 0 +#undef _USE_ATTRIBUTES_FOR_SAL +#define _USE_ATTRIBUTES_FOR_SAL 0 + +#endif /* _PREFAST_ */ + +#if defined(MIDL_PASS) || defined(__midl) || defined(RC_INVOKED) +#undef _USE_DECLSPECS_FOR_SAL +#define _USE_DECLSPECS_FOR_SAL 0 +#undef _USE_ATTRIBUTES_FOR_SAL +#define _USE_ATTRIBUTES_FOR_SAL 0 #endif + +#if !defined(_MSC_EXTENSIONS) +#undef _USE_ATTRIBUTES_FOR_SAL +#define _USE_ATTRIBUTES_FOR_SAL 0 #endif + + +#if _USE_ATTRIBUTES_FOR_SAL || _USE_DECLSPECS_FOR_SAL + +#error unimplemented + +#if _USE_ATTRIBUTES_FOR_SAL + +#else /* #if _USE_DECLSPECS_FOR_SAL */ + +#endif + + +#else /* _USE_ATTRIBUTES_FOR_SAL || _USE_DECLSPECS_FOR_SAL */ + +#define __inner_exceptthat +#define __inner_typefix(ctype) +#define _Always_(annos) +#define _At_(target, annos) +#define _At_buffer_(target, iter, bound, annos) +#define _Check_return_ +#define _COM_Outptr_ +#define _COM_Outptr_opt_ +#define _COM_Outptr_opt_result_maybenull_ +#define _COM_Outptr_result_maybenull_ +#define _Const_ +#define _Deref_in_bound_ +#define _Deref_in_range_(lb,ub) +#define _Deref_inout_bound_ +#define _Deref_inout_z_ +#define _Deref_inout_z_bytecap_c_(size) +#define _Deref_inout_z_cap_c_(size) +#define _Deref_opt_out_ +#define _Deref_opt_out_opt_ +#define _Deref_opt_out_opt_z_ +#define _Deref_opt_out_z_ +#define _Deref_out_ +#define _Deref_out_bound_ +#define _Deref_out_opt_ +#define _Deref_out_opt_z_ +#define _Deref_out_range_(lb,ub) +#define _Deref_out_z_ +#define _Deref_out_z_bytecap_c_(size) +#define _Deref_out_z_cap_c_(size) +#define _Deref_post_bytecap_(size) +#define _Deref_post_bytecap_c_(size) +#define _Deref_post_bytecap_x_(size) +#define _Deref_post_bytecount_(size) +#define _Deref_post_bytecount_c_(size) +#define _Deref_post_bytecount_x_(size) +#define _Deref_post_cap_(size) +#define _Deref_post_cap_c_(size) +#define _Deref_post_cap_x_(size) +#define _Deref_post_count_(size) +#define _Deref_post_count_c_(size) +#define _Deref_post_count_x_(size) +#define _Deref_post_maybenull_ +#define _Deref_post_notnull_ +#define _Deref_post_null_ +#define _Deref_post_opt_bytecap_(size) +#define _Deref_post_opt_bytecap_c_(size) +#define _Deref_post_opt_bytecap_x_(size) +#define _Deref_post_opt_bytecount_(size) +#define _Deref_post_opt_bytecount_c_(size) +#define _Deref_post_opt_bytecount_x_(size) +#define _Deref_post_opt_cap_(size) +#define _Deref_post_opt_cap_c_(size) +#define _Deref_post_opt_cap_x_(size) +#define _Deref_post_opt_count_(size) +#define _Deref_post_opt_count_c_(size) +#define _Deref_post_opt_count_x_(size) +#define _Deref_post_opt_valid_ +#define _Deref_post_opt_valid_bytecap_(size) +#define _Deref_post_opt_valid_bytecap_c_(size) +#define _Deref_post_opt_valid_bytecap_x_(size) +#define _Deref_post_opt_valid_cap_(size) +#define _Deref_post_opt_valid_cap_c_(size) +#define _Deref_post_opt_valid_cap_x_(size) +#define _Deref_post_opt_z_ +#define _Deref_post_opt_z_bytecap_(size) +#define _Deref_post_opt_z_bytecap_c_(size) +#define _Deref_post_opt_z_bytecap_x_(size) +#define _Deref_post_opt_z_cap_(size) +#define _Deref_post_opt_z_cap_c_(size) +#define _Deref_post_opt_z_cap_x_(size) +#define _Deref_post_valid_ +#define _Deref_post_valid_bytecap_(size) +#define _Deref_post_valid_bytecap_c_(size) +#define _Deref_post_valid_bytecap_x_(size) +#define _Deref_post_valid_cap_(size) +#define _Deref_post_valid_cap_c_(size) +#define _Deref_post_valid_cap_x_(size) +#define _Deref_post_z_ +#define _Deref_post_z_bytecap_(size) +#define _Deref_post_z_bytecap_c_(size) +#define _Deref_post_z_bytecap_x_(size) +#define _Deref_post_z_cap_(size) +#define _Deref_post_z_cap_c_(size) +#define _Deref_post_z_cap_x_(size) +#define _Deref_pre_bytecap_(size) +#define _Deref_pre_bytecap_c_(size) +#define _Deref_pre_bytecap_x_(size) +#define _Deref_pre_bytecount_(size) +#define _Deref_pre_bytecount_c_(size) +#define _Deref_pre_bytecount_x_(size) +#define _Deref_pre_cap_(size) +#define _Deref_pre_cap_c_(size) +#define _Deref_pre_cap_x_(size) +#define _Deref_pre_count_(size) +#define _Deref_pre_count_c_(size) +#define _Deref_pre_count_x_(size) +#define _Deref_pre_invalid_ +#define _Deref_pre_maybenull_ +#define _Deref_pre_notnull_ +#define _Deref_pre_null_ +#define _Deref_pre_opt_bytecap_(size) +#define _Deref_pre_opt_bytecap_c_(size) +#define _Deref_pre_opt_bytecap_x_(size) +#define _Deref_pre_opt_bytecount_(size) +#define _Deref_pre_opt_bytecount_c_(size) +#define _Deref_pre_opt_bytecount_x_(size) +#define _Deref_pre_opt_cap_(size) +#define _Deref_pre_opt_cap_c_(size) +#define _Deref_pre_opt_cap_x_(size) +#define _Deref_pre_opt_count_(size) +#define _Deref_pre_opt_count_c_(size) +#define _Deref_pre_opt_count_x_(size) +#define _Deref_pre_opt_valid_ +#define _Deref_pre_opt_valid_bytecap_(size) +#define _Deref_pre_opt_valid_bytecap_c_(size) +#define _Deref_pre_opt_valid_bytecap_x_(size) +#define _Deref_pre_opt_valid_cap_(size) +#define _Deref_pre_opt_valid_cap_c_(size) +#define _Deref_pre_opt_valid_cap_x_(size) +#define _Deref_pre_opt_z_ +#define _Deref_pre_opt_z_bytecap_(size) +#define _Deref_pre_opt_z_bytecap_c_(size) +#define _Deref_pre_opt_z_bytecap_x_(size) +#define _Deref_pre_opt_z_cap_(size) +#define _Deref_pre_opt_z_cap_c_(size) +#define _Deref_pre_opt_z_cap_x_(size) +#define _Deref_pre_readonly_ +#define _Deref_pre_valid_ +#define _Deref_pre_valid_bytecap_(size) +#define _Deref_pre_valid_bytecap_c_(size) +#define _Deref_pre_valid_bytecap_x_(size) +#define _Deref_pre_valid_cap_(size) +#define _Deref_pre_valid_cap_c_(size) +#define _Deref_pre_valid_cap_x_(size) +#define _Deref_pre_writeonly_ +#define _Deref_pre_z_ +#define _Deref_pre_z_bytecap_(size) +#define _Deref_pre_z_bytecap_c_(size) +#define _Deref_pre_z_bytecap_x_(size) +#define _Deref_pre_z_cap_(size) +#define _Deref_pre_z_cap_c_(size) +#define _Deref_pre_z_cap_x_(size) +#define _Deref_prepost_bytecap_(size) +#define _Deref_prepost_bytecap_x_(size) +#define _Deref_prepost_bytecount_(size) +#define _Deref_prepost_bytecount_x_(size) +#define _Deref_prepost_cap_(size) +#define _Deref_prepost_cap_x_(size) +#define _Deref_prepost_count_(size) +#define _Deref_prepost_count_x_(size) +#define _Deref_prepost_opt_bytecap_(size) +#define _Deref_prepost_opt_bytecap_x_(size) +#define _Deref_prepost_opt_bytecount_(size) +#define _Deref_prepost_opt_bytecount_x_(size) +#define _Deref_prepost_opt_cap_(size) +#define _Deref_prepost_opt_cap_x_(size) +#define _Deref_prepost_opt_count_(size) +#define _Deref_prepost_opt_count_x_(size) +#define _Deref_prepost_opt_valid_ +#define _Deref_prepost_opt_valid_bytecap_(size) +#define _Deref_prepost_opt_valid_bytecap_x_(size) +#define _Deref_prepost_opt_valid_cap_(size) +#define _Deref_prepost_opt_valid_cap_x_(size) +#define _Deref_prepost_opt_z_ +#define _Deref_prepost_opt_z_bytecap_(size) +#define _Deref_prepost_opt_z_cap_(size) +#define _Deref_prepost_valid_ +#define _Deref_prepost_valid_bytecap_(size) +#define _Deref_prepost_valid_bytecap_x_(size) +#define _Deref_prepost_valid_cap_(size) +#define _Deref_prepost_valid_cap_x_(size) +#define _Deref_prepost_z_ +#define _Deref_prepost_z_bytecap_(size) +#define _Deref_prepost_z_cap_(size) +#define _Deref_ret_bound_ +#define _Deref_ret_opt_z_ +#define _Deref_ret_range_(lb,ub) +#define _Deref_ret_z_ +#define _Deref2_pre_readonly_ +#define _Field_range_(min,max) +#define _Field_size_(size) +#define _Field_size_bytes_(size) +#define _Field_size_bytes_full_(size) +#define _Field_size_bytes_full_opt_(size) +#define _Field_size_bytes_opt_(size) +#define _Field_size_bytes_part_(size, count) +#define _Field_size_bytes_part_opt_(size, count) +#define _Field_size_full_(size) +#define _Field_size_full_opt_(size) +#define _Field_size_opt_(size) +#define _Field_size_part_(size, count) +#define _Field_size_part_opt_(size, count) +#define _Field_z_ +#define _Group_(annos) +#define _In_ +#define _In_bound_ +#define _In_bytecount_(size) +#define _In_bytecount_c_(size) +#define _In_bytecount_x_(size) +#define _In_count_(size) +#define _In_count_c_(size) +#define _In_count_x_(size) +#define _In_defensive_(annotes) +#define _In_opt_ +#define _In_opt_bytecount_(size) +#define _In_opt_bytecount_c_(size) +#define _In_opt_bytecount_x_(size) +#define _In_opt_count_(size) +#define _In_opt_count_c_(size) +#define _In_opt_count_x_(size) +#define _In_opt_ptrdiff_count_(size) +#define _In_opt_z_ +#define _In_opt_z_bytecount_(size) +#define _In_opt_z_bytecount_c_(size) +#define _In_opt_z_count_(size) +#define _In_opt_z_count_c_(size) +#define _In_ptrdiff_count_(size) +#define _In_range_(lb,ub) +#define _In_reads_(size) +#define _In_reads_bytes_(size) +#define _In_reads_bytes_opt_(size) +#define _In_reads_opt_(size) +#define _In_reads_opt_z_(size) +#define _In_reads_or_z_(size) +#define _In_reads_to_ptr_(ptr) +#define _In_reads_to_ptr_opt_(ptr) +#define _In_reads_to_ptr_opt_z_(ptr) +#define _In_reads_to_ptr_z_(ptr) +#define _In_reads_z_(size) +#define _In_z_ +#define _In_z_bytecount_(size) +#define _In_z_bytecount_c_(size) +#define _In_z_count_(size) +#define _In_z_count_c_(size) +#define _Inout_ +#define _Inout_bytecap_(size) +#define _Inout_bytecap_c_(size) +#define _Inout_bytecap_x_(size) +#define _Inout_bytecount_(size) +#define _Inout_bytecount_c_(size) +#define _Inout_bytecount_x_(size) +#define _Inout_cap_(size) +#define _Inout_cap_c_(size) +#define _Inout_cap_x_(size) +#define _Inout_count_(size) +#define _Inout_count_c_(size) +#define _Inout_count_x_(size) +#define _Inout_defensive_(annotes) +#define _Inout_opt_ +#define _Inout_opt_bytecap_(size) +#define _Inout_opt_bytecap_c_(size) +#define _Inout_opt_bytecap_x_(size) +#define _Inout_opt_bytecount_(size) +#define _Inout_opt_bytecount_c_(size) +#define _Inout_opt_bytecount_x_(size) +#define _Inout_opt_cap_(size) +#define _Inout_opt_cap_c_(size) +#define _Inout_opt_cap_x_(size) +#define _Inout_opt_count_(size) +#define _Inout_opt_count_c_(size) +#define _Inout_opt_count_x_(size) +#define _Inout_opt_ptrdiff_count_(size) +#define _Inout_opt_z_ +#define _Inout_opt_z_bytecap_(size) +#define _Inout_opt_z_bytecap_c_(size) +#define _Inout_opt_z_bytecap_x_(size) +#define _Inout_opt_z_bytecount_(size) +#define _Inout_opt_z_bytecount_c_(size) +#define _Inout_opt_z_cap_(size) +#define _Inout_opt_z_cap_c_(size) +#define _Inout_opt_z_cap_x_(size) +#define _Inout_opt_z_count_(size) +#define _Inout_opt_z_count_c_(size) +#define _Inout_ptrdiff_count_(size) +#define _Inout_updates_(size) +#define _Inout_updates_all_(size) +#define _Inout_updates_all_opt_(size) +#define _Inout_updates_bytes_(size) +#define _Inout_updates_bytes_all_(size) +#define _Inout_updates_bytes_all_opt_(size) +#define _Inout_updates_bytes_opt_(size) +#define _Inout_updates_bytes_to_(size,count) +#define _Inout_updates_bytes_to_opt_(size,count) +#define _Inout_updates_opt_(size) +#define _Inout_updates_opt_z_(size) +#define _Inout_updates_to_(size,count) +#define _Inout_updates_to_opt_(size,count) +#define _Inout_updates_z_(size) +#define _Inout_z_ +#define _Inout_z_bytecap_(size) +#define _Inout_z_bytecap_c_(size) +#define _Inout_z_bytecap_x_(size) +#define _Inout_z_bytecount_(size) +#define _Inout_z_bytecount_c_(size) +#define _Inout_z_cap_(size) +#define _Inout_z_cap_c_(size) +#define _Inout_z_cap_x_(size) +#define _Inout_z_count_(size) +#define _Inout_z_count_c_(size) +#define _Literal_ +#define _Maybenull_ +#define _Maybevalid_ +#define _Must_inspect_result_ +#define _Notliteral_ +#define _Notnull_ +#define _Notref_ +#define _Notvalid_ +#define _Null_ +#define _Null_terminated_ +#define _NullNull_terminated_ +#define _On_failure_(annos) +#define _Out_ +#define _Out_bound_ +#define _Out_bytecap_(size) +#define _Out_bytecap_c_(size) +#define _Out_bytecap_post_bytecount_(cap,count) +#define _Out_bytecap_x_(size) +#define _Out_bytecapcount_(capcount) +#define _Out_bytecapcount_x_(capcount) +#define _Out_cap_(size) +#define _Out_cap_c_(size) +#define _Out_cap_m_(mult,size) +#define _Out_cap_post_count_(cap,count) +#define _Out_cap_x_(size) +#define _Out_capcount_(capcount) +#define _Out_capcount_x_(capcount) +#define _Out_defensive_(annotes) +#define _Out_opt_ +#define _Out_opt_bytecap_(size) +#define _Out_opt_bytecap_c_(size) +#define _Out_opt_bytecap_post_bytecount_(cap,count) +#define _Out_opt_bytecap_x_(size) +#define _Out_opt_bytecapcount_(capcount) +#define _Out_opt_bytecapcount_x_(capcount) +#define _Out_opt_cap_(size) +#define _Out_opt_cap_c_(size) +#define _Out_opt_cap_m_(mult,size) +#define _Out_opt_cap_post_count_(cap,count) +#define _Out_opt_cap_x_(size) +#define _Out_opt_capcount_(capcount) +#define _Out_opt_capcount_x_(capcount) +#define _Out_opt_ptrdiff_cap_(size) +#define _Out_opt_z_bytecap_(size) +#define _Out_opt_z_bytecap_c_(size) +#define _Out_opt_z_bytecap_post_bytecount_(cap,count) +#define _Out_opt_z_bytecap_x_(size) +#define _Out_opt_z_bytecapcount_(capcount) +#define _Out_opt_z_cap_(size) +#define _Out_opt_z_cap_c_(size) +#define _Out_opt_z_cap_m_(mult,size) +#define _Out_opt_z_cap_post_count_(cap,count) +#define _Out_opt_z_cap_x_(size) +#define _Out_opt_z_capcount_(capcount) +#define _Out_ptrdiff_cap_(size) +#define _Out_range_(lb,ub) +#define _Out_writes_(size) +#define _Out_writes_all_(size) +#define _Out_writes_all_opt_(size) +#define _Out_writes_bytes_(size) +#define _Out_writes_bytes_all_(size) +#define _Out_writes_bytes_all_opt_(size) +#define _Out_writes_bytes_opt_(size) +#define _Out_writes_bytes_to_(size,count) +#define _Out_writes_bytes_to_opt_(size,count) +#define _Out_writes_opt_(size) +#define _Out_writes_opt_z_(size) +#define _Out_writes_to_(size,count) +#define _Out_writes_to_opt_(size,count) +#define _Out_writes_to_ptr_(ptr) +#define _Out_writes_to_ptr_opt_(ptr) +#define _Out_writes_to_ptr_opt_z_(ptr) +#define _Out_writes_to_ptr_z_(ptr) +#define _Out_writes_z_(size) +#define _Out_z_bytecap_(size) +#define _Out_z_bytecap_c_(size) +#define _Out_z_bytecap_post_bytecount_(cap,count) +#define _Out_z_bytecap_x_(size) +#define _Out_z_bytecapcount_(capcount) +#define _Out_z_cap_(size) +#define _Out_z_cap_c_(size) +#define _Out_z_cap_m_(mult,size) +#define _Out_z_cap_post_count_(cap,count) +#define _Out_z_cap_x_(size) +#define _Out_z_capcount_(capcount) +#define _Outptr_ +#define _Outptr_opt_ +#define _Outptr_opt_result_buffer_(size) +#define _Outptr_opt_result_buffer_all_(size) +#define _Outptr_opt_result_buffer_all_maybenull_(size) +#define _Outptr_opt_result_buffer_maybenull_(size) +#define _Outptr_opt_result_buffer_to_(size, count) +#define _Outptr_opt_result_buffer_to_maybenull_(size, count) +#define _Outptr_opt_result_bytebuffer_(size) +#define _Outptr_opt_result_bytebuffer_all_(size) +#define _Outptr_opt_result_bytebuffer_all_maybenull_(size) +#define _Outptr_opt_result_bytebuffer_maybenull_(size) +#define _Outptr_opt_result_bytebuffer_to_(size, count) +#define _Outptr_opt_result_bytebuffer_to_maybenull_(size, count) +#define _Outptr_opt_result_maybenull_ +#define _Outptr_opt_result_maybenull_z_ +#define _Outptr_opt_result_nullonfailure_ +#define _Outptr_opt_result_z_ +#define _Outptr_result_buffer_(size) +#define _Outptr_result_buffer_all_(size) +#define _Outptr_result_buffer_all_maybenull_(size) +#define _Outptr_result_buffer_maybenull_(size) +#define _Outptr_result_buffer_to_(size, count) +#define _Outptr_result_buffer_to_maybenull_(size, count) +#define _Outptr_result_bytebuffer_(size) +#define _Outptr_result_bytebuffer_all_(size) +#define _Outptr_result_bytebuffer_all_maybenull_(size) +#define _Outptr_result_bytebuffer_maybenull_(size) +#define _Outptr_result_bytebuffer_to_(size, count) +#define _Outptr_result_bytebuffer_to_maybenull_(size, count) +#define _Outptr_result_maybenull_ +#define _Outptr_result_maybenull_z_ +#define _Outptr_result_nullonfailure_ +#define _Outptr_result_z_ +#define _Outref_ +#define _Outref_result_buffer_(size) +#define _Outref_result_buffer_all_(size) +#define _Outref_result_buffer_all_maybenull_(size) +#define _Outref_result_buffer_maybenull_(size) +#define _Outref_result_buffer_to_(size, count) +#define _Outref_result_buffer_to_maybenull_(size, count) +#define _Outref_result_bytebuffer_(size) +#define _Outref_result_bytebuffer_all_(size) +#define _Outref_result_bytebuffer_all_maybenull_(size) +#define _Outref_result_bytebuffer_maybenull_(size) +#define _Outref_result_bytebuffer_to_(size, count) +#define _Outref_result_bytebuffer_to_maybenull_(size, count) +#define _Outref_result_maybenull_ +#define _Outref_result_nullonfailure_ +#define _Points_to_data_ +#define _Post_ +#define _Post_bytecap_(size) +#define _Post_bytecount_(size) +#define _Post_bytecount_c_(size) +#define _Post_bytecount_x_(size) +#define _Post_cap_(size) +#define _Post_count_(size) +#define _Post_count_c_(size) +#define _Post_count_x_(size) +#define _Post_defensive_ +#define _Post_equal_to_(expr) +#define _Post_invalid_ +#define _Post_maybenull_ +#define _Post_maybez_ +#define _Post_notnull_ +#define _Post_null_ +#define _Post_ptr_invalid_ +#define _Post_readable_byte_size_(size) +#define _Post_readable_size_(size) +#define _Post_satisfies_(cond) +#define _Post_valid_ +#define _Post_writable_byte_size_(size) +#define _Post_writable_size_(size) +#define _Post_z_ +#define _Post_z_bytecount_(size) +#define _Post_z_bytecount_c_(size) +#define _Post_z_bytecount_x_(size) +#define _Post_z_count_(size) +#define _Post_z_count_c_(size) +#define _Post_z_count_x_(size) +#define _Pre_ +#define _Pre_bytecap_(size) +#define _Pre_bytecap_c_(size) +#define _Pre_bytecap_x_(size) +#define _Pre_bytecount_(size) +#define _Pre_bytecount_c_(size) +#define _Pre_bytecount_x_(size) +#define _Pre_cap_(size) +#define _Pre_cap_c_(size) +#define _Pre_cap_c_one_ +#define _Pre_cap_for_(param) +#define _Pre_cap_m_(mult,size) +#define _Pre_cap_x_(size) +#define _Pre_count_(size) +#define _Pre_count_c_(size) +#define _Pre_count_x_(size) +#define _Pre_defensive_ +#define _Pre_equal_to_(expr) +#define _Pre_invalid_ +#define _Pre_maybenull_ +#define _Pre_notnull_ +#define _Pre_null_ +#define _Pre_opt_bytecap_(size) +#define _Pre_opt_bytecap_c_(size) +#define _Pre_opt_bytecap_x_(size) +#define _Pre_opt_bytecount_(size) +#define _Pre_opt_bytecount_c_(size) +#define _Pre_opt_bytecount_x_(size) +#define _Pre_opt_cap_(size) +#define _Pre_opt_cap_c_(size) +#define _Pre_opt_cap_c_one_ +#define _Pre_opt_cap_for_(param) +#define _Pre_opt_cap_m_(mult,size) +#define _Pre_opt_cap_x_(size) +#define _Pre_opt_count_(size) +#define _Pre_opt_count_c_(size) +#define _Pre_opt_count_x_(size) +#define _Pre_opt_ptrdiff_cap_(ptr) +#define _Pre_opt_ptrdiff_count_(ptr) +#define _Pre_opt_valid_ +#define _Pre_opt_valid_bytecap_(size) +#define _Pre_opt_valid_bytecap_c_(size) +#define _Pre_opt_valid_bytecap_x_(size) +#define _Pre_opt_valid_cap_(size) +#define _Pre_opt_valid_cap_c_(size) +#define _Pre_opt_valid_cap_x_(size) +#define _Pre_opt_z_ +#define _Pre_opt_z_bytecap_(size) +#define _Pre_opt_z_bytecap_c_(size) +#define _Pre_opt_z_bytecap_x_(size) +#define _Pre_opt_z_cap_(size) +#define _Pre_opt_z_cap_c_(size) +#define _Pre_opt_z_cap_x_(size) +#define _Pre_ptrdiff_cap_(ptr) +#define _Pre_ptrdiff_count_(ptr) +#define _Pre_readable_byte_size_(size) +#define _Pre_readable_size_(size) +#define _Pre_readonly_ +#define _Pre_satisfies_(cond) +#define _Pre_valid_ +#define _Pre_valid_bytecap_(size) +#define _Pre_valid_bytecap_c_(size) +#define _Pre_valid_bytecap_x_(size) +#define _Pre_valid_cap_(size) +#define _Pre_valid_cap_c_(size) +#define _Pre_valid_cap_x_(size) +#define _Pre_writable_byte_size_(size) +#define _Pre_writable_size_(size) +#define _Pre_writeonly_ +#define _Pre_z_ +#define _Pre_z_bytecap_(size) +#define _Pre_z_bytecap_c_(size) +#define _Pre_z_bytecap_x_(size) +#define _Pre_z_cap_(size) +#define _Pre_z_cap_c_(size) +#define _Pre_z_cap_x_(size) +#define _Prepost_bytecount_(size) +#define _Prepost_bytecount_c_(size) +#define _Prepost_bytecount_x_(size) +#define _Prepost_count_(size) +#define _Prepost_count_c_(size) +#define _Prepost_count_x_(size) +#define _Prepost_opt_bytecount_(size) +#define _Prepost_opt_bytecount_c_(size) +#define _Prepost_opt_bytecount_x_(size) +#define _Prepost_opt_count_(size) +#define _Prepost_opt_count_c_(size) +#define _Prepost_opt_count_x_(size) +#define _Prepost_opt_valid_ +#define _Prepost_opt_z_ +#define _Prepost_valid_ +#define _Prepost_z_ +#define _Printf_format_string_ +#define _Readable_bytes_(size) +#define _Readable_elements_(size) +#define _Reserved_ +#define _Result_nullonfailure_ +#define _Result_zeroonfailure_ +#define _Ret_ +#define _Ret_bound_ +#define _Ret_bytecap_(size) +#define _Ret_bytecap_c_(size) +#define _Ret_bytecap_x_(size) +#define _Ret_bytecount_(size) +#define _Ret_bytecount_c_(size) +#define _Ret_bytecount_x_(size) +#define _Ret_cap_(size) +#define _Ret_cap_c_(size) +#define _Ret_cap_x_(size) +#define _Ret_count_(size) +#define _Ret_count_c_(size) +#define _Ret_count_x_(size) +#define _Ret_maybenull_ +#define _Ret_maybenull_z_ +#define _Ret_notnull_ +#define _Ret_null_ +#define _Ret_opt_ +#define _Ret_opt_bytecap_(size) +#define _Ret_opt_bytecap_c_(size) +#define _Ret_opt_bytecap_x_(size) +#define _Ret_opt_bytecount_(size) +#define _Ret_opt_bytecount_c_(size) +#define _Ret_opt_bytecount_x_(size) +#define _Ret_opt_cap_(size) +#define _Ret_opt_cap_c_(size) +#define _Ret_opt_cap_x_(size) +#define _Ret_opt_count_(size) +#define _Ret_opt_count_c_(size) +#define _Ret_opt_count_x_(size) +#define _Ret_opt_valid_ +#define _Ret_opt_z_ +#define _Ret_opt_z_bytecap_(size) +#define _Ret_opt_z_bytecount_(size) +#define _Ret_opt_z_cap_(size) +#define _Ret_opt_z_count_(size) +#define _Ret_range_(lb,ub) +#define _Ret_valid_ +#define _Ret_writes_(size) +#define _Ret_writes_bytes_(size) +#define _Ret_writes_bytes_maybenull_(size) +#define _Ret_writes_bytes_to_(size,count) +#define _Ret_writes_bytes_to_maybenull_(size,count) +#define _Ret_writes_maybenull_(size) +#define _Ret_writes_maybenull_z_(size) +#define _Ret_writes_to_(size,count) +#define _Ret_writes_to_maybenull_(size,count) +#define _Ret_writes_z_(size) +#define _Ret_z_ +#define _Ret_z_bytecap_(size) +#define _Ret_z_bytecount_(size) +#define _Ret_z_cap_(size) +#define _Ret_z_count_(size) +#define _Return_type_success_(expr) +#define _Scanf_format_string_ +#define _Scanf_s_format_string_ +#define _Struct_size_bytes_(size) +#define _Success_(expr) +#define _Unchanged_(e) +#define _Use_decl_annotations_ +#define _Valid_ +#define _When_(expr, annos) +#define _Writable_bytes_(size) +#define _Writable_elements_(size) + +#endif /* _USE_ATTRIBUTES_FOR_SAL || _USE_ATTRIBUTES_FOR_SAL */ + diff --git a/reactos/include/psdk/sal_old.h b/reactos/include/psdk/sal_old.h new file mode 100644 index 00000000000..72a6755eb36 --- /dev/null +++ b/reactos/include/psdk/sal_old.h @@ -0,0 +1,324 @@ +/* + * sal_dep.h + * + * Old style Standard Annotation Language (SAL) definitions + * + * This file is part of the ReactOS PSDK package. + * + * Contributors: + * Timo Kreuzer (timo.kreuzer@reactos.org) + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#pragma once +#define __specstrings + +#ifdef __cplusplus +#ifndef __nothrow +#define __nothrow __declspec(nothrow) +#endif +#else +#ifndef __nothrow +#define __nothrow +#endif +#endif + + +#if defined(_PREFAST_) && !defined(__midl) + +#define SPECSTRINGIZE(x) #x +#define __byte_readableTo(size) __declspec("SAL_readableTo(byteCount("SPECSTRINGIZE(size)"))") +#define __byte_writableTo(size) __declspec("SAL_writableTo(byteCount("SPECSTRINGIZE(size)"))") +#define __deref __declspec("SAL_deref") +#define __elem_readableTo(size) __declspec("SAL_readableTo(elementCount("SPECSTRINGIZE(size)"))") +#define __elem_writableTo(size) __declspec("SAL_writableTo(elementCount("SPECSTRINGIZE(size)"))") +#define __exceptthat __declspec("SAL_except") +#define __execeptthat __exceptthat +#define __inner_blocksOn(resource) __declspec("SAL_blocksOn("SPECSTRINGIZE(resource)")") +#define __inner_callback __declspec("__callback") +#define __inner_checkReturn __declspec("SAL_checkReturn") +#define __inner_control_entrypoint(category) __declspec("SAL_entrypoint(controlEntry, "SPECSTRINGIZE(category)")") +#define __inner_data_entrypoint(category) __declspec("SAL_entrypoint(dataEntry, "SPECSTRINGIZE(category)")") +#define __inner_fallthrough __FallThrough(); +#define __inner_fallthrough_dec __inline __nothrow void __FallThrough() {} +#define __inner_override __declspec("__override") +#define __inner_success(expr) __declspec("SAL_success("SPECSTRINGIZE(expr)")") +#define __inner_typefix(ctype) __declspec("SAL_typefix("SPECSTRINGIZE(ctype)")") +#define __maybenull __declspec("SAL_maybenull") +#define __maybereadonly __declspec("SAL_maybereadonly") +#define __maybevalid __declspec("SAL_maybevalid") +#define __notnull __declspec("SAL_notnull") +#define __notreadonly __declspec("SAL_notreadonly") +#define __notvalid __declspec("SAL_notvalid") +#define __null __declspec("SAL_null") +#define __post __declspec("SAL_post") +#define __postcond(expr) __post +#define __pre __declspec("SAL_pre") +#define __precond(expr) __pre +#define __readableTo(extent) __declspec("SAL_readableTo("SPECSTRINGIZE(extent)")") +#define __readonly __declspec("SAL_readonly") +#define __refparam __deref __notreadonly +#define __valid __declspec("SAL_valid") +#define __writableTo(size) __declspec("SAL_writableTo("SPECSTRINGIZE(size)")") +#ifndef __analysis_assume +#define __analysis_assume(expr) __assume(expr) +#endif + +#else + +#define __byte_readableTo(size) +#define __byte_writableTo(size) +#define __deref +#define __elem_readableTo(size) +#define __elem_writableTo(size) +#define __exceptthat +#define __execeptthat +#define __inner_blocksOn(resource) +#define __inner_callback +#define __inner_checkReturn +#define __inner_control_entrypoint(category) +#define __inner_data_entrypoint(category) +#define __inner_fallthrough +#define __inner_fallthrough_dec +#define __inner_override +#define __inner_success(expr) +#define __inner_typefix(ctype) +#define __maybenull +#define __maybereadonly +#define __maybevalid +#define __notnull +#define __notreadonly +#define __notvalid +#define __null +#define __post +#define __postcond(expr) +#define __pre +#define __precond(expr) +#define __readableTo(extent) +#define __readonly +#define __refparam +#define __valid +#define __writableTo(size) +#ifndef __analysis_assume +#define __analysis_assume(expr) +#endif + +#endif /* defined(_PREFAST_) && !defined(__midl) */ + +#define __bcount_opt(size) __bcount(size) __exceptthat __maybenull +#define __bcount(size) __notnull __byte_writableTo(size) +#define __blocksOn(resource) __inner_blocksOn(resource) +#define __callback __inner_callback +#define __checkReturn __inner_checkReturn +#define __control_entrypoint(category) __inner_control_entrypoint(category) +#define __data_entrypoint(category) __inner_data_entrypoint(category) +#define __deref_bcount_opt(size) __deref_bcount(size) __post __deref __exceptthat __maybenull +#define __deref_bcount(size) __ecount(1) __post __elem_readableTo(1) __post __deref __notnull __post __deref __byte_writableTo(size) +#define __deref_ecount_opt(size) __deref_ecount(size) __post __deref __exceptthat __maybenull +#define __deref_ecount(size) __ecount(1) __post __elem_readableTo(1) __post __deref __notnull __post __deref __elem_writableTo(size) +#define __deref_inout __notnull __elem_readableTo(1) __pre __deref __valid __post __deref __valid __refparam +#define __deref_inout_bcount_full_opt(size) __deref_inout_bcount_full(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull +#define __deref_inout_bcount_full(size) __deref_inout_bcount_part(size,size) +#define __deref_inout_bcount_nz_opt(size) __deref_inout_bcount_opt(size) +#define __deref_inout_bcount_nz(size) __deref_inout_ecount(size) +#define __deref_inout_bcount_opt(size) __deref_inout_bcount(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull +#define __deref_inout_bcount_part_opt(size,length) __deref_inout_bcount_part(size,length) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull +#define __deref_inout_bcount_part(size,length) __deref_inout_bcount(size) __pre __deref __byte_readableTo(length) __post __deref __byte_readableTo(length) +#define __deref_inout_bcount_z_opt(size) __deref_inout_bcount_opt(size) __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_inout_bcount_z(size) __deref_inout_bcount(size) __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_inout_bcount(size) __deref_inout __pre __deref __byte_writableTo(size) __post __deref __byte_writableTo(size) +#define __deref_inout_ecount_full_opt(size) __deref_inout_ecount_full(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull +#define __deref_inout_ecount_full(size) __deref_inout_ecount_part(size,size) +#define __deref_inout_ecount_nz_opt(size) __deref_inout_ecount_opt(size) +#define __deref_inout_ecount_nz(size) __deref_inout_ecount(size) +#define __deref_inout_ecount_opt(size) __deref_inout_ecount(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull +#define __deref_inout_ecount_part_opt(size,length) __deref_inout_ecount_part(size,length) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull +#define __deref_inout_ecount_part(size,length) __deref_inout_ecount(size) __pre __deref __elem_readableTo(length) __post __deref __elem_readableTo(length) +#define __deref_inout_ecount_z_opt(size) __deref_inout_ecount_opt(size) __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_inout_ecount_z(size) __deref_inout_ecount(size) __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_inout_ecount(size) __deref_inout __pre __deref __elem_writableTo(size) __post __deref __elem_writableTo(size) +#define __deref_inout_nz __deref_inout +#define __deref_inout_nz_opt __deref_inout_opt +#define __deref_inout_opt __deref_inout __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull +#define __deref_inout_z __deref_inout __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_inout_z_opt __deref_inout_opt __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_opt_bcount_opt(size) __deref_bcount_opt(size) __exceptthat __maybenull +#define __deref_opt_bcount(size) __deref_bcount(size) __exceptthat __maybenull +#define __deref_opt_ecount_opt(size) __deref_ecount_opt(size) __exceptthat __maybenull +#define __deref_opt_ecount(size) __deref_ecount(size) __exceptthat __maybenull +#define __deref_opt_inout __deref_inout __exceptthat __maybenull +#define __deref_opt_inout_bcount_full_opt(size) __deref_inout_bcount_full_opt(size) __exceptthat __maybenull +#define __deref_opt_inout_bcount_full(size) __deref_inout_bcount_full(size) __exceptthat __maybenull +#define __deref_opt_inout_bcount_nz_opt(size) __deref_opt_inout_bcount_opt(size) +#define __deref_opt_inout_bcount_nz(size) __deref_opt_inout_bcount(size) +#define __deref_opt_inout_bcount_opt(size) __deref_inout_bcount_opt(size) __exceptthat __maybenull +#define __deref_opt_inout_bcount_part_opt(size,length) __deref_inout_bcount_part_opt(size,length) __exceptthat __maybenull +#define __deref_opt_inout_bcount_part(size,length) __deref_inout_bcount_part(size,length) __exceptthat __maybenull +#define __deref_opt_inout_bcount_z_opt(size) __deref_opt_inout_bcount_opt(size) __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_opt_inout_bcount_z(size) __deref_opt_inout_bcount(size) __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_opt_inout_bcount(size) __deref_inout_bcount(size) __exceptthat __maybenull +#define __deref_opt_inout_ecount_full_opt(size) __deref_inout_ecount_full_opt(size) __exceptthat __maybenull +#define __deref_opt_inout_ecount_full(size) __deref_inout_ecount_full(size) __exceptthat __maybenull +#define __deref_opt_inout_ecount_nz_opt(size) __deref_opt_inout_ecount_opt(size) +#define __deref_opt_inout_ecount_nz(size) __deref_opt_inout_ecount(size) +#define __deref_opt_inout_ecount_opt(size) __deref_inout_ecount_opt(size) __exceptthat __maybenull +#define __deref_opt_inout_ecount_part_opt(size,length) __deref_inout_ecount_part_opt(size,length) __exceptthat __maybenull +#define __deref_opt_inout_ecount_part(size,length) __deref_inout_ecount_part(size,length) __exceptthat __maybenull +#define __deref_opt_inout_ecount_z_opt(size) __deref_opt_inout_ecount_opt(size) __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_opt_inout_ecount_z(size) __deref_opt_inout_ecount(size) __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_opt_inout_ecount(size) __deref_inout_ecount(size) __exceptthat __maybenull +#define __deref_opt_inout_nz __deref_opt_inout +#define __deref_opt_inout_nz_opt __deref_opt_inout_opt +#define __deref_opt_inout_opt __deref_inout_opt __exceptthat __maybenull +#define __deref_opt_inout_z __deref_opt_inout __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_opt_inout_z_opt __deref_opt_inout_opt __pre __deref __nullterminated __post __deref __nullterminated +#define __deref_opt_out __deref_out __exceptthat __maybenull +#define __deref_opt_out_bcount_full_opt(size) __deref_out_bcount_full_opt(size) __exceptthat __maybenull +#define __deref_opt_out_bcount_full(size) __deref_out_bcount_full(size) __exceptthat __maybenull +#define __deref_opt_out_bcount_nz_opt(size) __deref_opt_out_bcount_opt(size) +#define __deref_opt_out_bcount_opt(size) __deref_out_bcount_opt(size) __exceptthat __maybenull +#define __deref_opt_out_bcount_part_opt(size,length) __deref_out_bcount_part_opt(size,length) __exceptthat __maybenull +#define __deref_opt_out_bcount_part(size,length) __deref_out_bcount_part(size,length) __exceptthat __maybenull +#define __deref_opt_out_bcount_z_opt(size) __deref_opt_out_bcount_opt(size) __post __deref __nullterminated +#define __deref_opt_out_bcount(size) __deref_out_bcount(size) __exceptthat __maybenull +#define __deref_opt_out_ecount_full_opt(size) __deref_out_ecount_full_opt(size) __exceptthat __maybenull +#define __deref_opt_out_ecount_full(size) __deref_out_ecount_full(size) __exceptthat __maybenull +#define __deref_opt_out_ecount_nz_opt(size) __deref_opt_out_ecount_opt(size) +#define __deref_opt_out_ecount_opt(size) __deref_out_ecount_opt(size) __exceptthat __maybenull +#define __deref_opt_out_ecount_part_opt(size,length) __deref_out_ecount_part_opt(size,length) __exceptthat __maybenull +#define __deref_opt_out_ecount_part(size,length) __deref_out_ecount_part(size,length) __exceptthat __maybenull +#define __deref_opt_out_ecount_z_opt(size) __deref_opt_out_ecount_opt(size) __post __deref __nullterminated +#define __deref_opt_out_ecount(size) __deref_out_ecount(size) __exceptthat __maybenull +#define __deref_opt_out_nz_opt __deref_opt_out_opt +#define __deref_opt_out_opt __deref_out_opt __exceptthat __maybenull +#define __deref_opt_out_z __deref_opt_out __post __deref __nullterminated +#define __deref_opt_out_z_opt __post __deref __valid __refparam __exceptthat __maybenull __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull __post __deref __nullterminated +#define __deref_out __deref_ecount(1) __post __deref __valid __refparam +#define __deref_out_bcount_full_opt(size) __deref_out_bcount_full(size) __post __deref __exceptthat __maybenull +#define __deref_out_bcount_full(size) __deref_out_bcount_part(size,size) +#define __deref_out_bcount_nz_opt(size) __deref_out_bcount_opt(size) +#define __deref_out_bcount_nz(size) __deref_out_ecount(size) +#define __deref_out_bcount_opt(size) __deref_out_bcount(size) __post __deref __exceptthat __maybenull +#define __deref_out_bcount_part_opt(size,length) __deref_out_bcount_part(size,length) __post __deref __exceptthat __maybenull +#define __deref_out_bcount_part(size,length) __deref_out_bcount(size) __post __deref __byte_readableTo(length) +#define __deref_out_bcount_z_opt(size) __deref_out_bcount_opt(size) __post __deref __nullterminated +#define __deref_out_bcount_z(size) __deref_out_ecount(size) __post __deref __nullterminated +#define __deref_out_bcount(size) __deref_bcount(size) __post __deref __valid __refparam +#define __deref_out_ecount_full_opt(size) __deref_out_ecount_full(size) __post __deref __exceptthat __maybenull +#define __deref_out_ecount_full(size) __deref_out_ecount_part(size,size) +#define __deref_out_ecount_nz_opt(size) __deref_out_ecount_opt(size) +#define __deref_out_ecount_nz(size) __deref_out_ecount(size) +#define __deref_out_ecount_opt(size) __deref_out_ecount(size) __post __deref __exceptthat __maybenull +#define __deref_out_ecount_part_opt(size,length) __deref_out_ecount_part(size,length) __post __deref __exceptthat __maybenull +#define __deref_out_ecount_part(size,length) __deref_out_ecount(size) __post __deref __elem_readableTo(length) +#define __deref_out_ecount_z_opt(size) __deref_out_ecount_opt(size) __post __deref __nullterminated +#define __deref_out_ecount_z(size) __deref_out_ecount(size) __post __deref __nullterminated +#define __deref_out_ecount(size) __deref_ecount(size) __post __deref __valid __refparam +#define __deref_out_nz __deref_out +#define __deref_out_nz_opt __deref_out_opt +#define __deref_out_opt __deref_out __post __deref __exceptthat __maybenull +#define __deref_out_z __post __deref __valid __refparam __post __deref __nullterminated +#define __deref_out_z_opt __post __deref __valid __refparam __execeptthat __maybenull __post __deref __nullterminated +#define __ecount_opt(size) __ecount(size) __exceptthat __maybenull +#define __ecount(size) __notnull __elem_writableTo(size) +#define __format_string +#define __in __pre __valid __pre __deref __readonly +#define __in_bcount_nz_opt(size) __in_bcount_opt(size) +#define __in_bcount_nz(size) __in_bcount(size) +#define __in_bcount_opt(size) __in_bcount(size) __exceptthat __maybenull +#define __in_bcount_z_opt(size) __in_bcount_opt(size) __pre __nullterminated +#define __in_bcount_z(size) __in_bcount(size) __pre __nullterminated +#define __in_bcount(size) __in __pre __byte_readableTo(size) +#define __in_ecount_nz_opt(size) __in_ecount_opt(size) +#define __in_ecount_nz(size) __in_ecount(size) +#define __in_ecount_opt(size) __in_ecount(size) __exceptthat __maybenull +#define __in_ecount_z_opt(size) __in_ecount_opt(size) __pre __nullterminated +#define __in_ecount_z(size) __in_ecount(size) __pre __nullterminated +#define __in_ecount(size) __in __pre __elem_readableTo(size) +#define __in_nz __in +#define __in_nz_opt __in_opt +#define __in_opt __in __exceptthat __maybenull +#define __in_z __in __pre __nullterminated +#define __in_z_opt __in_opt __pre __nullterminated +#define __inout __pre __valid __post __valid __refparam +#define __inout_bcount_full_opt(size) __inout_bcount_full(size) __exceptthat __maybenull +#define __inout_bcount_full(size) __inout_bcount_part(size,size) +#define __inout_bcount_nz_opt(size) __inout_bcount_opt(size) +#define __inout_bcount_nz(size) __inout_bcount(size) +#define __inout_bcount_opt(size) __inout_bcount(size) __exceptthat __maybenull +#define __inout_bcount_part_opt(size,length) __inout_bcount_part(size,length) __exceptthat __maybenull +#define __inout_bcount_part(size,length) __out_bcount_part(size,length) __pre __valid __pre __byte_readableTo(length) +#define __inout_bcount_z_opt(size) __inout_bcount_opt(size) +#define __inout_bcount_z(size) __inout_bcount(size) __pre __nullterminated __post __nullterminated +#define __inout_bcount(size) __out_bcount(size) __pre __valid +#define __inout_ecount_full_opt(size) __inout_ecount_full(size) __exceptthat __maybenull +#define __inout_ecount_full(size) __inout_ecount_part(size,size) +#define __inout_ecount_nz_opt(size) __inout_ecount_opt(size) +#define __inout_ecount_nz(size) __inout_ecount(size) +#define __inout_ecount_opt(size) __inout_ecount(size) __exceptthat __maybenull +#define __inout_ecount_part_opt(size,length) __inout_ecount_part(size,length) __exceptthat __maybenull +#define __inout_ecount_part(size,length) __out_ecount_part(size,length) __pre __valid __pre __elem_readableTo(length) +#define __inout_ecount_z_opt(size) __inout_ecount_opt(size) __pre __nullterminated __post __nullterminated +#define __inout_ecount_z(size) __inout_ecount(size) __pre __nullterminated __post __nullterminated +#define __inout_ecount(size) __out_ecount(size) __pre __valid +#define __inout_nz __inout +#define __inout_nz_opt __inout_opt +#define __inout_opt __inout __exceptthat __maybenull +#define __inout_z __inout __pre __nullterminated __post __nullterminated +#define __inout_z_opt __inout_opt __pre __nullterminated __post __nullterminated +#define __nullnullterminated +#define __nullterminated __readableTo(sentinel(0)) +#define __out __ecount(1) __post __valid __refparam +#define __out_bcount_full_opt(size) __out_bcount_full(size) __exceptthat __maybenull +#define __out_bcount_full_z_opt(size) __out_bcount_full_opt(size) __post __nullterminated +#define __out_bcount_full_z(size) __out_bcount_full(size) __post __nullterminated +#define __out_bcount_full(size) __out_bcount_part(size,size) +#define __out_bcount_nz_opt(size) __out_bcount_opt(size) __post __nullterminated +#define __out_bcount_nz(size) __bcount(size) __post __valid __refparam +#define __out_bcount_opt(size) __out_bcount(size) __exceptthat __maybenull +#define __out_bcount_part_opt(size,length) __out_bcount_part(size,length) __exceptthat __maybenull +#define __out_bcount_part_z_opt(size,length) __out_bcount_part_opt(size,length) __post __nullterminated +#define __out_bcount_part_z(size,length) __out_bcount_part(size,length) __post __nullterminated +#define __out_bcount_part(size,length) __out_bcount(size) __post __byte_readableTo(length) +#define __out_bcount_z_opt(size) __out_bcount_opt(size) __post __nullterminated +#define __out_bcount_z(size) __bcount(size) __post __valid __refparam __post __nullterminated +#define __out_bcount(size) __bcount(size) __post __valid __refparam +#define __out_ecount_full_opt(size) __out_ecount_full(size) __exceptthat __maybenull +#define __out_ecount_full_z_opt(size) __out_ecount_full_opt(size) __post __nullterminated +#define __out_ecount_full_z(size) __out_ecount_full(size) __post __nullterminated +#define __out_ecount_full(size) __out_ecount_part(size,size) +#define __out_ecount_nz_opt(size) __out_ecount_opt(size) __post __nullterminated +#define __out_ecount_nz(size) __ecount(size) __post __valid __refparam +#define __out_ecount_opt(size) __out_ecount(size) __exceptthat __maybenull +#define __out_ecount_part_opt(size,length) __out_ecount_part(size,length) __exceptthat __maybenull +#define __out_ecount_part_z_opt(size,length) __out_ecount_part_opt(size,length) __post __nullterminated +#define __out_ecount_part_z(size,length) __out_ecount_part(size,length) __post __nullterminated +#define __out_ecount_part(size,length) __out_ecount(size) __post __elem_readableTo(length) +#define __out_ecount_z_opt(size) __out_ecount_opt(size) __post __nullterminated +#define __out_ecount_z(size) __ecount(size) __post __valid __refparam __post __nullterminated +#define __out_ecount(size) __ecount(size) __post __valid __refparam +#define __out_nz __post __valid __refparam __post +#define __out_nz_opt __post __valid __refparam __post __exceptthat __maybenull +#define __out_opt __out __exceptthat __maybenull +#define __out_z __post __valid __refparam __post __nullterminated +#define __out_z_opt __post __valid __refparam __post __nullterminated __exceptthat __maybenull +#define __override __inner_override +#define __reserved __pre __null +#define __success(expr) __inner_success(expr) +#define __typefix(ctype) __inner_typefix(ctype) + +#ifndef __fallthrough +__inner_fallthrough_dec +#define __fallthrough __inner_fallthrough +#endif + diff --git a/reactos/include/psdk/specstrings.h b/reactos/include/psdk/specstrings.h index e9ca6fb47bb..c0217b1d6db 100644 --- a/reactos/include/psdk/specstrings.h +++ b/reactos/include/psdk/specstrings.h @@ -1,8 +1,25 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the w64 mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. +/* + * specstrings.h + * + * Standard Annotation Language (SAL) definitions + * + * This file is part of the ReactOS PSDK package. + * + * Contributors: + * Timo Kreuzer (timo.kreuzer@reactos.org) + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * */ + #pragma once #define SPECSTRINGS_H @@ -11,7 +28,6 @@ #define __field_bcount(size) __notnull __byte_writableTo(size) #define __field_ecount(size) __notnull __elem_writableTo(size) - #define __deref_in #define __deref_in_ecount(size) #define __deref_in_bcount(size) @@ -29,5 +45,3 @@ #define __nullnullterminated #define __analysis_assume(expr) -//#endif - diff --git a/reactos/include/xdk/sspi.h b/reactos/include/xdk/sspi.h index a5a47b02dee..40be2fc4ef1 100644 --- a/reactos/include/xdk/sspi.h +++ b/reactos/include/xdk/sspi.h @@ -286,7 +286,7 @@ typedef struct _SEC_NEGOTIATION_INFO { ULONG Size; ULONG NameLength; - SEC_WCHAR * Name; + SEC_WCHAR *Name; PVOID Reserved; } SEC_NEGOTIATION_INFO, *PSEC_NEGOTIATION_INFO; @@ -304,7 +304,8 @@ typedef struct _SEC_CHANNEL_BINDINGS #ifndef _AUTH_IDENTITY_EX2_DEFINED #define _AUTH_IDENTITY_EX2_DEFINED -typedef struct _SEC_WINNT_AUTH_IDENTITY_EX2 { +typedef struct _SEC_WINNT_AUTH_IDENTITY_EX2 +{ ULONG Version; USHORT cbHeaderLength; ULONG cbStructureLength; @@ -323,7 +324,8 @@ typedef struct _SEC_WINNT_AUTH_IDENTITY_EX2 { #ifndef _AUTH_IDENTITY_DEFINED #define _AUTH_IDENTITY_DEFINED -typedef struct _SEC_WINNT_AUTH_IDENTITY_W { +typedef struct _SEC_WINNT_AUTH_IDENTITY_W +{ PUSHORT User; ULONG UserLength; PUSHORT Domain; @@ -341,15 +343,16 @@ typedef struct _SEC_WINNT_AUTH_IDENTITY_W { #ifndef SEC_WINNT_AUTH_IDENTITY_VERSION #define SEC_WINNT_AUTH_IDENTITY_VERSION 0x200 -typedef struct _SEC_WINNT_AUTH_IDENTITY_EXW { +typedef struct _SEC_WINNT_AUTH_IDENTITY_EXW +{ ULONG Version; ULONG Length; - PUSHORT User; // Non-NULL terminated string. - ULONG UserLength; // # of characters (NOT bytes), not including NULL. - PUSHORT Domain; // Non-NULL terminated string. - ULONG DomainLength; // # of characters (NOT bytes), not including NULL. - PUSHORT Password; // Non-NULL terminated string. - ULONG PasswordLength; // # of characters (NOT bytes), not including NULL. + PUSHORT User; + ULONG UserLength; + PUSHORT Domain; + ULONG DomainLength; + PUSHORT Password; + ULONG PasswordLength; ULONG Flags; PUSHORT PackageList; ULONG PackageListLength; @@ -378,14 +381,14 @@ typedef struct _SecBuffer #else __field_bcount(cbBuffer) void SEC_FAR *pvBuffer; #endif -} SecBuffer, * PSecBuffer; +} SecBuffer, *PSecBuffer; typedef struct _SecBufferDesc { ULONG ulVersion; ULONG cBuffers; MIDL_PROP([size_is(cBuffers)]) __field_ecount(cBuffers) PSecBuffer pBuffers; -} SecBufferDesc, SEC_FAR * PSecBufferDesc; +} SecBufferDesc, SEC_FAR *PSecBufferDesc; typedef struct _SecPkgInfoW { @@ -401,8 +404,8 @@ typedef struct _SecPkgInfoW typedef struct _SecPkgCredentials_NamesW { - MIDL_PROP([string]) SEC_WCHAR * sUserName; -} SecPkgCredentials_NamesW, * PSecPkgCredentials_NamesW; + MIDL_PROP([string]) SEC_WCHAR *sUserName; +} SecPkgCredentials_NamesW, *PSecPkgCredentials_NamesW; #define SecPkgCredentials_Names SecPkgCredentials_NamesW #define PSecPkgCredentials_Names PSecPkgCredentials_NamesW @@ -423,11 +426,13 @@ typedef struct _SecPkgContext_CredentialNameW #define SecPkgContext_CredentialName SecPkgContext_CredentialNameW #define PSecPkgContext_CredentialName PSecPkgContext_CredentialNameW -typedef struct _SecPkgContext_SubjectAttributes { +typedef struct _SecPkgContext_SubjectAttributes +{ PVOID AttributeInfo; } SecPkgContext_SubjectAttributes, *PSecPkgContext_SubjectAttributes; -typedef struct _SecPkgContext_CredInfo { +typedef struct _SecPkgContext_CredInfo +{ SECPKG_CRED_CLASS CredClass; ULONG IsPromptingNeeded; } SecPkgContext_CredInfo, *PSecPkgContext_CredInfo; @@ -435,7 +440,7 @@ typedef struct _SecPkgContext_CredInfo { typedef struct _SecPkgContext_NegoPackageInfo { ULONG PackageMask; -} SecPkgContext_NegoPackageInfo, * PSecPkgContext_NegoPackageInfo; +} SecPkgContext_NegoPackageInfo, *PSecPkgContext_NegoPackageInfo; typedef struct _SecPkgContext_NegoStatus { @@ -468,7 +473,7 @@ typedef struct _SecPkgContext_Lifespan typedef struct _SecPkgContext_PasswordExpiry { TimeStamp tsPasswordExpires; -} SecPkgContext_PasswordExpiry, * PSecPkgContext_PasswordExpiry; +} SecPkgContext_PasswordExpiry, *PSecPkgContext_PasswordExpiry; typedef struct _SecPkgContext_ProtoInfoW { @@ -533,7 +538,7 @@ typedef struct _SecPkgContext_NegotiationInfoW { PSecPkgInfoW PackageInfo ; ULONG NegotiationState ; -} SecPkgContext_NegotiationInfoW, *PSecPkgContext_NegotiationInfoW ; +} SecPkgContext_NegotiationInfoW, *PSecPkgContext_NegotiationInfoW; typedef struct _SecPkgContext_AuthorityW { @@ -549,7 +554,7 @@ typedef struct _SecPkgCredentials_SSIProviderW SEC_WCHAR *sProviderName; ULONG ProviderInfoLength; PCHAR ProviderInfo; -} SecPkgCredentials_SSIProviderW, * PSecPkgCredentials_SSIProviderW; +} SecPkgCredentials_SSIProviderW, *PSecPkgCredentials_SSIProviderW; #define SecPkgCredentials_SSIProvider SecPkgCredentials_SSIProviderW #define PSecPkgCredentials_SSIProvider PSecPkgCredentials_SSIProviderW @@ -560,7 +565,7 @@ typedef struct _SecPkgContext_LogoffTime #endif /* forward declaration */ -typedef struct _SECURITY_FUNCTION_TABLE_W SecurityFunctionTableW, * PSecurityFunctionTableW; +typedef struct _SECURITY_FUNCTION_TABLE_W SecurityFunctionTableW, *PSecurityFunctionTableW; #define SecurityFunctionTable SecurityFunctionTableW #define PSecurityFunctionTable PSecurityFunctionTableW @@ -577,15 +582,15 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY AcceptSecurityContext( - __in_opt PCredHandle phCredential, - __in_opt PCtxtHandle phContext, - __in_opt PSecBufferDesc pInput, - __in ULONG fContextReq, - __in ULONG TargetDataRep, - __in_opt PCtxtHandle phNewContext, - __in_opt PSecBufferDesc pOutput, - __out PULONG pfContextAttr, - __out_opt PTimeStamp ptsExpiry); + _In_opt_ PCredHandle phCredential, + _In_opt_ PCtxtHandle phContext, + _In_opt_ PSecBufferDesc pInput, + _In_ ULONG fContextReq, + _In_ ULONG TargetDataRep, + _In_opt_ PCtxtHandle phNewContext, + _In_opt_ PSecBufferDesc pOutput, + _Out_ PULONG pfContextAttr, + _Out_opt_ PTimeStamp ptsExpiry); typedef SECURITY_STATUS @@ -604,15 +609,15 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY AcquireCredentialsHandleW( - __in_opt PSSPI_SEC_STRING pPrincipal, - __in PSSPI_SEC_STRING pPackage, - __in ULONG fCredentialUse, - __in_opt PVOID pvLogonId, - __in_opt PVOID pAuthData, - __in_opt SEC_GET_KEY_FN pGetKeyFn, - __in_opt PVOID pvGetKeyArgument, - __out PCredHandle phCredential, - __out_opt PTimeStamp ptsExpiry); + _In_opt_ PSSPI_SEC_STRING pPrincipal, + _In_ PSSPI_SEC_STRING pPackage, + _In_ ULONG fCredentialUse, + _In_opt_ PVOID pvLogonId, + _In_opt_ PVOID pAuthData, + _In_opt_ SEC_GET_KEY_FN pGetKeyFn, + _In_opt_ PVOID pvGetKeyArgument, + _Out_ PCredHandle phCredential, + _Out_opt_ PTimeStamp ptsExpiry); #define AcquireCredentialsHandle AcquireCredentialsHandleW typedef @@ -632,14 +637,14 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY AddCredentialsA( - __in PCredHandle hCredentials, - __in_opt LPSTR pszPrincipal, - __in LPSTR pszPackage, - __in ULONG fCredentialUse, - __in_opt PVOID pAuthData, - __in_opt SEC_GET_KEY_FN pGetKeyFn, - __in_opt PVOID pvGetKeyArgument, - __out_opt PTimeStamp ptsExpiry); + _In_ PCredHandle hCredentials, + _In_opt_ LPSTR pszPrincipal, + _In_ LPSTR pszPackage, + _In_ ULONG fCredentialUse, + _In_opt_ PVOID pAuthData, + _In_opt_ SEC_GET_KEY_FN pGetKeyFn, + _In_opt_ PVOID pvGetKeyArgument, + _Out_opt_ PTimeStamp ptsExpiry); typedef SECURITY_STATUS @@ -657,14 +662,14 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY AddCredentialsW( - __in PCredHandle hCredentials, - __in_opt PSSPI_SEC_STRING pPrincipal, - __in PSSPI_SEC_STRING pPackage, - __in ULONG fCredentialUse, - __in_opt PVOID pAuthData, - __in_opt SEC_GET_KEY_FN pGetKeyFn, - __in_opt PVOID pvGetKeyArgument, - __out_opt PTimeStamp ptsExpiry); + _In_ PCredHandle hCredentials, + _In_opt_ PSSPI_SEC_STRING pPrincipal, + _In_ PSSPI_SEC_STRING pPackage, + _In_ ULONG fCredentialUse, + _In_opt_ PVOID pAuthData, + _In_opt_ SEC_GET_KEY_FN pGetKeyFn, + _In_opt_ PVOID pvGetKeyArgument, + _Out_opt_ PTimeStamp ptsExpiry); typedef SECURITY_STATUS @@ -690,8 +695,8 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY ApplyControlToken( - __in PCtxtHandle phContext, - __in PSecBufferDesc pInput); + _In_ PCtxtHandle phContext, + _In_ PSecBufferDesc pInput); typedef SECURITY_STATUS @@ -703,14 +708,14 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY ChangeAccountPasswordA( - __in SEC_CHAR* pszPackageName, - __in SEC_CHAR* pszDomainName, - __in SEC_CHAR* pszAccountName, - __in SEC_CHAR* pszOldPassword, - __in SEC_CHAR* pszNewPassword, - __in BOOLEAN bImpersonating, - __in ULONG dwReserved, - __inout PSecBufferDesc pOutput); + _In_ SEC_CHAR* pszPackageName, + _In_ SEC_CHAR* pszDomainName, + _In_ SEC_CHAR* pszAccountName, + _In_ SEC_CHAR* pszOldPassword, + _In_ SEC_CHAR* pszNewPassword, + _In_ BOOLEAN bImpersonating, + _In_ ULONG dwReserved, + _Inout_ PSecBufferDesc pOutput); typedef SECURITY_STATUS @@ -727,14 +732,14 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY ChangeAccountPasswordW( - __in SEC_WCHAR* pszPackageName, - __in SEC_WCHAR* pszDomainName, - __in SEC_WCHAR* pszAccountName, - __in SEC_WCHAR* pszOldPassword, - __in SEC_WCHAR* pszNewPassword, - __in BOOLEAN bImpersonating, - __in ULONG dwReserved, - __inout PSecBufferDesc pOutput); + _In_ SEC_WCHAR* pszPackageName, + _In_ SEC_WCHAR* pszDomainName, + _In_ SEC_WCHAR* pszAccountName, + _In_ SEC_WCHAR* pszOldPassword, + _In_ SEC_WCHAR* pszNewPassword, + _In_ BOOLEAN bImpersonating, + _In_ ULONG dwReserved, + _Inout_ PSecBufferDesc pOutput); typedef SECURITY_STATUS @@ -761,8 +766,8 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY CompleteAuthToken( - __in PCtxtHandle phContext, - __in PSecBufferDesc pToken); + _In_ PCtxtHandle phContext, + _In_ PSecBufferDesc pToken); typedef SECURITY_STATUS @@ -773,10 +778,10 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY DecryptMessage( - __in PCtxtHandle phContext, - __inout PSecBufferDesc pMessage, - __in ULONG MessageSeqNo, - __out_opt PULONG pfQOP); + _In_ PCtxtHandle phContext, + _Inout_ PSecBufferDesc pMessage, + _In_ ULONG MessageSeqNo, + _Out_opt_ PULONG pfQOP); typedef SECURITY_STATUS @@ -790,7 +795,7 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY DeleteSecurityContext( - __in PCtxtHandle phContext); + _In_ PCtxtHandle phContext); typedef SECURITY_STATUS @@ -800,10 +805,10 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY EncryptMessage( - __in PCtxtHandle phContext, - __in ULONG fQOP, - __inout PSecBufferDesc pMessage, - __in ULONG MessageSeqNo); + _In_ PCtxtHandle phContext, + _In_ ULONG fQOP, + _Inout_ PSecBufferDesc pMessage, + _In_ ULONG MessageSeqNo); typedef SECURITY_STATUS @@ -817,8 +822,8 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesW( - __out PULONG pcPackages, - __deref_out PSecPkgInfoW * ppPackageInfo); + _Out_ PULONG pcPackages, + _Deref_out_ PSecPkgInfoW* ppPackageInfo); #define EnumerateSecurityPackages EnumerateSecurityPackagesW typedef @@ -832,10 +837,10 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY ExportSecurityContext( - __in PCtxtHandle phContext, - __in ULONG fFlags, - __out PSecBuffer pPackedContext, - __out PVOID* pToken); + _In_ PCtxtHandle phContext, + _In_ ULONG fFlags, + _Out_ PSecBuffer pPackedContext, + _Out_ PVOID* pToken); typedef SECURITY_STATUS @@ -848,18 +853,18 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY FreeContextBuffer( - __inout PVOID pvContextBuffer); + _Inout_ PVOID pvContextBuffer); typedef SECURITY_STATUS (SEC_ENTRY * FREE_CONTEXT_BUFFER_FN)( - __inout PVOID); + _Inout_ PVOID); KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY FreeCredentialsHandle( - __in PCredHandle phCredential); + _In_ PCredHandle phCredential); typedef SECURITY_STATUS @@ -870,7 +875,7 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY ImpersonateSecurityContext( - __in PCtxtHandle phContext); + _In_ PCtxtHandle phContext); typedef SECURITY_STATUS @@ -881,10 +886,10 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY ImportSecurityContextW( - __in PSSPI_SEC_STRING pszPackage, - __in PSecBuffer pPackedContext, - __in PVOID Token, - __out PCtxtHandle phContext); + _In_ PSSPI_SEC_STRING pszPackage, + _In_ PSecBuffer pPackedContext, + _In_ PVOID Token, + _Out_ PCtxtHandle phContext); #define ImportSecurityContext ImportSecurityContextW typedef @@ -900,18 +905,18 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY InitializeSecurityContextW( - __in_opt PCredHandle phCredential, - __in_opt PCtxtHandle phContext, - __in_opt PSSPI_SEC_STRING pTargetName, - __in ULONG fContextReq, - __in ULONG Reserved1, - __in ULONG TargetDataRep, - __in_opt PSecBufferDesc pInput, - __in ULONG Reserved2, - __inout_opt PCtxtHandle phNewContext, - __inout_opt PSecBufferDesc pOutput, - __out PULONG pfContextAttr, - __out_opt PTimeStamp ptsExpiry); + _In_opt_ PCredHandle phCredential, + _In_opt_ PCtxtHandle phContext, + _In_opt_ PSSPI_SEC_STRING pTargetName, + _In_ ULONG fContextReq, + _In_ ULONG Reserved1, + _In_ ULONG TargetDataRep, + _In_opt_ PSecBufferDesc pInput, + _In_ ULONG Reserved2, + _Inout_opt_ PCtxtHandle phNewContext, + _Inout_opt_ PSecBufferDesc pOutput, + _Out_ PULONG pfContextAttr, + _Out_opt_ PTimeStamp ptsExpiry); #define InitializeSecurityContext InitializeSecurityContextW typedef @@ -946,10 +951,10 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY MakeSignature( - __in PCtxtHandle phContext, - __in ULONG fQOP, - __in PSecBufferDesc pMessage, - __in ULONG MessageSeqNo); + _In_ PCtxtHandle phContext, + _In_ ULONG fQOP, + _In_ PSecBufferDesc pMessage, + _In_ ULONG MessageSeqNo); typedef SECURITY_STATUS @@ -963,9 +968,9 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY QueryContextAttributesW( - __in PCtxtHandle phContext, - __in ULONG ulAttribute, - __out PVOID pBuffer); + _In_ PCtxtHandle phContext, + _In_ ULONG ulAttribute, + _Out_ PVOID pBuffer); #define QueryContextAttributes QueryContextAttributesW typedef @@ -980,9 +985,9 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesW( - __in PCredHandle phCredential, - __in ULONG ulAttribute, - __inout PVOID pBuffer); + _In_ PCredHandle phCredential, + _In_ ULONG ulAttribute, + _Inout_ PVOID pBuffer); #define QueryCredentialsAttributes QueryCredentialsAttributesW typedef @@ -997,8 +1002,8 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY QuerySecurityContextToken( - __in PCtxtHandle phContext, - __out PVOID * Token); + _In_ PCtxtHandle phContext, + _Out_ PVOID* Token); typedef SECURITY_STATUS @@ -1009,8 +1014,8 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoW( - __in PSSPI_SEC_STRING pPackageName, - __deref_out PSecPkgInfoW *ppPackageInfo); + _In_ PSSPI_SEC_STRING pPackageName, + _Deref_out_ PSecPkgInfoW *ppPackageInfo); #define QuerySecurityPackageInfo QuerySecurityPackageInfoW typedef @@ -1024,7 +1029,7 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY RevertSecurityContext( - __in PCtxtHandle phContext); + _In_ PCtxtHandle phContext); typedef SECURITY_STATUS @@ -1035,10 +1040,10 @@ SECURITY_STATUS SECURITY_STATUS SEC_ENTRY SetContextAttributesW( - __in PCtxtHandle phContext, - __in ULONG ulAttribute, - __in_bcount(cbBuffer) PVOID pBuffer, - __in ULONG cbBuffer); + _In_ PCtxtHandle phContext, + _In_ ULONG ulAttribute, + _In_bytecount_(cbBuffer) PVOID pBuffer, + _In_ ULONG cbBuffer); #define SetContextAttributes SetContextAttributesW typedef @@ -1056,10 +1061,10 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY SetCredentialsAttributesW( - __in PCredHandle phCredential, - __in ULONG ulAttribute, - __in_bcount(cbBuffer) PVOID pBuffer, - __in ULONG cbBuffer); + _In_ PCredHandle phCredential, + _In_ ULONG ulAttribute, + _In_bytecount_(cbBuffer) PVOID pBuffer, + _In_ ULONG cbBuffer); #define SetCredentialsAttributes SetCredentialsAttributesW typedef @@ -1076,10 +1081,10 @@ KSECDDDECLSPEC SECURITY_STATUS SEC_ENTRY VerifySignature( - __in PCtxtHandle phContext, - __in PSecBufferDesc pMessage, - __in ULONG MessageSeqNo, - __out PULONG pfQOP); + _In_ PCtxtHandle phContext, + _In_ PSecBufferDesc pMessage, + _In_ ULONG MessageSeqNo, + _Out_ PULONG pfQOP); typedef SECURITY_STATUS @@ -1089,59 +1094,57 @@ SECURITY_STATUS ULONG, PULONG); - #if (ISSP_MODE == 0) KSECDDDECLSPEC NTSTATUS NTAPI SecMakeSPN( - __in PUNICODE_STRING ServiceClass, - __in PUNICODE_STRING ServiceName, - __in_opt PUNICODE_STRING InstanceName, - __in_opt USHORT InstancePort, - __in_opt PUNICODE_STRING Referrer, - __inout PUNICODE_STRING Spn, - __out_opt PULONG Length, - __in BOOLEAN Allocate); + _In_ PUNICODE_STRING ServiceClass, + _In_ PUNICODE_STRING ServiceName, + _In_opt_ PUNICODE_STRING InstanceName, + _In_opt_ USHORT InstancePort, + _In_opt_ PUNICODE_STRING Referrer, + _Inout_ PUNICODE_STRING Spn, + _Out_opt_ PULONG Length, + _In_ BOOLEAN Allocate); #if (NTDDI_VERSION >= NTDDI_WINXP) KSECDDDECLSPEC NTSTATUS NTAPI SecMakeSPNEx( - __in PUNICODE_STRING ServiceClass, - __in PUNICODE_STRING ServiceName, - __in_opt PUNICODE_STRING InstanceName, - __in_opt USHORT InstancePort, - __in_opt PUNICODE_STRING Referrer, - __in_opt PUNICODE_STRING TargetInfo, - __inout PUNICODE_STRING Spn, - __out PULONG Length OPTIONAL, - __in BOOLEAN Allocate); + _In_ PUNICODE_STRING ServiceClass, + _In_ PUNICODE_STRING ServiceName, + _In_opt_ PUNICODE_STRING InstanceName, + _In_opt_ USHORT InstancePort, + _In_opt_ PUNICODE_STRING Referrer, + _In_opt_ PUNICODE_STRING TargetInfo, + _Inout_ PUNICODE_STRING Spn, + _Out_ PULONG Length OPTIONAL, + _In_ BOOLEAN Allocate); KSECDDDECLSPEC NTSTATUS SEC_ENTRY SecLookupAccountSid( - __in PSID Sid, - __out PULONG NameSize, - __inout PUNICODE_STRING NameBuffer, - __out PULONG DomainSize OPTIONAL, - __out_opt PUNICODE_STRING DomainBuffer, - __out PSID_NAME_USE NameUse - ); + _In_ PSID Sid, + _Out_ PULONG NameSize, + _Inout_ PUNICODE_STRING NameBuffer, + _Out_ PULONG DomainSize OPTIONAL, + _Out_opt_ PUNICODE_STRING DomainBuffer, + _Out_ PSID_NAME_USE NameUse); KSECDDDECLSPEC NTSTATUS SEC_ENTRY SecLookupAccountName( - __in PUNICODE_STRING Name, - __inout PULONG SidSize, - __out PSID Sid, - __out PSID_NAME_USE NameUse, - __out_opt PULONG DomainSize, // WDK says __out only + ... OPTIONAL - __inout_opt PUNICODE_STRING ReferencedDomain); + _In_ PUNICODE_STRING Name, + _Inout_ PULONG SidSize, + _Out_ PSID Sid, + _Out_ PSID_NAME_USE NameUse, + _Out_opt_ PULONG DomainSize, // WDK says _Out_ only + ... OPTIONAL + _Inout_opt_ PUNICODE_STRING ReferencedDomain); #endif #if (NTDDI_VERSION >= NTDDI_WS03) @@ -1149,10 +1152,10 @@ KSECDDDECLSPEC NTSTATUS SEC_ENTRY SecLookupWellKnownSid( - __in WELL_KNOWN_SID_TYPE SidType, - __out PSID Sid, - __in ULONG SidBufferSize, - __inout_opt PULONG SidSize); + _In_ WELL_KNOWN_SID_TYPE SidType, + _Out_ PSID Sid, + _In_ ULONG SidBufferSize, + _Inout_opt_ PULONG SidSize); #endif #if (NTDDI_VERSION >= NTDDI_VISTA) @@ -1160,16 +1163,16 @@ KSECDDDECLSPEC NTSTATUS NTAPI SecMakeSPNEx2( - __in PUNICODE_STRING ServiceClass, - __in PUNICODE_STRING ServiceName, - __in_opt PUNICODE_STRING InstanceName, - __in_opt USHORT InstancePort, - __in_opt PUNICODE_STRING Referrer, - __in_opt PUNICODE_STRING InTargetInfo, - __inout PUNICODE_STRING Spn, - __out_opt PULONG TotalSize, - __in BOOLEAN Allocate, - __in BOOLEAN IsTargetInfoMarshaled); + _In_ PUNICODE_STRING ServiceClass, + _In_ PUNICODE_STRING ServiceName, + _In_opt_ PUNICODE_STRING InstanceName, + _In_opt_ USHORT InstancePort, + _In_opt_ PUNICODE_STRING Referrer, + _In_opt_ PUNICODE_STRING InTargetInfo, + _Inout_ PUNICODE_STRING Spn, + _Out_opt_ PULONG TotalSize, + _In_ BOOLEAN Allocate, + _In_ BOOLEAN IsTargetInfoMarshaled); #endif #endif /* ISSP_MODE == 0 */ @@ -1179,84 +1182,84 @@ SecMakeSPNEx2( SECURITY_STATUS SEC_ENTRY SspiEncodeAuthIdentityAsStrings( - __in PSEC_WINNT_AUTH_IDENTITY_OPAQUE pAuthIdentity, - __deref_out_opt PCWSTR* ppszUserName, - __deref_out_opt PCWSTR* ppszDomainName, - __deref_opt_out_opt PCWSTR* ppszPackedCredentialsString); + _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE pAuthIdentity, + _Deref_out_opt_ PCWSTR* ppszUserName, + _Deref_out_opt_ PCWSTR* ppszDomainName, + _Deref_opt_out_opt_ PCWSTR* ppszPackedCredentialsString); SECURITY_STATUS SEC_ENTRY SspiValidateAuthIdentity( - __in PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); + _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); SECURITY_STATUS SEC_ENTRY SspiCopyAuthIdentity( - __in PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData, - __deref_out PSEC_WINNT_AUTH_IDENTITY_OPAQUE* AuthDataCopy); + _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData, + _Deref_out_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* AuthDataCopy); VOID SEC_ENTRY SspiFreeAuthIdentity( - __in_opt PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); + _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); VOID SEC_ENTRY SspiZeroAuthIdentity( - __in_opt PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); + _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData); VOID SEC_ENTRY SspiLocalFree( - __in_opt PVOID DataBuffer); + _In_opt_ PVOID DataBuffer); SECURITY_STATUS SEC_ENTRY SspiEncodeStringsAsAuthIdentity( - __in_opt PCWSTR pszUserName, - __in_opt PCWSTR pszDomainName, - __in_opt PCWSTR pszPackedCredentialsString, - __deref_out PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppAuthIdentity); + _In_opt_ PCWSTR pszUserName, + _In_opt_ PCWSTR pszDomainName, + _In_opt_ PCWSTR pszPackedCredentialsString, + _Deref_out_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppAuthIdentity); SECURITY_STATUS SEC_ENTRY SspiCompareAuthIdentities( - __in_opt PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity1, - __in_opt PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity2, - __out_opt PBOOLEAN SameSuppliedUser, - __out_opt PBOOLEAN SameSuppliedIdentity); + _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity1, + _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity2, + _Out_opt_ PBOOLEAN SameSuppliedUser, + _Out_opt_ PBOOLEAN SameSuppliedIdentity); SECURITY_STATUS SEC_ENTRY SspiMarshalAuthIdentity( - __in PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity, - __out PULONG AuthIdentityLength, - __deref_out_bcount(*AuthIdentityLength) PCHAR* AuthIdentityByteArray); + _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity, + _Out_ PULONG AuthIdentityLength, + _Deref_out__bcount(*AuthIdentityLength) PCHAR* AuthIdentityByteArray); SECURITY_STATUS SEC_ENTRY SspiUnmarshalAuthIdentity( - __in PULONG AuthIdentityLength, - __in_bcount(AuthIdentityLength) PCHAR AuthIdentityByteArray, - __deref_out PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppAuthIdentity); + _In_ PULONG AuthIdentityLength, + _In__bcount(AuthIdentityLength) PCHAR AuthIdentityByteArray, + _Deref_out_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppAuthIdentity); BOOLEAN SEC_ENTRY SspiIsPromptingNeeded( - __in PULONG ErrorOrNtStatus); + _In_ PULONG ErrorOrNtStatus); SECURITY_STATUS SEC_ENTRY SspiGetTargetHostName( - __in PCWSTR pszTargetName, - __deref_out PWSTR* pszHostName); + _In_ PCWSTR pszTargetName, + _Deref_out_ PWSTR* pszHostName); SECURITY_STATUS SEC_ENTRY SspiExcludePackage( - __in_opt PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity, - __in PCWSTR pszPackageName, - __deref_out PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppNewAuthIdentity); + _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity, + _In_ PCWSTR pszPackageName, + _Deref_out_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppNewAuthIdentity); #define SEC_WINNT_AUTH_IDENTITY_MARSHALLED 0x04 #define SEC_WINNT_AUTH_IDENTITY_ONLY 0x08