summaryrefslogtreecommitdiff
path: root/src/inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/inc')
-rw-r--r--src/inc/bbsweep.h4
-rw-r--r--src/inc/clr/fs/path.h2
-rw-r--r--src/inc/dlwrap.h1
-rw-r--r--src/inc/downlevel.h15
-rw-r--r--src/inc/eventtracebase.h2
-rw-r--r--src/inc/formattype.cpp2
-rw-r--r--src/inc/newapis.h2
-rw-r--r--src/inc/sbuffer.h4
-rw-r--r--src/inc/stgpool.h4
-rw-r--r--src/inc/sxshelpers.h2
-rw-r--r--src/inc/utilcode.h2
-rw-r--r--src/inc/winrt/windowsstring.h2
12 files changed, 26 insertions, 16 deletions
diff --git a/src/inc/bbsweep.h b/src/inc/bbsweep.h
index 7cebe2000c..f99c36c995 100644
--- a/src/inc/bbsweep.h
+++ b/src/inc/bbsweep.h
@@ -277,8 +277,8 @@ private:
}
#endif // !FEATURE_CORESYSTEM
- WCHAR objectName[MAX_LONGPATH];
- WCHAR objectNamePrefix[MAX_LONGPATH];
+ WCHAR objectName[MAX_LONGPATH] = {0};
+ WCHAR objectNamePrefix[MAX_LONGPATH] = {0};
GetObjectNamePrefix(processID, fromRuntime, objectNamePrefix);
// if there is a non-empty name prefix, append a '\'
if (objectNamePrefix[0] != '\0')
diff --git a/src/inc/clr/fs/path.h b/src/inc/clr/fs/path.h
index 29a70f7260..e90b3188ed 100644
--- a/src/inc/clr/fs/path.h
+++ b/src/inc/clr/fs/path.h
@@ -92,7 +92,7 @@ namespace clr
// result is placed in wzBuffer and the number of chars written is placed in pcchBuffer on
// success; otherwise an error HRESULT is returned.
static HRESULT
- Combine(LPCWSTR wzPathLeft, LPCWSTR wzPathRight, __out DWORD *pcchBuffer, __out_ecount(*pcchBuffer) LPWSTR wzBuffer)
+ Combine(LPCWSTR wzPathLeft, LPCWSTR wzPathRight, __in DWORD *pcchBuffer, __out_ecount(*pcchBuffer) LPWSTR wzBuffer)
{
STATIC_CONTRACT_NOTHROW;
diff --git a/src/inc/dlwrap.h b/src/inc/dlwrap.h
index 9129bcf2bf..d30e01462a 100644
--- a/src/inc/dlwrap.h
+++ b/src/inc/dlwrap.h
@@ -42,6 +42,7 @@ VerQueryValueW_NoThrow(
#endif
#if defined(_WININET_) && !defined (CreateUrlCacheEntryW_NoThrow)
+__success(return)
BOOL
CreateUrlCacheEntryW_NoThrow(
IN LPCWSTR lpszUrlName,
diff --git a/src/inc/downlevel.h b/src/inc/downlevel.h
index 12aeb42cf7..d33a0abb5b 100644
--- a/src/inc/downlevel.h
+++ b/src/inc/downlevel.h
@@ -143,13 +143,14 @@ namespace DownLevel
// User /system defaults
// TODO: I don't think we need all of these.
int GetSystemDefaultLocaleName(__out_ecount(cchLocaleName) LPWSTR lpLocaleName, __in int cchLocaleName);
- DWORD GetUserPreferredUILanguages (__in DWORD dwFlags, __out PULONG pulNumLanguages, __out_ecount_opt(*pcchLanguagesBuffer) PWSTR pwszLanguagesBuffer, __in PULONG pcchLanguagesBuffer);
+ __success(return == 1) DWORD GetUserPreferredUILanguages (__in DWORD dwFlags, __out PULONG pulNumLanguages, __out_ecount_opt(*pcchLanguagesBuffer) PWSTR pwszLanguagesBuffer, __in PULONG pcchLanguagesBuffer);
int GetUserDefaultLocaleName(__out_ecount(cchLocaleName) LPWSTR lpLocaleName, __in int cchLocaleName);
// Locale and calendar information
int GetLocaleInfoEx (__in LPCWSTR lpLocaleName, __in LCTYPE LCType, __out_ecount_opt(cchData) LPWSTR lpLCData, __in int cchData);
int GetDateFormatEx(__in LPCWSTR lpLocaleName, __in DWORD dwFlags, __in_opt CONST SYSTEMTIME* lpDate, __in_opt LPCWSTR lpFormat,
__out_ecount(cchDate) LPWSTR lpDateStr, __in int cchDate, __in_opt LPCWSTR lpCalendar);
+ __success(return != 0)
int GetCalendarInfoEx(__in LPCWSTR lpLocaleName,
__in CALID Calendar,
__in_opt LPCWSTR pReserved,
@@ -160,12 +161,13 @@ namespace DownLevel
// Compareinfo type information
int TurkishCompareStringIgnoreCase(LCID lcid, DWORD dwCmpFlags, LPCWSTR lpString1, int cchCount1, LPCWSTR lpString2, int cchCount2);
-
- int CompareStringEx(LPCWSTR lpLocaleName, DWORD dwCmpFlags, LPCWSTR lpString1, int cchCount1, LPCWSTR lpString2,
- int cchCount2, LPNLSVERSIONINFO lpVersionInformation, LPVOID lpReserved, LPARAM lParam );
- int CompareStringOrdinal(LPCWSTR lpString1, int cchCount1, LPCWSTR lpString2, int cchCount2, BOOL bIgnoreCase);
+ int CompareStringEx(__in LPCWSTR lpLocaleName, __in DWORD dwCmpFlags, __in_ecount(cchCount1) LPCWSTR lpString1, __in int cchCount1, __in_ecount(cchCount2) LPCWSTR lpString2,
+ __in int cchCount2, __in_opt LPNLSVERSIONINFO lpVersionInformation, __in_opt LPVOID lpReserved, __in_opt LPARAM lParam );
+
+ int CompareStringOrdinal(__in_ecount(cchCount1) LPCWSTR string1, __in int cchCount1, __in_ecount(cchCount2) LPCWSTR string2, __in int cchCount2, __in BOOL bIgnoreCase);
+ __success(return != 0)
int LCMapStringEx(__in LPCWSTR lpLocaleName,
__in DWORD dwMapFlags,
__in_ecount(cchSrc) LPCWSTR lpSrcStr,
@@ -176,6 +178,7 @@ namespace DownLevel
__in_opt LPVOID lpReserved,
__in_opt LPARAM lParam);
+ __success(return != -1)
int FindNLSStringEx(__in LPCWSTR lpLocaleName,
__in DWORD dwFindNLSStringFlags,
__in_ecount(cchSource) LPCWSTR lpStringSource,
@@ -200,6 +203,7 @@ namespace DownLevel
// This is where we fudge data the OS doesn't know (even on Vista)
namespace UplevelFallback
{
+ __success(return != 0)
int LCMapStringEx(__in LPCWSTR lpLocaleName,
__in DWORD dwMapFlags,
__in_ecount(cchSrc) LPCWSTR lpSrcStr,
@@ -225,6 +229,7 @@ namespace DownLevel
int ResolveLocaleName(__in LPCWSTR lpNameToResolve, __in_ecount_opt(cchLocaleName) LPWSTR lpLocaleName, __in int cchLocaleName);
+ __success(return)
BOOL GetThreadPreferredUILanguages( __in DWORD dwFlags,
__out PULONG pulNumLanguages,
__out_ecount_opt(*pcchLanguagesBuffer) PWSTR pwszLanguagesBuffer,
diff --git a/src/inc/eventtracebase.h b/src/inc/eventtracebase.h
index eac127e732..9a6b218d3f 100644
--- a/src/inc/eventtracebase.h
+++ b/src/inc/eventtracebase.h
@@ -385,7 +385,7 @@ namespace ETW
friend class ETW::EnumerationLog;
#ifdef FEATURE_EVENT_TRACE
static VOID SendModuleEvent(Module *pModule, DWORD dwEventOptions, BOOL bFireDomainModuleEvents=FALSE);
- static ULONG SendModuleRange(Module *pModule, DWORD dwEventOptions);
+ static ULONG SendModuleRange(__in Module *pModule, __in DWORD dwEventOptions);
static VOID SendAssemblyEvent(Assembly *pAssembly, DWORD dwEventOptions);
static VOID SendDomainEvent(BaseDomain *pBaseDomain, DWORD dwEventOptions, LPCWSTR wszFriendlyName=NULL);
public:
diff --git a/src/inc/formattype.cpp b/src/inc/formattype.cpp
index 05b4c86247..923ff3e9a1 100644
--- a/src/inc/formattype.cpp
+++ b/src/inc/formattype.cpp
@@ -93,7 +93,7 @@ const PCCOR_SIGNATURE PrettyPrintSignature(
const char* name, // can be "", the name of the method for this sig 0 means local var sig
CQuickBytes *out, // where to put the pretty printed string
IMDInternalImport *pIMDI, // ptr to IMDInternalImport class with ComSig
- __in_opt const char* inlabel, // prefix for names (NULL if no names required)
+ _In_opt_z_ const char* inlabel, // prefix for names (NULL if no names required)
BOOL printTyArity=FALSE);
diff --git a/src/inc/newapis.h b/src/inc/newapis.h
index 0ec87b5c70..57286e2051 100644
--- a/src/inc/newapis.h
+++ b/src/inc/newapis.h
@@ -326,7 +326,9 @@ namespace NewApis
// Enumeration functions
__success(return != 0) BOOL
EnumDateFormatsExEx (DATEFMT_ENUMPROCEXEX lpDateFmtEnumProcExEx, LPCWSTR lpLocaleName, DWORD dwFlags, LPARAM lParam);
+ __success(return != 0)
BOOL EnumTimeFormatsEx(TIMEFMT_ENUMPROCEX lpTimeFmtEnumProcEx, LPCWSTR lpLocaleName, DWORD dwFlags, LPARAM lParam);
+ __success(return != 0)
BOOL EnumCalendarInfoExEx(CALINFO_ENUMPROCEXEX pCalInfoEnumProcExEx, LPCWSTR lpLocaleName, CALID Calendar, CALTYPE CalType, LPARAM lParam);
int LCIDToLocaleName(__in LCID Locale, __out_ecount_opt(cchName) LPWSTR lpName, __in int cchName, __in DWORD dwFlags);
diff --git a/src/inc/sbuffer.h b/src/inc/sbuffer.h
index adcde9bab8..0c98fdb668 100644
--- a/src/inc/sbuffer.h
+++ b/src/inc/sbuffer.h
@@ -353,8 +353,8 @@ class SBuffer
// Manipulates contents of the buffer via the plugins below, but
// adds some debugging checks. Should always call through here rather
// than directly calling the extensibility points.
- void DebugMoveBuffer(BYTE *to, BYTE *from, COUNT_T size);
- void DebugCopyConstructBuffer(BYTE *to, const BYTE *from, COUNT_T size);
+ void DebugMoveBuffer(__out_bcount(size) BYTE *to, BYTE *from, COUNT_T size);
+ void DebugCopyConstructBuffer(__out_bcount(size) BYTE *to, const BYTE *from, COUNT_T size);
void DebugConstructBuffer(BYTE *buffer, COUNT_T size);
void DebugDestructBuffer(BYTE *buffer, COUNT_T size);
diff --git a/src/inc/stgpool.h b/src/inc/stgpool.h
index 5932a51464..9170125b37 100644
--- a/src/inc/stgpool.h
+++ b/src/inc/stgpool.h
@@ -333,7 +333,7 @@ protected:
// helper for extension segments.
//*****************************************************************************
__checkReturn
- FORCEINLINE HRESULT GetDataReadOnly(UINT32 nOffset, __in MetaData::DataBlob *pData)
+ FORCEINLINE HRESULT GetDataReadOnly(UINT32 nOffset, __inout MetaData::DataBlob *pData)
{
LIMITED_METHOD_CONTRACT;
_ASSERTE(IsReadOnly());
@@ -375,7 +375,7 @@ protected:
// helper for extension segments.
//*****************************************************************************
__checkReturn
- virtual HRESULT GetData(UINT32 nOffset, __in MetaData::DataBlob *pData)
+ virtual HRESULT GetData(UINT32 nOffset, __inout MetaData::DataBlob *pData)
{
WRAPPER_NO_CONTRACT;
return GetDataReadOnly(nOffset, pData);
diff --git a/src/inc/sxshelpers.h b/src/inc/sxshelpers.h
index 3fa450d5b9..3ecf5cc9a2 100644
--- a/src/inc/sxshelpers.h
+++ b/src/inc/sxshelpers.h
@@ -103,7 +103,7 @@ class AssemblyVersion
inline AssemblyVersion(AssemblyVersion& version);
// Init
- HRESULT Init(LPCWSTR pwzVersion, BOOL bStartsWithV);
+ HRESULT Init(__in_z LPCWSTR pwzVersion, BOOL bStartsWithV);
inline HRESULT Init(WORD major, WORD minor, WORD build, WORD revision);
// Mofifiers.
diff --git a/src/inc/utilcode.h b/src/inc/utilcode.h
index 7d380e24de..e832441454 100644
--- a/src/inc/utilcode.h
+++ b/src/inc/utilcode.h
@@ -5600,6 +5600,7 @@ namespace Clr { namespace Util
namespace Reg
{
HRESULT ReadStringValue(HKEY hKey, LPCWSTR wszSubKey, LPCWSTR wszName, SString & ssValue);
+ __success(return == S_OK)
HRESULT ReadStringValue(HKEY hKey, LPCWSTR wszSubKey, LPCWSTR wszName, __deref_out __deref_out_z LPWSTR* pwszValue);
}
@@ -5625,6 +5626,7 @@ namespace Win32
SString & ssFileName,
bool fAllowLongFileNames = false);
+ __success(return == S_OK)
HRESULT GetModuleFileName(
HMODULE hModule,
__deref_out_z LPWSTR * pwszFileName,
diff --git a/src/inc/winrt/windowsstring.h b/src/inc/winrt/windowsstring.h
index ff5fcfe811..fe99e69478 100644
--- a/src/inc/winrt/windowsstring.h
+++ b/src/inc/winrt/windowsstring.h
@@ -324,7 +324,7 @@ namespace clr
//
// if the HRESULT indicates failure, does nothing
//
- static HRESULT FreeAndAssignOnSuccess(HRESULT hr, HSTRING newValue, __out HSTRING *target)
+ static HRESULT FreeAndAssignOnSuccess(HRESULT hr, HSTRING newValue, __inout HSTRING *target)
{
STATIC_CONTRACT_LIMITED_METHOD;
if (SUCCEEDED(hr))