Author: tkreuzer
Date: Tue Mar 10 00:13:43 2015
New Revision: 66650
URL:
http://svn.reactos.org/svn/reactos?rev=66650&view=rev
Log:
[WIN32K]
Annotate eng/mapping.c
Modified:
trunk/reactos/include/psdk/winddi.h
trunk/reactos/win32ss/gdi/eng/mapping.c
trunk/reactos/win32ss/gdi/eng/mapping.h
Modified: trunk/reactos/include/psdk/winddi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winddi.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/winddi.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winddi.h [iso-8859-1] Tue Mar 10 00:13:43 2015
@@ -1842,7 +1842,7 @@
VOID
APIENTRY
EngFreeModule(
- _In_ HANDLE h);
+ _In_ _Post_invalid_ HANDLE h);
ENGAPI
@@ -2089,6 +2089,8 @@
_Out_ ULONG_PTR *piFile);
__drv_preferredFunction("EngMapFontFileFD", "Obsolete")
+_Check_return_
+_Success_(return!=FALSE)
ENGAPI
BOOL
APIENTRY
@@ -2097,6 +2099,8 @@
_Outptr_result_bytebuffer_(*pcjBuf) PULONG *ppjBuf,
_Out_ ULONG *pcjBuf);
+_Check_return_
+_Success_(return!=FALSE)
ENGAPI
BOOL
APIENTRY
@@ -2105,12 +2109,15 @@
_Outptr_result_bytebuffer_(*pcjBuf) PULONG *ppjBuf,
_Out_ ULONG *pcjBuf);
+_Check_return_
+_Success_(return!=NULL)
+_Post_writable_byte_size_(*pulSize)
ENGAPI
PVOID
APIENTRY
EngMapModule(
- _In_ HANDLE h,
- _Out_ PULONG pSize);
+ _In_ HANDLE h,
+ _Out_ PULONG pulSize);
ENGAPI
BOOL
Modified: trunk/reactos/win32ss/gdi/eng/mapping.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/mapping.c?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/mapping.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/mapping.c [iso-8859-1] Tue Mar 10 00:13:43 2015
@@ -86,13 +86,12 @@
ASSERT(NT_SUCCESS(Status));
}
-
PVOID
NTAPI
EngCreateSection(
- IN ULONG fl,
- IN SIZE_T cjSize,
- IN ULONG ulTag)
+ _In_ ULONG fl,
+ _In_ SIZE_T cjSize,
+ _In_ ULONG ulTag)
{
NTSTATUS Status;
PENGSECTION pSection;
@@ -131,9 +130,9 @@
PVOID
NTAPI
EngCreateSectionHack(
- IN ULONG fl,
- IN SIZE_T cjSize,
- IN ULONG ulTag)
+ _In_ ULONG fl,
+ _In_ SIZE_T cjSize,
+ _In_ ULONG ulTag)
{
NTSTATUS Status;
PENGSECTION pSection;
@@ -169,15 +168,14 @@
return pSection;
}
-
-
+_Success_(return!=FALSE)
BOOL
APIENTRY
EngMapSection(
- IN PVOID pvSection,
- IN BOOL bMap,
- IN HANDLE hProcess,
- OUT PVOID* pvBaseAddress)
+ _In_ PVOID pvSection,
+ _In_ BOOL bMap,
+ _In_ HANDLE hProcess,
+ _When_(bMap, _Outptr_) PVOID* pvBaseAddress)
{
NTSTATUS Status;
PENGSECTION pSection = pvSection;
@@ -246,8 +244,8 @@
BOOL
APIENTRY
EngFreeSectionMem(
- IN PVOID pvSection OPTIONAL,
- IN PVOID pvMappedBase OPTIONAL)
+ _In_opt_ PVOID pvSection,
+ _In_opt_ PVOID pvMappedBase)
{
NTSTATUS Status;
PENGSECTION pSection = pvSection;
@@ -277,13 +275,17 @@
return bResult;
}
+_Check_return_
+_Success_(return!=NULL)
+__drv_allocatesMem(Mem)
+_Post_writable_byte_size_(cjSize)
PVOID
APIENTRY
EngAllocSectionMem(
- OUT PVOID *ppvSection,
- IN ULONG fl,
- IN SIZE_T cjSize,
- IN ULONG ulTag)
+ _Outptr_ PVOID *ppvSection,
+ _In_ ULONG fl,
+ _In_ SIZE_T cjSize,
+ _In_ ULONG ulTag)
{
NTSTATUS Status;
PENGSECTION pSection;
@@ -321,13 +323,13 @@
return pSection->pvMappedBase;
}
-
+_Check_return_
PFILEVIEW
NTAPI
EngLoadModuleEx(
- LPWSTR pwsz,
- ULONG cjSizeOfModule,
- FLONG fl)
+ _In_z_ LPWSTR pwsz,
+ _In_ ULONG cjSizeOfModule,
+ _In_ FLONG fl)
{
PFILEVIEW pFileView = NULL;
OBJECT_ATTRIBUTES ObjectAttributes;
@@ -446,6 +448,9 @@
return (HANDLE)EngLoadModuleEx(pwsz, cjSizeOfModule, FVF_SYSTEMROOT);
}
+_Check_return_
+_Success_(return!=NULL)
+_Post_writable_byte_size_(*pulSize)
PVOID
APIENTRY
EngMapModule(
@@ -475,7 +480,7 @@
VOID
APIENTRY
EngFreeModule(
- _In_ HANDLE h)
+ _In_ _Post_invalid_ HANDLE h)
{
PFILEVIEW pFileView = (PFILEVIEW)h;
NTSTATUS Status;
@@ -540,7 +545,8 @@
return TRUE;
}
-
+_Check_return_
+_Success_(return!=FALSE)
BOOL
APIENTRY
EngMapFontFileFD(
@@ -562,6 +568,9 @@
UNIMPLEMENTED;
}
+__drv_preferredFunction("EngMapFontFileFD", "Obsolete")
+_Check_return_
+_Success_(return!=FALSE)
BOOL
APIENTRY
EngMapFontFile(
Modified: trunk/reactos/win32ss/gdi/eng/mapping.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/mapping.h?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/mapping.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/mapping.h [iso-8859-1] Tue Mar 10 00:13:43 2015
@@ -53,36 +53,42 @@
PVOID
NTAPI
EngCreateSection(
- IN ULONG fl,
- IN SIZE_T cjSize,
- IN ULONG ulTag);
+ _In_ ULONG fl,
+ _In_ SIZE_T cjSize,
+ _In_ ULONG ulTag);
+_Success_(return!=FALSE)
BOOL
APIENTRY
EngMapSection(
- IN PVOID pvSection,
- IN BOOL bMap,
- IN HANDLE hProcess,
- OUT PVOID* pvBaseAddress);
+ _In_ PVOID pvSection,
+ _In_ BOOL bMap,
+ _In_ HANDLE hProcess,
+ _When_(bMap, _Outptr_) PVOID* pvBaseAddress);
+_Check_return_
+_Success_(return!=NULL)
+__drv_allocatesMem(Mem)
+_Post_writable_byte_size_(cjSize)
PVOID
APIENTRY
EngAllocSectionMem(
- OUT PVOID *ppvSection,
- IN ULONG fl,
- IN SIZE_T cjSize,
- IN ULONG ulTag);
+ _Outptr_ PVOID *ppvSection,
+ _In_ ULONG fl,
+ _In_ SIZE_T cjSize,
+ _In_ ULONG ulTag);
BOOL
APIENTRY
EngFreeSectionMem(
- IN PVOID pvSection OPTIONAL,
- IN PVOID pvMappedBase OPTIONAL);
+ _In_opt_ PVOID pvSection,
+ _In_opt_ PVOID pvMappedBase);
+_Check_return_
PFILEVIEW
NTAPI
EngLoadModuleEx(
- LPWSTR pwsz,
- ULONG cjSizeOfModule,
- FLONG fl);
+ _In_z_ LPWSTR pwsz,
+ _In_ ULONG cjSizeOfModule,
+ _In_ FLONG fl);