HMODULE hDac = NULL;
DWORD dbiTimestamp;
DWORD dbiSizeOfImage;
- WCHAR dbiName[MAX_PATH_FNAME];
+ WCHAR dbiName[MAX_PATH_FNAME] = {0};
DWORD dacTimestamp;
DWORD dacSizeOfImage;
- WCHAR dacName[MAX_PATH_FNAME];
+ WCHAR dacName[MAX_PATH_FNAME] = {0};
CLR_DEBUGGING_VERSION version;
BOOL versionSupportedByCaller = FALSE;
}
#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')
// 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;
#endif
#if defined(_WININET_) && !defined (CreateUrlCacheEntryW_NoThrow)
+__success(return)
BOOL
CreateUrlCacheEntryW_NoThrow(
IN LPCWSTR lpszUrlName,
// 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,
// 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,
__in_opt LPVOID lpReserved,
__in_opt LPARAM lParam);
+ __success(return != -1)
int FindNLSStringEx(__in LPCWSTR lpLocaleName,
__in DWORD dwFindNLSStringFlags,
__in_ecount(cchSource) LPCWSTR lpStringSource,
// 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,
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,
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:
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);
// 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);
// 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);
// 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());
// 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);
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.
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);
}
SString & ssFileName,
bool fAllowLongFileNames = false);
+ __success(return == S_OK)
HRESULT GetModuleFileName(
HMODULE hModule,
__deref_out_z LPWSTR * pwszFileName,
//
// 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))
// Returns FALSE if the value cannot be encoded as compressed integer, doesn't fill *pcbEncodingSize
// then.
__checkReturn
+ __success(return)
static inline BOOL GetEncodingSize(
UINT32 nValue,
__out UINT32 *pcbEncodingSize);
// *pcbEncodingSize with 1, 2 or 4 and *pnEncodedValue with the encoded value.
// Returns FALSE if the value cannot be encoded as compressed integer, doesn't fill *pcbEncodingSize
// nor *pnEncodedValue then.
+ __success(return)
static inline BOOL Encode(
UINT32 nValue,
__out UINT32 *pnEncodedValue,
// Returns FALSE if there's not enough data in the blob, doesn't initialize the value '*pnValue' then.
// Returns TRUE otherwise, fills *pnValue, but doesn't move the memory block (doesn't skip the read
// data).
- __checkReturn inline BOOL PeekU1(__out BYTE *pnValue) const;
- __checkReturn inline BOOL PeekU2(__out UINT16 *pnValue) const;
- __checkReturn inline BOOL PeekU4(__out UINT32 *pnValue) const;
- __checkReturn inline BOOL PeekU8(__out UINT64 *pnValue) const;
+ __checkReturn __success(return) inline BOOL PeekU1(__out BYTE *pnValue) const;
+ __checkReturn __success(return) inline BOOL PeekU2(__out UINT16 *pnValue) const;
+ __checkReturn __success(return) inline BOOL PeekU4(__out UINT32 *pnValue) const;
+ __checkReturn __success(return) inline BOOL PeekU8(__out UINT64 *pnValue) const;
//#GetUx_Functions
// Reads the U1/U2/U4/U8 from the data blob and skips the read data.
// Returns FALSE if there's not enough data in the blob, doesn't initialize the value '*pnValue' then.
// Returns TRUE otherwise, fills *pnValue and moves the memory block behind the read data.
- __checkReturn inline BOOL GetU1(__out BYTE *pnValue);
- __checkReturn inline BOOL GetU2(__out UINT16 *pnValue);
- __checkReturn inline BOOL GetU4(__out UINT32 *pnValue);
- __checkReturn inline BOOL GetU8(__out UINT64 *pnValue);
+ __checkReturn __success(return) inline BOOL GetU1(__out BYTE *pnValue);
+ __checkReturn __success(return) inline BOOL GetU2(__out UINT16 *pnValue);
+ __checkReturn __success(return) inline BOOL GetU4(__out UINT32 *pnValue);
+ __checkReturn __success(return) inline BOOL GetU8(__out UINT64 *pnValue);
// Reads compressed integer (1, 2 or 4 bytes of format code:CompressedInteger#Format - returns the size
// in *pcbCompressedValueSize) from the data blob without skipping the read data.
// Returns TRUE otherwise, fills *pnValue and *pcbCompressedValueSize (with number 1,2 or 4), but
// doesn't move the memory block (doesn't skip the read data).
__checkReturn
+ __success(return)
inline BOOL PeekCompressedU(
__out UINT32 *pnValue,
__out UINT32 *pcbCompressedValueSize);
// Returns FALSE if there's not enough data in the blob or the compression is invalid (starts with byte
// 111? ????), doesn't initialize the value *pnValue then.
// Returns TRUE otherwise, fills *pnValue and moves the memory block behind the read data.
- __checkReturn
+ __checkReturn
+ __success(return)
inline BOOL GetCompressedU(__out UINT32 *pnValue);
// Reads compressed integer (1, 2 or 4 bytes of format code:CompressedInteger#Format - returns the size
// in *pcbCompressedValueSize) from the data blob and skips the read data.
// Returns TRUE otherwise, fills *pnValue and *pcbCompressedValueSize (with number 1,2 or 4) and moves
// the memory block behind the read data.
__checkReturn
+ __success(return)
inline BOOL GetCompressedU(
__out UINT32 *pnValue,
__out UINT32 *pcbCompressedValueSize);
// Returns TRUE otherwise, fills *pData with the "read" data and moves the memory block behind the
// "read" data.
__checkReturn
+ __success(return)
inline BOOL GetDataOfSize(
UINT32 cbDataSize,
__out DataBlob *pData);
// Returns FALSE if there's less than cbSize data represented.
// Returns TRUE otherwise and truncates the represented data size to cbSize.
__checkReturn
+ __success(return)
inline BOOL TruncateToExactSize(UINT32 cbSize);
// Truncates the buffer by size (cbSize).
// Returns FALSE if there's less than cbSize data represented.
// Returns TRUE otherwise and truncates the represented data size by cbSize.
__checkReturn
+ __success(return)
inline BOOL TruncateBySize(UINT32 cbSize);
#ifdef _DEBUG
// integer (bigger than code:CompressedInteger::const_Max).
// Returns TRUE on success and moves the memory block behind the written data.
__checkReturn
+ __success(return)
inline BOOL StoreCompressedU(UINT32 nValue);
// Writes data from *pSource to the data blob and skips the written data.
// Returns FALSE if there's not enough data in the blob.
// Returns TRUE on success and moves memory block behind the written data.
__checkReturn
+ __success(return)
inline BOOL StoreData(__in const DataBlob *pSource);
private:
// See code:#PeekUx_Functions above.
//
__checkReturn
+_Success_(return)
inline
BOOL
DataBlob::PeekU1(__out BYTE *pnValue) const
// See code:#PeekUx_Functions above.
//
__checkReturn
+_Success_(return)
inline
BOOL
DataBlob::PeekU2(__out UINT16 *pnValue) const
// See code:#PeekUx_Functions above.
//
__checkReturn
+_Success_(return)
inline
BOOL
DataBlob::PeekU4(__out UINT32 *pnValue) const
// See code:#PeekUx_Functions above.
//
__checkReturn
+_Success_(return)
inline
BOOL
DataBlob::PeekU8(__out UINT64 *pnValue) const
// See code:#GetUx_Functions above.
//
__checkReturn
+_Success_(return)
inline
BOOL
DataBlob::GetU1(__out BYTE *pnValue)
// See code:#GetUx_Functions above.
//
__checkReturn
+_Success_(return)
inline
BOOL
DataBlob::GetU2(__out UINT16 *pnValue)
// See code:#GetUx_Functions above.
//
__checkReturn
+_Success_(return)
inline
BOOL
DataBlob::GetU4(__out UINT32 *pnValue)
// See code:#GetUx_Functions above.
//
__checkReturn
+_Success_(return)
inline
BOOL
DataBlob::GetU8(__out UINT64 *pnValue)
// doesn't move the memory block (doesn't skip the read data).
//
__checkReturn
+_Success_(return)
inline
BOOL
DataBlob::PeekCompressedU(
__checkReturn
inline HRESULT GetAllData(
- __out DataBlob *pData)
+ __inout DataBlob *pData)
{
return m_BlobPool.GetDataReadOnly(0, pData);
}
__checkReturn
HRESULT GetData(
UINT32 nDataIndex,
- __in DataBlob *pData);
+ __out DataBlob *pData);
inline BOOL IsEmpty() const
{ return m_pHotHeapHeader == NULL; }
// is available, and then it will remove unused functions.
// Instead of specifying all libs for imported functions needed by the following codes, we just
// remove them from compiling phase.
+__success(return)
BOOL
CreateUrlCacheEntryW_NoThrow(
IN LPCWSTR lpszUrlName,
return cchSrc;
}
+ __success(return != 0)
int LinguisticCaseString(__in LCID lcid,__in DWORD flags,
__in_ecount(cchSrc) const WCHAR * source,
__in int cchSrc,
}
CONTRACTL_END;
- ICreateErrorInfo *pICreateErr; // Error info creation Iface pointer.
+ ICreateErrorInfo *pICreateErr = NULL; // Error info creation Iface pointer.
IErrorInfo *pIErrInfo = NULL; // The IErrorInfo interface.
HRESULT hr; // Return status.
// lpRedirectedKey is allocated and returned from this method. Caller owns the new string and
// should release
//
+__success(return == ERROR_SUCCESS)
HRESULT RedirectKey(REGSAM samDesired, HKEY hKey, LPCWSTR lpKey, __deref_out_z LPWSTR * lpRedirectedKey)
{
if (hKey != kRegistryRootHive || _wcsnicmp(lpKey, kRegistryRootKey, wcslen(kRegistryRootKey)) != 0)
{
+ *lpRedirectedKey = NULL;
return ERROR_SUCCESS;
}
WCHAR szID[64]; // The typelib ID to register.
WCHAR szTLBID[256]; // TypeLib\\szID.
WCHAR szHelpDir[_MAX_PATH];
- WCHAR szDrive[_MAX_DRIVE];
- WCHAR szDir[_MAX_DIR];
+ WCHAR szDrive[_MAX_DRIVE] = {0};
+ WCHAR szDir[_MAX_DIR] = {0};
WCHAR szVersion[64];
LPWSTR szTmp;
HRESULT SidBuffer::InitFromProcessAppContainerSidNoThrow(DWORD pid)
{
HRESULT hr = S_OK;
+ HANDLE hToken = NULL;
+
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
if (hProcess == NULL)
{
hr = HRESULT_FROM_GetLastError();
goto exit;
}
- HANDLE hToken = NULL;
if (!OpenProcessToken(hProcess, TOKEN_QUERY, &hToken))
{
hr = HRESULT_FROM_GetLastError();
}
// Attempts to load a Sort DLL. If this fails, the values of the __out parameters are unchanged.
+ __success(return)
BOOL LoadSortDllAndPublish(
__in LPCWSTR sDllName,
__in DWORD dwVersion,
{
namespace __imp
{
+ __success(return == S_OK)
static
HRESULT FindSubKeyDefaultValueForCLSID(REFCLSID rclsid, LPCWSTR wszSubKeyName, SString & ssValue)
{
return Clr::Util::Reg::ReadStringValue(HKEY_CLASSES_ROOT, ssKeyName.GetUnicode(), NULL, ssValue);
}
+ __success(return == S_OK)
static
HRESULT FindSubKeyDefaultValueForCLSID(REFCLSID rclsid, LPCWSTR wszSubKeyName, __deref_out __deref_out_z LPWSTR* pwszValue)
{
}
// Look in AeDebug key for "Debugger"; get the size of any value stored there.
- DWORD valueType, valueSize;
+ DWORD valueType, valueSize = 0;
ret = WszRegQueryValueEx(hKeyHolder, kUnmanagedDebuggerValue, 0, &valueType, 0, &valueSize);
_ASSERTE(pcchDebuggerString != NULL);
mustUseMessageBox = (pfnTaskDialogIndirect == NULL);
}
- int result;
+ int result = MB_OK;
if (mustUseMessageBox) {
result = WszMessageBox(hWnd, message, title, uType);
}
}
else
{
- IfFailRet(FString::Utf8_Unicode(szName, bIsAscii, wzBuffer, *pcchBuffer));
- *pcchBuffer = cchName;
+ IfFailRet(FString::Utf8_Unicode(szName, bIsAscii, wzBuffer, cchBuffer));
+ if (pcchBuffer != nullptr)
+ {
+ *pcchBuffer = cchName;
+ }
return S_OK;
}
}
WORD cbStringBlocks;
int i;
bool bUseFileVer = false;
- WCHAR rcFile[_MAX_PATH]; // Name of file without path
- WCHAR rcFileExtension[_MAX_PATH]; // file extension
+ WCHAR rcFile[_MAX_PATH] = {0}; // Name of file without path
+ WCHAR rcFileExtension[_MAX_PATH] = {0}; // file extension
WCHAR rcFileName[_MAX_PATH]; // Name of file with extension but without path
DWORD cbTmp;
if (hr == S_OK)
{
CustomAttributeParser ca(pVal, cbVal);
- CaNamedArg namedArgs[1];
+ CaNamedArg namedArgs[1] = {0};
// First, the void constructor:
IfFailGo(ParseKnownCaArgs(ca, NULL, 0));
STDMETHOD(GetName)(
- __out LPDWORD lpcwBuffer,
+ __inout LPDWORD lpcwBuffer,
__out_ecount_opt(*lpcwBuffer) WCHAR *pwzName)
{
LIMITED_METHOD_CONTRACT;
const WCHAR * wszFileName = pFileNameElem->GetValue();
pAssembly = FindAssemblyByFileName(wszFileName);
- WCHAR wszFileNameStripped[_MAX_PATH];
+ WCHAR wszFileNameStripped[_MAX_PATH] = {0};
SplitPath(wszFileName, NULL, NULL, NULL, NULL, wszFileNameStripped, _MAX_PATH, NULL, NULL);
if (pAssembly == nullptr)
// and fill out the debug directory and save off the symbols now.
if (pWriter != NULL)
{
- IMAGE_DEBUG_DIRECTORY debugDirIDD;
+ IMAGE_DEBUG_DIRECTORY debugDirIDD = {0};
DWORD debugDirDataSize;
BYTE *debugDirData;
QCALL_CONTRACT;
BEGIN_QCALL;
- WCHAR wszPath[MAX_LONGPATH + 1];
+ WCHAR wszPath[MAX_LONGPATH + 1] = {0};
GetRootDirInternal(dwFlags, wszPath, COUNTOF(wszPath));
retRootDir.Set(wszPath);
Assembly *pAssembly;
mdToken tkResolutionScope;
- pAssemblyImport->GetResolutionScopeOfTypeRef(ref, &tkResolutionScope);
-
- if(TypeFromToken(tkResolutionScope) == mdtAssemblyRef)
+ if(FAILED(pAssemblyImport->GetResolutionScopeOfTypeRef(ref, &tkResolutionScope)))
+ hr = S_FALSE;
+ else if(TypeFromToken(tkResolutionScope) == mdtAssemblyRef)
{
DWORD dwAssemblyRefFlags;
IfFailThrow(pAssemblyImport->GetAssemblyRefProps(tkResolutionScope, NULL, NULL,
void CheckForHiddenParameters(DWORD cParamMarshalInfo,
__in_ecount(cParamMarshalInfo) MarshalInfo *pParamMarshalInfo,
__out DWORD *pcHiddenNativeParameters,
- __out_ecount(*pcHiddenNativeParameters) HiddenParameterInfo **ppHiddenNativeParameters)
+ __out HiddenParameterInfo **ppHiddenNativeParameters)
{
CONTRACTL
{
WCHAR appPath[MAX_LONGPATH];
DWORD cchAppPath = NumItems(appPath);
- WCHAR verBuf[23];
+ WCHAR verBuf[23] = {0};
USHORT major, minor, build, revision;
if ((GetCurrentModuleFileName(appPath, &cchAppPath) == S_OK) && SUCCEEDED(DwGetFileVersionInfo(appPath, major, minor, build, revision)))
}
const int buf_size = 128;
- WCHAR buf[buf_size];
+ WCHAR buf[buf_size] = {0};
// See detailed explanation of this flag in threads.cpp. But the basic idea is that we already
// reported the exception in the AppDomain where it went unhandled, so we don't need to report
StackSString sszEntryPoint;
sszEntryPoint.SetUTF8(pMD->GetEntrypointName());
- WCHAR szDllFullName[_MAX_PATH], szDrive[_MAX_PATH], szPath[_MAX_PATH], szFileName[_MAX_PATH], szExt[_MAX_PATH];
+ WCHAR szDllFullName[_MAX_PATH] = {0};
+ WCHAR szDrive[_MAX_PATH] = {0};
+ WCHAR szPath[_MAX_PATH] = {0};
+ WCHAR szFileName[_MAX_PATH] = {0};
+ WCHAR szExt[_MAX_PATH] = {0};
WszGetModuleFileName(hMod, szDllFullName, _MAX_PATH);
SplitPath(szDllFullName, szDrive, _MAX_PATH, szPath, _MAX_PATH, szFileName, _MAX_PATH, szExt, _MAX_PATH);
aptcaFlags |= TokenSecurityDescriptorFlags_APTCA;
// Look for the PartialTrustVisibilityLevel named argument
- CaNamedArg namedArgs[1];
+ CaNamedArg namedArgs[1] = {0};
namedArgs[0].InitI4FieldEnum(g_PartialTrustVisibilityLevel, g_SecurityPartialTrustVisibilityLevel);
if (SUCCEEDED(ParseKnownCaNamedArgs(cap, namedArgs, _countof(namedArgs))))
TypeLibExporter exporter; // Exporter object.
LPCWSTR szModule=0; // Module filename.
- WCHAR rcDrive[_MAX_DRIVE];
- WCHAR rcDir[_MAX_DIR];
- WCHAR rcFile[_MAX_FNAME];
- WCHAR rcTlb[_MAX_PATH+5]; // Buffer for the tlb filename.
+ WCHAR rcDrive[_MAX_DRIVE] = {0};
+ WCHAR rcDir[_MAX_DIR] = {0};
+ WCHAR rcFile[_MAX_FNAME] = {0};
+ WCHAR rcTlb[_MAX_PATH+5] = {0}; // Buffer for the tlb filename.
int bDynamic=0; // If true, dynamic module.
Module *pModule; // The Assembly's SecurityModule.
// Called again with a nonnull *pdstout to fill in the actual buffer.
//
// Returns the # of arguments.
-static UINT ParseCommandLine(LPCWSTR psrc, __out LPWSTR *pdstout)
+static UINT ParseCommandLine(LPCWSTR psrc, __inout LPWSTR *pdstout)
{
CONTRACTL
{