Author: tkreuzer
Date: Sat Dec 22 10:09:25 2012
New Revision: 57964
URL:
http://svn.reactos.org/svn/reactos?rev=57964&view=rev
Log:
[INCLUDE]
Update annotations
Modified:
trunk/reactos/include/ddk/ntifs.h
trunk/reactos/include/ddk/wdm.h
trunk/reactos/include/psdk/driverspecs.h
trunk/reactos/include/psdk/ntgdi.h
trunk/reactos/include/psdk/sal.h
trunk/reactos/include/psdk/winuser.h
trunk/reactos/include/xdk/ccfuncs.h
trunk/reactos/include/xdk/exfuncs.h
trunk/reactos/include/xdk/rtlfuncs.h
Modified: trunk/reactos/include/ddk/ntifs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=57…
==============================================================================
--- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Sat Dec 22 10:09:25 2012
@@ -8889,6 +8889,7 @@
#endif
#if (NTDDI_VERSION >= NTDDI_WINXP)
+_Success_(return!=FALSE)
NTKERNELAPI
BOOLEAN
NTAPI
Modified: trunk/reactos/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=5796…
==============================================================================
--- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Sat Dec 22 10:09:25 2012
@@ -8119,7 +8119,7 @@
_IRQL_requires_max_(DISPATCH_LEVEL)
_At_(DestinationString->Buffer, _Post_equal_to_(SourceString))
-//_At_(DestinationString->Length, _Post_equal_to_(_String_length_(SourceString) *
sizeof(WCHAR)))
+_At_(DestinationString->Length, _Post_equal_to_(_String_length_(SourceString) *
sizeof(WCHAR)))
_At_(DestinationString->MaximumLength, _Post_equal_to_(DestinationString->Length +
sizeof(WCHAR)))
NTSYSAPI
VOID
@@ -14461,6 +14461,7 @@
_When_((PoolType & (NonPagedPoolMustSucceed | POOL_RAISE_IF_ALLOCATION_FAILURE)) !=
0,
_Post_notnull_)
_Post_writable_byte_size_(NumberOfBytes)
+_Function_class_(ALLOCATE_FUNCTION)
NTKERNELAPI
PVOID
NTAPI
@@ -14531,6 +14532,7 @@
_Inout_ PERESOURCE Resource);
_IRQL_requires_max_(DISPATCH_LEVEL)
+_Function_class_(FREE_FUNCTION)
NTKERNELAPI
VOID
NTAPI
Modified: trunk/reactos/include/psdk/driverspecs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/driverspecs.h…
==============================================================================
--- trunk/reactos/include/psdk/driverspecs.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/driverspecs.h [iso-8859-1] Sat Dec 22 10:09:25 2012
@@ -15,9 +15,140 @@
#include <concurrencysal.h>
-//
+#ifdef _PREFAST_
+
// Stubs
-//
+#define ___drv_unit_internal_kernel_driver
+#define ___drv_unit_kernel_code
+#define ___drv_unit_kernel_driver
+#define ___drv_unit_user_code
+#define ___drv_unit_user_driver
+#define __drv_acquiresCancelSpinLock
+#define __drv_acquiresCriticalRegion
+#define __drv_acquiresExclusiveResource(kind)
+#define __drv_acquiresExclusiveResourceGlobal(kind,param)
+#define __drv_acquiresPriorityRegion
+#define __drv_acquiresResource(kind)
+#define __drv_acquiresResourceGlobal(kind,param)
+#define __drv_aliasesMem _Post_ _SA_annotes0(SAL_IsAliased)
+#define __drv_allocatesMem(kind) _Post_ _SA_annotes1(SAL_NeedsRelease,__yes)
+#define __drv_arg(expr,annotes)
+#define __drv_at(expr,annotes)
+#define __drv_callbackType(kind)
+#define __drv_clearDoInit
+#define __drv_completionType(kindlist)
+#define __drv_constant
+#define __drv_defined(x)
+#define __drv_deref(annotes)
+#define __drv_dispatchType_other
+#define __drv_dispatchType(x)
+#define __drv_floatRestored
+#define __drv_floatSaved
+#define __drv_floatUsed
+#define __drv_formatString(kind)
+#define __drv_freesMem(kind) _Post_ _SA_annotes1(SAL_NeedsRelease,__no)
+#define __drv_fun(annotes)
+#define __drv_functionClass
+#define __drv_holdsCancelSpinLock()
+#define __drv_holdsCriticalRegion()
+#define __drv_holdsPriorityRegion()
+#define __drv_in_deref(annotes)
+#define __drv_in(annotes)
+#define __drv_innerAcquiresGlobal(kind,param)
+#define __drv_innerMustHoldGlobal(kind,param)
+#define __drv_innerNeverHoldGlobal(kind,param)
+#define __drv_innerReleasesGlobal(kind,param)
+#define __drv_interlocked
+#define __drv_IoGetDmaAdapter
+#define __drv_isCancelIRQL
+#define __drv_isObjectPointer
+#define __drv_KMDF
+#define __drv_maxFunctionIRQL
+#define __drv_maxIRQL
+#define __drv_minFunctionIRQL
+#define __drv_minIRQL
+#define __drv_Mode_impl(x)
+#define __drv_mustHold(kind)
+#define __drv_mustHoldCancelSpinLock
+#define __drv_mustHoldCriticalRegion
+#define __drv_mustHoldGlobal(kind,param)
+#define __drv_mustHoldPriorityRegion
+#define __drv_NDIS
+#define __drv_neverHold(kind)
+#define __drv_neverHoldCancelSpinLock
+#define __drv_neverHoldCriticalRegion
+#define __drv_neverHoldGlobal(kind,param)
+#define __drv_neverHoldPriorityRegion
+#define __drv_nonConstant
+#define __drv_notInTry
+#define __drv_notPointer
+#define __drv_out_deref(annotes)
+#define __drv_out(annotes)
+#define __drv_preferredFunction(func,why)
+#define __drv_raisesIRQL
+#define __drv_releasesCancelSpinLock
+#define __drv_releasesCriticalRegion
+#define __drv_releasesExclusiveResource(kind)
+#define __drv_releasesExclusiveResourceGlobal(kind,param)
+#define __drv_releasesPriorityRegion
+#define __drv_releasesResource(kind)
+#define __drv_releasesResourceGlobal(kind,param)
+#define __drv_reportError(why)
+#define __drv_requiresIRQL
+#define __drv_restoresIRQL
+#define __drv_restoresIRQLGlobal
+#define __drv_ret(annotes)
+#define __drv_sameIRQL
+#define __drv_savesIRQL
+#define __drv_savesIRQLGlobal
+#define __drv_setsIRQL(irql)
+#define __drv_strictType(typename,mode)
+#define __drv_strictTypeMatch(mode)
+#define __drv_unit(p)
+#define __drv_useCancelIRQL
+#define __drv_valueIs(arglist)
+#define __drv_WDM
+#define __drv_when(cond,annotes)
+#define __internal_kernel_driver
+#define __kernel_code
+#define __kernel_driver
+#define __prefast_operator_new_null
+#define __prefast_operator_new_throws
+#define __user_code
+#define __user_driver
+#define _Dispatch_type_
+#define _IRQL_always_function_max_(irql)
+#define _IRQL_always_function_min_(irql)
+#define _IRQL_is_cancel_
+#define _IRQL_raises_(irql)
+#define _IRQL_requires_(irql)
+#define _IRQL_requires_max_(irql) _Pre_
_SA_annotes1(SAL_maxIRQL,irql)
+#define _IRQL_requires_min_(irql)
+#define _IRQL_requires_same_
+#define _IRQL_restores_
+#define _IRQL_restores_global_(kind,param)
+#define _IRQL_saves_
+#define _IRQL_saves_global_(kind,param)
+#define _IRQL_uses_cancel_
+#define _Kernel_clear_do_init_(yesNo)
+#define _Kernel_float_restored_
+#define _Kernel_float_saved_
+#define _Kernel_float_used_
+#define _Kernel_IoGetDmaAdapter_
+#define _Kernel_releases_resource_(kind)
+#define _Kernel_requires_resource_held_(kind)
+#define _Kernel_requires_resource_not_held_(kind) _Pre_ _SA_annotes1(SAL_neverHold,
#kind)
+#define _Kernel_acquires_resource_(kind) _Post_ _SA_annotes1(SAL_acquire,
#kind)
+
+__ANNOTATION(SAL_maxIRQL(__int64);)
+__ANNOTATION(SAL_IsAliased(void);)
+__ANNOTATION(SAL_NeedsRelease(enum __SAL_YesNo);)
+__ANNOTATION(SAL_neverHold(__In_impl_ char *);)
+__ANNOTATION(SAL_acquire(__In_impl_ char *);)
+
+#else
+
+/* Dummys */
#define ___drv_unit_internal_kernel_driver
#define ___drv_unit_kernel_code
#define ___drv_unit_kernel_driver
@@ -140,3 +271,5 @@
#define _Kernel_requires_resource_not_held_(kind)
#define _Kernel_acquires_resource_(kind)
+#endif
+
Modified: trunk/reactos/include/psdk/ntgdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntgdi.h?rev=5…
==============================================================================
--- trunk/reactos/include/psdk/ntgdi.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ntgdi.h [iso-8859-1] Sat Dec 22 10:09:25 2012
@@ -95,8 +95,8 @@
_In_ INT ySrc,
_In_ DWORD iStartScan,
_In_ DWORD cNumScan,
- IN LPBYTE pInitBits,
- IN LPBITMAPINFO pbmi,
+ _In_reads_bytes_(cjMaxBits) LPBYTE pInitBits,
+ _In_reads_bytes_(cjMaxInfo) LPBITMAPINFO pbmi,
_In_ DWORD iUsage,
_In_ UINT cjMaxBits,
_In_ UINT cjMaxInfo,
@@ -108,12 +108,12 @@
BOOL
APIENTRY
NtGdiGetFontResourceInfoInternalW(
- IN LPWSTR pwszFiles,
+ _In_reads_z_(cwc) LPWSTR pwszFiles,
_In_ ULONG cwc,
_In_ ULONG cFiles,
- _In_ UINT cjIn,
- OUT LPDWORD pdwBytes,
- OUT LPVOID pvBuf,
+ _In_ UINT cjBuf,
+ _Out_ LPDWORD pdwBytes,
+ _Out_writes_bytes_(cjBuf) LPVOID pvBuf,
_In_ DWORD iType
);
Modified: trunk/reactos/include/psdk/sal.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/sal.h?rev=579…
==============================================================================
--- trunk/reactos/include/psdk/sal.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/sal.h [iso-8859-1] Sat Dec 22 10:09:25 2012
@@ -647,7 +647,7 @@
//#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_reads_z_(size)
#define _In_z_
#define _In_z_bytecount_(size)
//#define _In_z_bytecount_c_(size)
@@ -796,7 +796,7 @@
//#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_post_bytecount_(cap,count)
_SAL11_Name(_Out_z_bytecap_post_bytecount_) _Group_(_Pre_bytecap_(cap)
[SA_Post(Valid=SA_Yes)] _Post_z_bytecount_(count))
//#define _Out_z_bytecap_x_(size)
//#define _Out_z_bytecapcount_(capcount)
//#define _Out_z_cap_(size)
@@ -868,7 +868,7 @@
#define _Post_invalid_
_SAL2_Name(_Post_invalid_) _Group_([SA_Post(Deref=1,Valid=SA_No)])
#define _Post_maybenull_
_SAL2_Name(_Post_maybenull_) _Group_([SA_Post(Null=SA_Maybe)])
//#define _Post_maybez_
-#define _Post_notnull_
+#define _Post_notnull_
_SAL2_Name(_Post_notnull_) _Group_([SA_Post(Null=SA_No)])
//#define _Post_null_
#define _Post_ptr_invalid_
_SAL2_Name(_Post_ptr_invalid_) _Group_([SA_Post(Valid=SA_No)])
//#define _Post_readable_byte_size_(size)
@@ -878,19 +878,19 @@
#define _Post_writable_byte_size_(size)
//#define _Post_writable_size_(size)
#define _Post_z_ _SAL2_Name(_Post_z_)
_Group_([SA_Post(NullTerminated=SA_Yes)] [SA_Post(Valid=SA_Yes)])
-//#define _Post_z_bytecount_(size)
+#define _Post_z_bytecount_(size)
_SAL11_Name(_Post_z_bytecount_)
_Group_([SA_Post(NullTerminated=SA_Yes,ValidBytes="\n" _SA_SPECSTRIZE(size) )]
[SA_Post(Valid=SA_Yes)])
//#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_bytecap_(size)
+#define _Pre_bytecap_(size)
_SAL11_Name(_Pre_bytecap_) _Group_([SA_Pre(Null=SA_No,Notref=1)]
[SA_Pre(WritableBytes="\n" _SA_SPECSTRIZE(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)
_SAL11_Name(_Pre_cap_) _Group_([SA_Pre(Null=SA_No,Notref=1)]
[SA_Pre(WritableElements="\n" #size )])
+#define _Pre_cap_(size)
_SAL11_Name(_Pre_cap_) _Group_([SA_Pre(Null=SA_No,Notref=1)]
[SA_Pre(WritableElements="\n" _SA_SPECSTRIZE(size) )])
//#define _Pre_cap_c_(size)
//#define _Pre_cap_c_one_
//#define _Pre_cap_for_(param)
@@ -1003,7 +1003,7 @@
//#define _Ret_notnull_
//#define _Ret_null_
//#define _Ret_opt_
-#define _Ret_opt_bytecap_(size)
+#define _Ret_opt_bytecap_(size)
_SAL11_Name(_Ret_opt_bytecap_) _Group_([SA_Post(Null=SA_Maybe,Notref=1)]
[SA_Post(WritableBytes="\n" _SA_SPECSTRIZE(size))])
//#define _Ret_opt_bytecap_c_(size)
//#define _Ret_opt_bytecap_x_(size)
#define _Ret_opt_bytecount_(size)
@@ -1038,7 +1038,7 @@
//#define _Ret_z_bytecount_(size)
//#define _Ret_z_cap_(size)
//#define _Ret_z_count_(size)
-#define _Return_type_success_(expr)
+#define _Return_type_success_(expr)
_SAL2_Name(_Return_type_success_) _Group_([SA_Success(Condition=_SA_SPECSTRIZE(expr))])
//#define _Scanf_format_string_
//#define _Scanf_s_format_string_
#define _Struct_size_bytes_(size)
Modified: trunk/reactos/include/psdk/winuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winuser.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/winuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winuser.h [iso-8859-1] Sat Dec 22 10:09:25 2012
@@ -4270,20 +4270,22 @@
BOOL WINAPI DrawStateA(_In_ HDC, _In_opt_ HBRUSH, _In_opt_ DRAWSTATEPROC, _In_ LPARAM,
_In_ WPARAM, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT);
BOOL WINAPI DrawStateW(_In_ HDC, _In_opt_ HBRUSH, _In_opt_ DRAWSTATEPROC, _In_ LPARAM,
_In_ WPARAM, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT);
+_Success_(return)
int
WINAPI
DrawTextA(
_In_ HDC hdc,
- _Inout_updates_opt_(cchText) LPCSTR lpchText,
+ _At_((LPSTR)lpchText, _Inout_updates_opt_(cchText)) LPCSTR lpchText,
_In_ int cchText,
_Inout_ LPRECT lprc,
_In_ UINT format);
+_Success_(return)
int
WINAPI
DrawTextW(
_In_ HDC hdc,
- _Inout_updates_opt_(cchText) LPCWSTR lpchText,
+ _At_((LPWSTR)lpchText, _Inout_updates_opt_(cchText)) LPCWSTR lpchText,
_In_ int cchText,
_Inout_ LPRECT lprc,
_In_ UINT format);
Modified: trunk/reactos/include/xdk/ccfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ccfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/ccfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/ccfuncs.h [iso-8859-1] Sat Dec 22 10:09:25 2012
@@ -320,6 +320,7 @@
#endif
#if (NTDDI_VERSION >= NTDDI_WINXP)
+_Success_(return!=FALSE)
NTKERNELAPI
BOOLEAN
NTAPI
Modified: trunk/reactos/include/xdk/exfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/exfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/exfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/exfuncs.h [iso-8859-1] Sat Dec 22 10:09:25 2012
@@ -528,6 +528,7 @@
_When_((PoolType & (NonPagedPoolMustSucceed | POOL_RAISE_IF_ALLOCATION_FAILURE)) !=
0,
_Post_notnull_)
_Post_writable_byte_size_(NumberOfBytes)
+_Function_class_(ALLOCATE_FUNCTION)
NTKERNELAPI
PVOID
NTAPI
@@ -598,6 +599,7 @@
_Inout_ PERESOURCE Resource);
_IRQL_requires_max_(DISPATCH_LEVEL)
+_Function_class_(FREE_FUNCTION)
NTKERNELAPI
VOID
NTAPI
Modified: trunk/reactos/include/xdk/rtlfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/rtlfuncs.h?rev…
==============================================================================
--- trunk/reactos/include/xdk/rtlfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/rtlfuncs.h [iso-8859-1] Sat Dec 22 10:09:25 2012
@@ -217,7 +217,7 @@
_IRQL_requires_max_(DISPATCH_LEVEL)
_At_(DestinationString->Buffer, _Post_equal_to_(SourceString))
-//_At_(DestinationString->Length, _Post_equal_to_(_String_length_(SourceString) *
sizeof(WCHAR)))
+_At_(DestinationString->Length, _Post_equal_to_(_String_length_(SourceString) *
sizeof(WCHAR)))
_At_(DestinationString->MaximumLength, _Post_equal_to_(DestinationString->Length +
sizeof(WCHAR)))
NTSYSAPI
VOID