Use SAL2 _In_, _Out_ to prevent conflicts (#63261)
authorNN <580536+NN---@users.noreply.github.com>
Mon, 3 Jan 2022 20:29:30 +0000 (22:29 +0200)
committerGitHub <noreply@github.com>
Mon, 3 Jan 2022 20:29:30 +0000 (12:29 -0800)
112 files changed:
src/coreclr/debug/daccess/daccess.cpp
src/coreclr/debug/daccess/dacfn.cpp
src/coreclr/debug/daccess/dacimpl.h
src/coreclr/debug/di/publish.cpp
src/coreclr/debug/di/rspriv.h
src/coreclr/debug/di/shimcallback.cpp
src/coreclr/debug/di/shimpriv.h
src/coreclr/dlls/dbgshim/dbgshim.cpp
src/coreclr/dlls/dbgshim/dbgshim.h
src/coreclr/dlls/mscoree/mscoree.cpp
src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp
src/coreclr/dlls/mscorpe/iceefilegen.cpp
src/coreclr/dlls/mscorpe/pewriter.cpp
src/coreclr/dlls/mscorpe/pewriter.h
src/coreclr/ilasm/asmman.cpp
src/coreclr/ilasm/asmman.hpp
src/coreclr/ilasm/asmparse.h
src/coreclr/ilasm/assem.cpp
src/coreclr/ilasm/assembler.cpp
src/coreclr/ilasm/assembler.h
src/coreclr/ilasm/grammar_after.cpp
src/coreclr/ilasm/grammar_before.cpp
src/coreclr/ilasm/main.cpp
src/coreclr/ilasm/method.cpp
src/coreclr/ilasm/method.hpp
src/coreclr/ilasm/writer.cpp
src/coreclr/ildasm/dasm.cpp
src/coreclr/ildasm/dasm_formattype.cpp
src/coreclr/ildasm/dis.cpp
src/coreclr/ildasm/dis.h
src/coreclr/ildasm/dres.cpp
src/coreclr/ildasm/windasm.cpp
src/coreclr/inc/blobfetcher.h
src/coreclr/inc/ceefilegenwriter.h
src/coreclr/inc/ceegen.h
src/coreclr/inc/clrconfig.h
src/coreclr/inc/clrnt.h
src/coreclr/inc/cycletimer.h
src/coreclr/inc/daccess.h
src/coreclr/inc/eventtracebase.h
src/coreclr/inc/formattype.h
src/coreclr/inc/fstring.h
src/coreclr/inc/loaderheap.h
src/coreclr/inc/pesectionman.h
src/coreclr/inc/stacktrace.h
src/coreclr/inc/strongnameholders.h
src/coreclr/inc/utilcode.h
src/coreclr/jit/gentree.cpp
src/coreclr/md/ceefilegen/blobfetcher.cpp
src/coreclr/md/ceefilegen/cceegen.cpp
src/coreclr/md/ceefilegen/pesectionman.cpp
src/coreclr/md/compiler/regmeta.cpp
src/coreclr/md/compiler/regmeta.h
src/coreclr/md/compiler/regmeta_imetadatatables.cpp
src/coreclr/md/compressedinteger.h
src/coreclr/md/compressedinteger.inl
src/coreclr/md/datablob.h
src/coreclr/md/datablob.inl
src/coreclr/md/enc/mdinternalrw.cpp
src/coreclr/md/enc/stgtiggerstorage.cpp
src/coreclr/md/heaps/blobheap.h
src/coreclr/md/heaps/guidheap.h
src/coreclr/md/heaps/stringheap.h
src/coreclr/md/inc/metamodel.h
src/coreclr/md/inc/metamodelro.h
src/coreclr/md/inc/metamodelrw.h
src/coreclr/md/inc/stgtiggerstorage.h
src/coreclr/md/runtime/mdinternalro.cpp
src/coreclr/md/tables/table.h
src/coreclr/nativeaot/Runtime/eventtrace.cpp
src/coreclr/nativeaot/Runtime/eventtracebase.h
src/coreclr/nativeaot/Runtime/inc/daccess.h
src/coreclr/pal/inc/rt/sal.h
src/coreclr/pal/inc/rt/specstrings.h
src/coreclr/pal/inc/rt/specstrings_strict.h
src/coreclr/pal/src/safecrt/internal.h
src/coreclr/pal/src/safecrt/internal_securecrt.h
src/coreclr/pal/src/safecrt/tsplitpath_s.inl
src/coreclr/tools/metainfo/mdinfo.cpp
src/coreclr/tools/metainfo/mdinfo.h
src/coreclr/tools/metainfo/mdobj.cpp
src/coreclr/tools/util/consoleargs.cpp
src/coreclr/tools/util/consoleargs.h
src/coreclr/unwinder/amd64/dbs_stack_x64.cpp
src/coreclr/unwinder/amd64/unwinder_amd64.cpp
src/coreclr/unwinder/amd64/unwinder_amd64.h
src/coreclr/unwinder/arm/unwinder_arm.cpp
src/coreclr/unwinder/arm/unwinder_arm.h
src/coreclr/unwinder/arm64/unwinder_arm64.cpp
src/coreclr/unwinder/arm64/unwinder_arm64.h
src/coreclr/unwinder/i386/unwinder_i386.cpp
src/coreclr/unwinder/i386/unwinder_i386.h
src/coreclr/unwinder/unwinder.cpp
src/coreclr/unwinder/unwinder.h
src/coreclr/utilcode/clrconfig.cpp
src/coreclr/utilcode/fstring.cpp
src/coreclr/utilcode/loaderheap.cpp
src/coreclr/utilcode/makepath.cpp
src/coreclr/utilcode/splitpath.cpp
src/coreclr/utilcode/stacktrace.cpp
src/coreclr/utilcode/util.cpp
src/coreclr/vm/ceemain.cpp
src/coreclr/vm/clsload.cpp
src/coreclr/vm/clsload.hpp
src/coreclr/vm/codeman.cpp
src/coreclr/vm/codeman.h
src/coreclr/vm/eventreporter.cpp
src/coreclr/vm/eventreporter.h
src/coreclr/vm/eventtrace.cpp
src/coreclr/vm/interpreter.cpp
src/mono/dlls/dbgshim/dbgshim.cpp
src/mono/dlls/dbgshim/dbgshim.h

index f9ec95c..1280b69 100644 (file)
@@ -92,7 +92,7 @@ BOOL WINAPI DllMain(HANDLE instance, DWORD reason, LPVOID reserved)
 }
 
 HRESULT
-ConvertUtf8(__in LPCUTF8 utf8,
+ConvertUtf8(_In_ LPCUTF8 utf8,
             ULONG32 bufLen,
             ULONG32* nameLen,
             __out_ecount_part_opt(bufLen, *nameLen) PWSTR buffer)
@@ -228,7 +228,7 @@ GetFullMethodNameFromMetadata(IMDInternalImport* mdImport,
 }
 
 HRESULT
-SplitFullName(__in_z __in PCWSTR fullName,
+SplitFullName(__in_z _In_ PCWSTR fullName,
               SplitSyntax syntax,
               ULONG32 memberDots,
               __deref_out_opt LPUTF8* namespaceName,
@@ -401,7 +401,7 @@ SplitFullName(__in_z __in PCWSTR fullName,
 }
 
 int
-CompareUtf8(__in LPCUTF8 str1, __in LPCUTF8 str2, __in ULONG32 nameFlags)
+CompareUtf8(_In_ LPCUTF8 str1, _In_ LPCUTF8 str2, _In_ ULONG32 nameFlags)
 {
     if (nameFlags & CLRDATA_BYNAME_CASE_INSENSITIVE)
     {
@@ -7565,9 +7565,9 @@ typedef struct _WER_RUNTIME_EXCEPTION_INFORMATION
 //    else detailed error code.
 //
 //----------------------------------------------------------------------------
-STDAPI OutOfProcessExceptionEventGetWatsonBucket(__in PDWORD pContext,
-                                                 __in const PWER_RUNTIME_EXCEPTION_INFORMATION pExceptionInformation,
-                                                 __out GenericModeBlock * pGMB)
+STDAPI OutOfProcessExceptionEventGetWatsonBucket(_In_ PDWORD pContext,
+                                                 _In_ const PWER_RUNTIME_EXCEPTION_INFORMATION pExceptionInformation,
+                                                 _Out_ GenericModeBlock * pGMB)
 {
     HANDLE hProcess = pExceptionInformation->hProcess;
     HANDLE hThread  = pExceptionInformation->hThread;
@@ -7656,12 +7656,12 @@ STDAPI OutOfProcessExceptionEventGetWatsonBucket(__in PDWORD pContext,
 //    Since this is called by external modules it's important that we don't let any exceptions leak out (see Win8 95224).
 //
 //----------------------------------------------------------------------------
-STDAPI OutOfProcessExceptionEventCallback(__in PDWORD pContext,
-                                          __in const PWER_RUNTIME_EXCEPTION_INFORMATION pExceptionInformation,
-                                          __out BOOL * pbOwnershipClaimed,
+STDAPI OutOfProcessExceptionEventCallback(_In_ PDWORD pContext,
+                                          _In_ const PWER_RUNTIME_EXCEPTION_INFORMATION pExceptionInformation,
+                                          _Out_ BOOL * pbOwnershipClaimed,
                                           __out_ecount(*pchSize) PWSTR pwszEventName,
                                           __inout PDWORD pchSize,
-                                          __out PDWORD pdwSignatureCount)
+                                          _Out_ PDWORD pdwSignatureCount)
 {
     SUPPORTS_DAC_HOST_ONLY;
 
@@ -7748,9 +7748,9 @@ STDAPI OutOfProcessExceptionEventCallback(__in PDWORD pContext,
 //    Since this is called by external modules it's important that we don't let any exceptions leak out (see Win8 95224).
 //
 //----------------------------------------------------------------------------
-STDAPI OutOfProcessExceptionEventSignatureCallback(__in PDWORD pContext,
-                                                   __in const PWER_RUNTIME_EXCEPTION_INFORMATION pExceptionInformation,
-                                                   __in DWORD dwIndex,
+STDAPI OutOfProcessExceptionEventSignatureCallback(_In_ PDWORD pContext,
+                                                   _In_ const PWER_RUNTIME_EXCEPTION_INFORMATION pExceptionInformation,
+                                                   _In_ DWORD dwIndex,
                                                    __out_ecount(*pchName) PWSTR pwszName,
                                                    __inout PDWORD pchName,
                                                    __out_ecount(*pchValue) PWSTR pwszValue,
@@ -7873,12 +7873,12 @@ STDAPI OutOfProcessExceptionEventSignatureCallback(__in PDWORD pContext,
 //    this function are of the pwszName and pwszValue buffers.
 //
 //----------------------------------------------------------------------------
-STDAPI OutOfProcessExceptionEventDebuggerLaunchCallback(__in PDWORD pContext,
-                                                        __in const PWER_RUNTIME_EXCEPTION_INFORMATION pExceptionInformation,
-                                                        __out BOOL * pbCustomDebuggerNeeded,
+STDAPI OutOfProcessExceptionEventDebuggerLaunchCallback(_In_ PDWORD pContext,
+                                                        _In_ const PWER_RUNTIME_EXCEPTION_INFORMATION pExceptionInformation,
+                                                        _Out_ BOOL * pbCustomDebuggerNeeded,
                                                         __out_ecount_opt(*pchSize) PWSTR pwszDebuggerLaunch,
                                                         __inout PDWORD pchSize,
-                                                        __out BOOL * pbAutoLaunchDebugger)
+                                                        _Out_ BOOL * pbAutoLaunchDebugger)
 {
     SUPPORTS_DAC_HOST_ONLY;
 
index e1b83ab..11f798e 100644 (file)
@@ -89,7 +89,7 @@ DacExceptionFilter(Exception* ex, ClrDataAccess* access,
 }
 
 void __cdecl
-DacWarning(__in char* format, ...)
+DacWarning(_In_ char* format, ...)
 {
     char text[256];
     va_list args;
index 948bef1..03697ba 100644 (file)
@@ -222,7 +222,7 @@ struct METH_EXTENTS
     CLRDATA_ADDRESS_RANGE extents[1];
 };
 
-HRESULT ConvertUtf8(__in LPCUTF8 utf8,
+HRESULT ConvertUtf8(_In_ LPCUTF8 utf8,
                     ULONG32 bufLen,
                     ULONG32* nameLen,
                     __out_ecount_part_opt(bufLen, *nameLen) PWSTR buffer);
@@ -247,7 +247,7 @@ enum SplitSyntax
     SPLIT_NO_NAME,
 };
 
-HRESULT SplitFullName(__in_z __in PCWSTR fullName,
+HRESULT SplitFullName(__in_z _In_ PCWSTR fullName,
                       SplitSyntax syntax,
                       ULONG32 memberDots,
                       __deref_out_opt LPUTF8* namespaceName,
@@ -255,7 +255,7 @@ HRESULT SplitFullName(__in_z __in PCWSTR fullName,
                       __deref_out_opt LPUTF8* memberName,
                       __deref_out_opt LPUTF8* params);
 
-int CompareUtf8(__in LPCUTF8 str1, __in LPCUTF8 str2, __in ULONG32 nameFlags);
+int CompareUtf8(_In_ LPCUTF8 str1, _In_ LPCUTF8 str2, _In_ ULONG32 nameFlags);
 
 #define INH_STATIC \
     (CLRDATA_VALUE_ALL_KINDS | \
index 23003b9..801e334 100644 (file)
@@ -928,7 +928,7 @@ HRESULT CorpubProcess::GetDisplayName(ULONG32 cchName,
 // CorpubAppDomain
 // ******************************************
 
-CorpubAppDomain::CorpubAppDomain (__in LPWSTR szAppDomainName, ULONG Id)
+CorpubAppDomain::CorpubAppDomain (_In_ LPWSTR szAppDomainName, ULONG Id)
     : CordbCommonBase (0, enumCorpubAppDomain),
     m_pNext (NULL),
     m_szAppDomainName (szAppDomainName),
index a34dd0e..5a89337 100644 (file)
@@ -10838,7 +10838,7 @@ private:
 class CorpubAppDomain  : public CordbCommonBase, public ICorPublishAppDomain
 {
 public:
-    CorpubAppDomain (__in LPWSTR szAppDomainName, ULONG Id);
+    CorpubAppDomain (_In_ LPWSTR szAppDomainName, ULONG Id);
     virtual ~CorpubAppDomain();
 
 #ifdef _DEBUG
index ba5f077..4e8f029 100644 (file)
@@ -659,7 +659,7 @@ HRESULT ShimProxyCallback::DebuggerError(ICorDebugProcess * pProcess, HRESULT er
 
 
 // Implementation of ICorDebugManagedCallback::LogMessage
-HRESULT ShimProxyCallback::LogMessage(ICorDebugAppDomain * pAppDomain, ICorDebugThread * pThread, LONG lLevel, __in LPWSTR pLogSwitchName, __in LPWSTR pMessage)
+HRESULT ShimProxyCallback::LogMessage(ICorDebugAppDomain * pAppDomain, ICorDebugThread * pThread, LONG lLevel, _In_ LPWSTR pLogSwitchName, _In_ LPWSTR pMessage)
 {
     m_pShim->PreDispatchEvent();
     class LogMessageEvent  : public ManagedEvent
@@ -695,7 +695,7 @@ HRESULT ShimProxyCallback::LogMessage(ICorDebugAppDomain * pAppDomain, ICorDebug
 
 
 // Implementation of ICorDebugManagedCallback::LogSwitch
-HRESULT ShimProxyCallback::LogSwitch(ICorDebugAppDomain * pAppDomain, ICorDebugThread * pThread, LONG lLevel, ULONG ulReason, __in LPWSTR pLogSwitchName, __in LPWSTR pParentName)
+HRESULT ShimProxyCallback::LogSwitch(ICorDebugAppDomain * pAppDomain, ICorDebugThread * pThread, LONG lLevel, ULONG ulReason, _In_ LPWSTR pLogSwitchName, _In_ LPWSTR pParentName)
 {
     m_pShim->PreDispatchEvent();
     class LogSwitchEvent  : public ManagedEvent
@@ -1060,7 +1060,7 @@ HRESULT ShimProxyCallback::FunctionRemapOpportunity(ICorDebugAppDomain * pAppDom
 
 
 // Implementation of ICorDebugManagedCallback2::CreateConnection
-HRESULT ShimProxyCallback::CreateConnection(ICorDebugProcess * pProcess, CONNID dwConnectionId, __in LPWSTR pConnectionName)
+HRESULT ShimProxyCallback::CreateConnection(ICorDebugProcess * pProcess, CONNID dwConnectionId, _In_ LPWSTR pConnectionName)
 {
     m_pShim->PreDispatchEvent();
     class CreateConnectionEvent  : public ManagedEvent
index 89a0c0d..5636522 100644 (file)
@@ -128,15 +128,15 @@ public:
     COM_METHOD LogMessage( ICorDebugAppDomain *pAppDomain,
         ICorDebugThread *pThread,
         LONG lLevel,
-        __in LPWSTR pLogSwitchName,
-        __in LPWSTR pMessage);
+        _In_ LPWSTR pLogSwitchName,
+        _In_ LPWSTR pMessage);
 
     COM_METHOD LogSwitch( ICorDebugAppDomain *pAppDomain,
         ICorDebugThread *pThread,
         LONG lLevel,
         ULONG ulReason,
-        __in LPWSTR pLogSwitchName,
-        __in LPWSTR pParentName);
+        _In_ LPWSTR pLogSwitchName,
+        _In_ LPWSTR pParentName);
 
     COM_METHOD CreateAppDomain(ICorDebugProcess *pProcess,
         ICorDebugAppDomain *pAppDomain);
@@ -178,7 +178,7 @@ public:
         ICorDebugFunction *pNewFunction,
         ULONG32 oldILOffset);
 
-    COM_METHOD CreateConnection(ICorDebugProcess *pProcess, CONNID dwConnectionId, __in LPWSTR pConnName);
+    COM_METHOD CreateConnection(ICorDebugProcess *pProcess, CONNID dwConnectionId, _In_ LPWSTR pConnName);
 
     COM_METHOD ChangeConnection(ICorDebugProcess *pProcess, CONNID dwConnectionId );
 
index ac1e2d7..0372a35 100644 (file)
@@ -79,12 +79,12 @@ Notes:
 DLLEXPORT
 HRESULT
 CreateProcessForLaunch(
-    __in LPWSTR lpCommandLine,
-    __in BOOL bSuspendProcess,
-    __in LPVOID lpEnvironment,
-    __in LPCWSTR lpCurrentDirectory,
-    __out PDWORD pProcessId,
-    __out HANDLE *pResumeHandle)
+    _In_ LPWSTR lpCommandLine,
+    _In_ BOOL bSuspendProcess,
+    _In_ LPVOID lpEnvironment,
+    _In_ LPCWSTR lpCurrentDirectory,
+    _Out_ PDWORD pProcessId,
+    _Out_ HANDLE *pResumeHandle)
 {
     PUBLIC_CONTRACT;
 
@@ -140,7 +140,7 @@ CreateProcessForLaunch(
 DLLEXPORT
 HRESULT
 ResumeProcess(
-    __in HANDLE hResumeHandle)
+    _In_ HANDLE hResumeHandle)
 {
     PUBLIC_CONTRACT;
     if (ResumeThread(hResumeHandle) == (DWORD)-1)
@@ -159,7 +159,7 @@ ResumeProcess(
 DLLEXPORT
 HRESULT
 CloseResumeHandle(
-    __in HANDLE hResumeHandle)
+    _In_ HANDLE hResumeHandle)
 {
     PUBLIC_CONTRACT;
     if (!CloseHandle(hResumeHandle))
@@ -190,7 +190,7 @@ HRESULT
 GetContinueStartupEvent(
     DWORD debuggeePID,
     LPCWSTR szTelestoFullPath,
-    __out HANDLE *phContinueStartupEvent);
+    _Out_ HANDLE *phContinueStartupEvent);
 
 #endif // TARGET_UNIX
 
@@ -697,10 +697,10 @@ StartupHelperThread(LPVOID p)
 DLLEXPORT
 HRESULT
 RegisterForRuntimeStartup(
-    __in DWORD dwProcessId,
-    __in PSTARTUP_CALLBACK pfnCallback,
-    __in PVOID parameter,
-    __out PVOID *ppUnregisterToken)
+    _In_ DWORD dwProcessId,
+    _In_ PSTARTUP_CALLBACK pfnCallback,
+    _In_ PVOID parameter,
+    _Out_ PVOID *ppUnregisterToken)
 {
     return RegisterForRuntimeStartupEx(dwProcessId, NULL, pfnCallback, parameter, ppUnregisterToken);
 }
@@ -738,11 +738,11 @@ RegisterForRuntimeStartup(
 DLLEXPORT
 HRESULT
 RegisterForRuntimeStartupEx(
-    __in DWORD dwProcessId,
-    __in LPCWSTR lpApplicationGroupId,
-    __in PSTARTUP_CALLBACK pfnCallback,
-    __in PVOID parameter,
-    __out PVOID *ppUnregisterToken)
+    _In_ DWORD dwProcessId,
+    _In_ LPCWSTR lpApplicationGroupId,
+    _In_ PSTARTUP_CALLBACK pfnCallback,
+    _In_ PVOID parameter,
+    _Out_ PVOID *ppUnregisterToken)
 {
     PUBLIC_CONTRACT;
 
@@ -787,7 +787,7 @@ RegisterForRuntimeStartupEx(
 DLLEXPORT
 HRESULT
 UnregisterForRuntimeStartup(
-    __in PVOID pUnregisterToken)
+    _In_ PVOID pUnregisterToken)
 {
     PUBLIC_CONTRACT;
 
@@ -824,8 +824,8 @@ const int cchEventNameBufferSize = (sizeof(StartupNotifyEventNamePrefix) + sizeo
 DLLEXPORT
 HRESULT
 GetStartupNotificationEvent(
-    __in DWORD debuggeePID,
-    __out HANDLE* phStartupEvent)
+    _In_ DWORD debuggeePID,
+    _Out_ HANDLE* phStartupEvent)
 {
     PUBLIC_CONTRACT;
 
@@ -1220,9 +1220,9 @@ DLLEXPORT
 HRESULT
 EnumerateCLRs(
     DWORD debuggeePID,
-    __out HANDLE** ppHandleArrayOut,
-    __out LPWSTR** ppStringArrayOut,
-    __out DWORD* pdwArrayLengthOut)
+    _Out_ HANDLE** ppHandleArrayOut,
+    _Out_ LPWSTR** ppStringArrayOut,
+    _Out_ DWORD* pdwArrayLengthOut)
 {
     PUBLIC_CONTRACT;
 
@@ -1357,9 +1357,9 @@ EnumerateCLRs(
 DLLEXPORT
 HRESULT
 CloseCLREnumeration(
-    __in HANDLE* pHandleArray,
-    __in LPWSTR* pStringArray,
-    __in DWORD dwArrayLength)
+    _In_ HANDLE* pHandleArray,
+    _In_ LPWSTR* pStringArray,
+    _In_ DWORD dwArrayLength)
 {
     PUBLIC_CONTRACT;
 
@@ -1484,11 +1484,11 @@ const WCHAR *c_versionStrFormat = W("%08x;%08x;%p");
 DLLEXPORT
 HRESULT
 CreateVersionStringFromModule(
-    __in DWORD pidDebuggee,
-    __in LPCWSTR szModuleName,
+    _In_ DWORD pidDebuggee,
+    _In_ LPCWSTR szModuleName,
     __out_ecount_part(cchBuffer, *pdwLength) LPWSTR pBuffer,
-    __in DWORD cchBuffer,
-    __out DWORD* pdwLength)
+    _In_ DWORD cchBuffer,
+    _Out_ DWORD* pdwLength)
 {
     PUBLIC_CONTRACT;
 
@@ -1719,9 +1719,9 @@ CheckDbiAndRuntimeVersion(
 DLLEXPORT
 HRESULT
 CreateDebuggingInterfaceFromVersionEx(
-    __in int iDebuggerVersion,
-    __in LPCWSTR szDebuggeeVersion,
-    __out IUnknown ** ppCordb)
+    _In_ int iDebuggerVersion,
+    _In_ LPCWSTR szDebuggeeVersion,
+    _Out_ IUnknown ** ppCordb)
 {
     return CreateDebuggingInterfaceFromVersion2(iDebuggerVersion, szDebuggeeVersion, NULL, ppCordb);
 }
@@ -1748,10 +1748,10 @@ CreateDebuggingInterfaceFromVersionEx(
 DLLEXPORT
 HRESULT
 CreateDebuggingInterfaceFromVersion2(
-    __in int iDebuggerVersion,
-    __in LPCWSTR szDebuggeeVersion,
-    __in LPCWSTR szApplicationGroupId,
-    __out IUnknown ** ppCordb)
+    _In_ int iDebuggerVersion,
+    _In_ LPCWSTR szDebuggeeVersion,
+    _In_ LPCWSTR szApplicationGroupId,
+    _Out_ IUnknown ** ppCordb)
 {
     PUBLIC_CONTRACT;
 
@@ -1880,8 +1880,8 @@ Exit:
 DLLEXPORT
 HRESULT
 CreateDebuggingInterfaceFromVersion(
-    __in LPCWSTR szDebuggeeVersion,
-    __out IUnknown ** ppCordb
+    _In_ LPCWSTR szDebuggeeVersion,
+    _Out_ IUnknown ** ppCordb
 )
 {
     PUBLIC_CONTRACT;
@@ -1907,7 +1907,7 @@ HRESULT
 GetContinueStartupEvent(
     DWORD debuggeePID,
     LPCWSTR szTelestoFullPath,
-    __out HANDLE* phContinueStartupEvent)
+    _Out_ HANDLE* phContinueStartupEvent)
 {
     if ((phContinueStartupEvent == NULL) || (szTelestoFullPath == NULL))
         return E_INVALIDARG;
index 392cd7b..5684166 100644 (file)
@@ -11,81 +11,81 @@ typedef VOID (*PSTARTUP_CALLBACK)(IUnknown *pCordb, PVOID parameter, HRESULT hr)
 
 EXTERN_C HRESULT
 CreateProcessForLaunch(
-    __in LPWSTR lpCommandLine,
-    __in BOOL bSuspendProcess,
-    __in LPVOID lpEnvironment,
-    __in LPCWSTR lpCurrentDirectory,
-    __out PDWORD pProcessId,
-    __out HANDLE *pResumeHandle);
+    _In_ LPWSTR lpCommandLine,
+    _In_ BOOL bSuspendProcess,
+    _In_ LPVOID lpEnvironment,
+    _In_ LPCWSTR lpCurrentDirectory,
+    _Out_ PDWORD pProcessId,
+    _Out_ HANDLE *pResumeHandle);
 
 EXTERN_C HRESULT
 ResumeProcess(
-    __in HANDLE hResumeHandle);
+    _In_ HANDLE hResumeHandle);
 
 EXTERN_C HRESULT
 CloseResumeHandle(
-    __in HANDLE hResumeHandle);
+    _In_ HANDLE hResumeHandle);
 
 EXTERN_C HRESULT
 RegisterForRuntimeStartup(
-    __in DWORD dwProcessId,
-    __in PSTARTUP_CALLBACK pfnCallback,
-    __in PVOID parameter,
-    __out PVOID *ppUnregisterToken);
+    _In_ DWORD dwProcessId,
+    _In_ PSTARTUP_CALLBACK pfnCallback,
+    _In_ PVOID parameter,
+    _Out_ PVOID *ppUnregisterToken);
 
 EXTERN_C HRESULT
 RegisterForRuntimeStartupEx(
-    __in DWORD dwProcessId,
-    __in LPCWSTR szApplicationGroupId,
-    __in PSTARTUP_CALLBACK pfnCallback,
-    __in PVOID parameter,
-    __out PVOID *ppUnregisterToken);
+    _In_ DWORD dwProcessId,
+    _In_ LPCWSTR szApplicationGroupId,
+    _In_ PSTARTUP_CALLBACK pfnCallback,
+    _In_ PVOID parameter,
+    _Out_ PVOID *ppUnregisterToken);
 
 EXTERN_C HRESULT
 UnregisterForRuntimeStartup(
-    __in PVOID pUnregisterToken);
+    _In_ PVOID pUnregisterToken);
 
 EXTERN_C HRESULT
 GetStartupNotificationEvent(
-    __in DWORD debuggeePID,
-    __out HANDLE* phStartupEvent);
+    _In_ DWORD debuggeePID,
+    _Out_ HANDLE* phStartupEvent);
 
 EXTERN_C HRESULT
 EnumerateCLRs(DWORD debuggeePID,
-    __out HANDLE** ppHandleArrayOut,
-    __out LPWSTR** ppStringArrayOut,
-    __out DWORD* pdwArrayLengthOut);
+    _Out_ HANDLE** ppHandleArrayOut,
+    _Out_ LPWSTR** ppStringArrayOut,
+    _Out_ DWORD* pdwArrayLengthOut);
 
 EXTERN_C HRESULT
 CloseCLREnumeration(
-    __in HANDLE* pHandleArray,
-    __in LPWSTR* pStringArray,
-    __in DWORD dwArrayLength);
+    _In_ HANDLE* pHandleArray,
+    _In_ LPWSTR* pStringArray,
+    _In_ DWORD dwArrayLength);
 
 EXTERN_C HRESULT
 CreateVersionStringFromModule(
-    __in DWORD pidDebuggee,
-    __in LPCWSTR szModuleName,
+    _In_ DWORD pidDebuggee,
+    _In_ LPCWSTR szModuleName,
     __out_ecount_part(cchBuffer, *pdwLength) LPWSTR pBuffer,
-    __in DWORD cchBuffer,
-    __out DWORD* pdwLength);
+    _In_ DWORD cchBuffer,
+    _Out_ DWORD* pdwLength);
 
 EXTERN_C HRESULT
 CreateDebuggingInterfaceFromVersionEx(
-    __in int iDebuggerVersion,
-    __in LPCWSTR szDebuggeeVersion,
-    __out IUnknown ** ppCordb);
+    _In_ int iDebuggerVersion,
+    _In_ LPCWSTR szDebuggeeVersion,
+    _Out_ IUnknown ** ppCordb);
 
 EXTERN_C
 DLLEXPORT
 HRESULT
 CreateDebuggingInterfaceFromVersion2(
-    __in int iDebuggerVersion,
-    __in LPCWSTR szDebuggeeVersion,
-    __in LPCWSTR szApplicationGroupId,
-    __out IUnknown ** ppCordb);
+    _In_ int iDebuggerVersion,
+    _In_ LPCWSTR szDebuggeeVersion,
+    _In_ LPCWSTR szApplicationGroupId,
+    _Out_ IUnknown ** ppCordb);
 
 EXTERN_C HRESULT
 CreateDebuggingInterfaceFromVersion(
-    __in LPCWSTR szDebuggeeVersion,
-    __out IUnknown ** ppCordb);
+    _In_ LPCWSTR szDebuggeeVersion,
+    _Out_ IUnknown ** ppCordb);
index 4e2d879..54b2b66 100644 (file)
@@ -252,7 +252,7 @@ HRESULT GetInternalSystemDirectory(__out_ecount_part_opt(*pdwLength,*pdwLength)
 }
 
 
-LPCWSTR GetInternalSystemDirectory(__out DWORD* pdwLength)
+LPCWSTR GetInternalSystemDirectory(_Out_ DWORD* pdwLength)
 {
     LIMITED_METHOD_CONTRACT;
 
index 6a0ba5a..623f008 100644 (file)
@@ -487,7 +487,7 @@ ErrExit:
     return hr;
 } // HRESULT CeeFileGenWriter::generateImage()
 
-HRESULT CeeFileGenWriter::setOutputFileName(__in LPWSTR fileName)
+HRESULT CeeFileGenWriter::setOutputFileName(_In_ LPWSTR fileName)
 {
     if (m_outputFileName)
         delete[] m_outputFileName;
@@ -498,7 +498,7 @@ HRESULT CeeFileGenWriter::setOutputFileName(__in LPWSTR fileName)
     return S_OK;
 } // HRESULT CeeFileGenWriter::setOutputFileName()
 
-HRESULT CeeFileGenWriter::setResourceFileName(__in LPWSTR fileName)
+HRESULT CeeFileGenWriter::setResourceFileName(_In_ LPWSTR fileName)
 {
     if (m_resourceFileName)
         delete[] m_resourceFileName;
@@ -1294,7 +1294,7 @@ HRESULT CeeFileGenWriter::setVTableEntry(ULONG size, ULONG offset)
     return setVTableEntry64(size,(void*)(ULONG_PTR)offset);
 } // HRESULT CeeFileGenWriter::setVTableEntry()
 
-HRESULT CeeFileGenWriter::computeSectionOffset(CeeSection &section, __in char *ptr,
+HRESULT CeeFileGenWriter::computeSectionOffset(CeeSection &section, _In_ char *ptr,
                                                unsigned *offset)
 {
     *offset = section.computeOffset(ptr);
@@ -1302,7 +1302,7 @@ HRESULT CeeFileGenWriter::computeSectionOffset(CeeSection &section, __in char *p
     return S_OK;
 } // HRESULT CeeFileGenWriter::computeSectionOffset()
 
-HRESULT CeeFileGenWriter::computeOffset(__in char *ptr,
+HRESULT CeeFileGenWriter::computeOffset(_In_ char *ptr,
                                         CeeSection **pSection, unsigned *offset)
 {
     TESTANDRETURNPOINTER(pSection);
index 6714d35..6c40d96 100644 (file)
@@ -183,7 +183,7 @@ HRESULT ICeeFileGen::AddSectionReloc (HCEESECTION section, ULONG offset, HCEESEC
     }
 }
 
-HRESULT ICeeFileGen::SetOutputFileName (HCEEFILE ceeFile, __in LPWSTR outputFileName)
+HRESULT ICeeFileGen::SetOutputFileName (HCEEFILE ceeFile, _In_ LPWSTR outputFileName)
 {
     TESTANDRETURNPOINTER(ceeFile);
     TESTANDRETURNPOINTER(outputFileName);
@@ -192,7 +192,7 @@ HRESULT ICeeFileGen::SetOutputFileName (HCEEFILE ceeFile, __in LPWSTR outputFile
     return(gen->setOutputFileName(outputFileName));
 }
 
-__success(return == S_OK) HRESULT ICeeFileGen::GetOutputFileName (HCEEFILE ceeFile, __out LPWSTR *outputFileName)
+__success(return == S_OK) HRESULT ICeeFileGen::GetOutputFileName (HCEEFILE ceeFile, _Out_ LPWSTR *outputFileName)
 {
     TESTANDRETURNPOINTER(ceeFile);
     TESTANDRETURNPOINTER(outputFileName);
@@ -204,7 +204,7 @@ __success(return == S_OK) HRESULT ICeeFileGen::GetOutputFileName (HCEEFILE ceeFi
 }
 
 
-HRESULT ICeeFileGen::SetResourceFileName (HCEEFILE ceeFile, __in LPWSTR resourceFileName)
+HRESULT ICeeFileGen::SetResourceFileName (HCEEFILE ceeFile, _In_ LPWSTR resourceFileName)
 {
     TESTANDRETURNPOINTER(ceeFile);
     TESTANDRETURNPOINTER(resourceFileName);
@@ -214,7 +214,7 @@ HRESULT ICeeFileGen::SetResourceFileName (HCEEFILE ceeFile, __in LPWSTR resource
 }
 
 __success(return == S_OK)
-HRESULT ICeeFileGen::GetResourceFileName (HCEEFILE ceeFile, __out LPWSTR *resourceFileName)
+HRESULT ICeeFileGen::GetResourceFileName (HCEEFILE ceeFile, _Out_ LPWSTR *resourceFileName)
 {
     TESTANDRETURNPOINTER(ceeFile);
     TESTANDRETURNPOINTER(resourceFileName);
@@ -277,7 +277,7 @@ HRESULT ICeeFileGen::GetMethodRVA(HCEEFILE ceeFile, ULONG codeOffset, ULONG *cod
     return S_OK;
 }
 
-HRESULT ICeeFileGen::EmitString(HCEEFILE ceeFile, __in LPWSTR strValue, ULONG *strRef)
+HRESULT ICeeFileGen::EmitString(HCEEFILE ceeFile, _In_ LPWSTR strValue, ULONG *strRef)
 {
     TESTANDRETURNPOINTER(ceeFile);
 
@@ -429,7 +429,7 @@ HRESULT ICeeFileGen::SetStrongNameEntry(HCEEFILE ceeFile, ULONG size, ULONG offs
     return gen->setStrongNameEntry(size, offset);
 }
 
-HRESULT ICeeFileGen::ComputeSectionOffset(HCEESECTION section, __in char *ptr,
+HRESULT ICeeFileGen::ComputeSectionOffset(HCEESECTION section, _In_ char *ptr,
                                                                                  unsigned *offset)
 {
     TESTANDRETURNPOINTER(section);
@@ -443,7 +443,7 @@ HRESULT ICeeFileGen::ComputeSectionOffset(HCEESECTION section, __in char *ptr,
 
 __success(return == S_OK)
 HRESULT ICeeFileGen::ComputeSectionPointer(HCEESECTION section, ULONG offset,
-                                                                                 __out char **ptr)
+                                                                                 _Out_ char **ptr)
 {
     TESTANDRETURNPOINTER(section);
 
@@ -454,7 +454,7 @@ HRESULT ICeeFileGen::ComputeSectionPointer(HCEESECTION section, ULONG offset,
        return S_OK;
 }
 
-HRESULT ICeeFileGen::ComputeOffset(HCEEFILE ceeFile, __in char *ptr,
+HRESULT ICeeFileGen::ComputeOffset(HCEEFILE ceeFile, _In_ char *ptr,
                                                                   HCEESECTION *pSection, unsigned *offset)
 {
     TESTANDRETURNPOINTER(pSection);
index 9add4b5..b78b00c 100644 (file)
@@ -1829,7 +1829,7 @@ HRESULT PEWriter::fixup(CeeGenTokenMapper *pMapper)
     return(S_OK);   // SUCCESS
 }
 
-HRESULT PEWriter::Open(__in LPCWSTR fileName)
+HRESULT PEWriter::Open(_In_ LPCWSTR fileName)
 {
     _ASSERTE(m_file == INVALID_HANDLE_VALUE);
     HRESULT hr = NOERROR;
@@ -1913,7 +1913,7 @@ HRESULT PEWriter::Close()
 }
 
 /******************************************************************/
-HRESULT PEWriter::write(__in LPCWSTR fileName) {
+HRESULT PEWriter::write(_In_ LPCWSTR fileName) {
 
     HRESULT hr;
 
index 21817b1..84ec61f 100644 (file)
@@ -41,7 +41,7 @@ public:
 
     HRESULT link();
     HRESULT fixup(CeeGenTokenMapper *pMapper);
-    HRESULT write(__in LPCWSTR fileName);
+    HRESULT write(_In_ LPCWSTR fileName);
     HRESULT write(void **ppImage);
 
     // calling these functions is optional
@@ -174,7 +174,7 @@ private:
     HRESULT linkPlaceSections(entry * entries, unsigned iEntries);
     void setSectionIndex(IMAGE_SECTION_HEADER * h, unsigned sectionIndex);
 
-    HRESULT Open(__in LPCWSTR fileName);
+    HRESULT Open(_In_ LPCWSTR fileName);
     HRESULT Write(const void *data, int size);
     HRESULT Seek(int offset);
     HRESULT Pad(int align);
@@ -257,8 +257,8 @@ public:
     int getDirEntry() { _ASSERTE(!"PESeedSection"); return 0; }
     HRESULT directoryEntry(unsigned num) { _ASSERTE(!"PESeedSection"); return E_FAIL; }
     char * computePointer(unsigned offset) const { _ASSERTE(!"PESeedSection"); return NULL; }
-    BOOL containsPointer(__in char *ptr) const { _ASSERTE(!"PESeedSection"); return FALSE; }
-    unsigned computeOffset(__in char *ptr) const { _ASSERTE(!"PESeedSection"); return 0; }
+    BOOL containsPointer(_In_ char *ptr) const { _ASSERTE(!"PESeedSection"); return FALSE; }
+    unsigned computeOffset(_In_ char *ptr) const { _ASSERTE(!"PESeedSection"); return 0; }
     HRESULT cloneInstance(PESection *destination) { _ASSERTE(!"PESeedSection"); return E_FAIL; }
 
     // PEWriterSection
index 7b5fd47..2d76b20 100644 (file)
@@ -49,7 +49,7 @@ BinStr* BinStrToUnicode(BinStr* pSource, bool Swap)
     return NULL;
 }
 
-AsmManFile*         AsmMan::GetFileByName(__in __nullterminated char* szFileName)
+AsmManFile*         AsmMan::GetFileByName(_In_ __nullterminated char* szFileName)
 {
     AsmManFile* ret = NULL;
     if(szFileName)
@@ -63,7 +63,7 @@ AsmManFile*         AsmMan::GetFileByName(__in __nullterminated char* szFileName
     return ret;
 }
 
-mdToken             AsmMan::GetFileTokByName(__in __nullterminated char* szFileName)
+mdToken             AsmMan::GetFileTokByName(_In_ __nullterminated char* szFileName)
 {
     AsmManFile* tmp = GetFileByName(szFileName);
     return(tmp ? tmp->tkTok : mdFileNil);
@@ -109,7 +109,7 @@ mdToken             AsmMan::GetComTypeTokByName(
     return(tmp ? tmp->tkTok : mdExportedTypeNil);
 }
 
-AsmManAssembly*     AsmMan::GetAsmRefByName(__in __nullterminated const char* szAsmRefName)
+AsmManAssembly*     AsmMan::GetAsmRefByName(_In_ __nullterminated const char* szAsmRefName)
 {
     AsmManAssembly* ret = NULL;
     if(szAsmRefName)
@@ -124,12 +124,12 @@ AsmManAssembly*     AsmMan::GetAsmRefByName(__in __nullterminated const char* sz
     }
     return ret;
 }
-mdToken             AsmMan::GetAsmRefTokByName(__in __nullterminated const char* szAsmRefName)
+mdToken             AsmMan::GetAsmRefTokByName(_In_ __nullterminated const char* szAsmRefName)
 {
     AsmManAssembly* tmp = GetAsmRefByName(szAsmRefName);
     return(tmp ? tmp->tkTok : mdAssemblyRefNil);
 }
-AsmManAssembly*     AsmMan::GetAsmRefByAsmName(__in __nullterminated const char* szAsmName)
+AsmManAssembly*     AsmMan::GetAsmRefByAsmName(_In_ __nullterminated const char* szAsmName)
 {
     AsmManAssembly* ret = NULL;
     if(szAsmName)
@@ -160,7 +160,7 @@ void    AsmMan::SetModuleName(__inout_opt __nullterminated char* szName)
 }
 //==============================================================================================================
 
-void    AsmMan::AddFile(__in __nullterminated char* szName, DWORD dwAttr, BinStr* pHashBlob)
+void    AsmMan::AddFile(_In_ __nullterminated char* szName, DWORD dwAttr, BinStr* pHashBlob)
 {
     AsmManFile* tmp = GetFileByName(szName);
     Assembler* pAsm = (Assembler*)m_pAssembler;
@@ -244,7 +244,7 @@ void    AsmMan::EmitFiles()
     } //end for(i = 0; tmp=m_FileLst.PEEK(i); i++)
 }
 
-void    AsmMan::StartAssembly(__in __nullterminated char* szName, __in_opt __nullterminated char* szAlias, DWORD dwAttr, BOOL isRef)
+void    AsmMan::StartAssembly(_In_ __nullterminated char* szName, __in_opt __nullterminated char* szAlias, DWORD dwAttr, BOOL isRef)
 {
     if(!isRef && (0==strcmp(szName, "mscorlib"))) ((Assembler*)m_pAssembler)->m_fIsMscorlib = TRUE;
     if(!isRef && (m_pAssembly != NULL))
@@ -674,7 +674,7 @@ void    AsmMan::SetAssemblyAutodetect()
     }
 }
 
-void    AsmMan::StartComType(__in __nullterminated char* szName, DWORD dwAttr)
+void    AsmMan::StartComType(_In_ __nullterminated char* szName, DWORD dwAttr)
 {
     if((m_pCurComType = new AsmManComType))
     {
@@ -732,7 +732,7 @@ void    AsmMan::EndComType()
     }
 }
 
-void    AsmMan::SetComTypeFile(__in __nullterminated char* szFileName)
+void    AsmMan::SetComTypeFile(_In_ __nullterminated char* szFileName)
 {
     if(m_pCurComType)
     {
@@ -740,7 +740,7 @@ void    AsmMan::SetComTypeFile(__in __nullterminated char* szFileName)
     }
 }
 
-void    AsmMan::SetComTypeAsmRef(__in __nullterminated char* szAsmRefName)
+void    AsmMan::SetComTypeAsmRef(_In_ __nullterminated char* szAsmRefName)
 {
     if(m_pCurComType)
     {
@@ -748,7 +748,7 @@ void    AsmMan::SetComTypeAsmRef(__in __nullterminated char* szAsmRefName)
     }
 }
 
-void    AsmMan::SetComTypeComType(__in __nullterminated char* szComTypeName)
+void    AsmMan::SetComTypeComType(_In_ __nullterminated char* szComTypeName)
 {
     if(m_pCurComType)
     {
@@ -780,7 +780,7 @@ BOOL    AsmMan::SetComTypeClassTok(mdToken tkClass)
     return FALSE;
 }
 
-void    AsmMan::StartManifestRes(__in __nullterminated char* szName, __in __nullterminated char* szAlias, DWORD dwAttr)
+void    AsmMan::StartManifestRes(_In_ __nullterminated char* szName, _In_ __nullterminated char* szAlias, DWORD dwAttr)
 {
     if((m_pCurManRes = new AsmManRes))
     {
@@ -808,7 +808,7 @@ void    AsmMan::EndManifestRes()
 }
 
 
-void    AsmMan::SetManifestResFile(__in __nullterminated char* szFileName, ULONG ulOffset)
+void    AsmMan::SetManifestResFile(_In_ __nullterminated char* szFileName, ULONG ulOffset)
 {
     if(m_pCurManRes)
     {
@@ -817,7 +817,7 @@ void    AsmMan::SetManifestResFile(__in __nullterminated char* szFileName, ULONG
     }
 }
 
-void    AsmMan::SetManifestResAsmRef(__in __nullterminated char* szAsmRefName)
+void    AsmMan::SetManifestResAsmRef(_In_ __nullterminated char* szAsmRefName)
 {
     if(m_pCurManRes)
     {
index 1290c9b..4663a88 100644 (file)
@@ -193,8 +193,8 @@ class AsmMan
     ErrorReporter*      report;
     void*               m_pAssembler;
 
-    AsmManFile*         GetFileByName(__in __nullterminated char* szFileName);
-    AsmManAssembly*     GetAsmRefByName(__in __nullterminated const char* szAsmRefName);
+    AsmManFile*         GetFileByName(_In_ __nullterminated char* szFileName);
+    AsmManAssembly*     GetAsmRefByName(_In_ __nullterminated const char* szAsmRefName);
     AsmManComType*      GetComTypeByName(__in_opt __nullterminated char* szComTypeName,
                                          __in_opt __nullterminated char* szComEnclosingTypeName = NULL);
     mdToken             GetComTypeTokByName(__in_opt __nullterminated char* szComTypeName,
@@ -241,11 +241,11 @@ public:
 
     void    SetModuleName(__inout_opt __nullterminated char* szName);
 
-    void    AddFile(__in __nullterminated char* szName, DWORD dwAttr, BinStr* pHashBlob);
+    void    AddFile(_In_ __nullterminated char* szName, DWORD dwAttr, BinStr* pHashBlob);
     void    EmitFiles();
        void    EmitDebuggableAttribute(mdToken tkOwner);
 
-       void    StartAssembly(__in __nullterminated char* szName, __in_opt __nullterminated char* szAlias, DWORD dwAttr, BOOL isRef);
+       void    StartAssembly(_In_ __nullterminated char* szName, __in_opt __nullterminated char* szAlias, DWORD dwAttr, BOOL isRef);
        void    EndAssembly();
     void    EmitAssemblyRefs();
     void    EmitAssembly();
@@ -257,27 +257,27 @@ public:
        void    SetAssemblyHashBlob(BinStr* pHashBlob);
     void    SetAssemblyAutodetect();
 
-    void    StartComType(__in __nullterminated char* szName, DWORD dwAttr);
+    void    StartComType(_In_ __nullterminated char* szName, DWORD dwAttr);
     void    EndComType();
-    void    SetComTypeFile(__in __nullterminated char* szFileName);
-    void    SetComTypeAsmRef(__in __nullterminated char* szAsmRefName);
-    void    SetComTypeComType(__in __nullterminated char* szComTypeName);
+    void    SetComTypeFile(_In_ __nullterminated char* szFileName);
+    void    SetComTypeAsmRef(_In_ __nullterminated char* szAsmRefName);
+    void    SetComTypeComType(_In_ __nullterminated char* szComTypeName);
     BOOL    SetComTypeImplementationTok(mdToken tk);
     BOOL    SetComTypeClassTok(mdToken tkClass);
 
-    void    StartManifestRes(__in __nullterminated char* szName, __in __nullterminated char* szAlias, DWORD dwAttr);
+    void    StartManifestRes(_In_ __nullterminated char* szName, _In_ __nullterminated char* szAlias, DWORD dwAttr);
     void    EndManifestRes();
-    void    SetManifestResFile(__in __nullterminated char* szFileName, ULONG ulOffset);
-    void    SetManifestResAsmRef(__in __nullterminated char* szAsmRefName);
+    void    SetManifestResFile(_In_ __nullterminated char* szFileName, ULONG ulOffset);
+    void    SetManifestResAsmRef(_In_ __nullterminated char* szAsmRefName);
 
-    AsmManAssembly*     GetAsmRefByAsmName(__in __nullterminated const char* szAsmName);
+    AsmManAssembly*     GetAsmRefByAsmName(_In_ __nullterminated const char* szAsmName);
 
-    mdToken             GetFileTokByName(__in __nullterminated char* szFileName);
-    mdToken             GetAsmRefTokByName(__in __nullterminated const char* szAsmRefName);
-    mdToken             GetAsmTokByName(__in __nullterminated const char* szAsmName)
+    mdToken             GetFileTokByName(_In_ __nullterminated char* szFileName);
+    mdToken             GetAsmRefTokByName(_In_ __nullterminated const char* szAsmRefName);
+    mdToken             GetAsmTokByName(_In_ __nullterminated const char* szAsmName)
         { return (m_pAssembly && (strcmp(m_pAssembly->szName,szAsmName)==0)) ? m_pAssembly->tkTok : 0; };
 
-    mdToken GetModuleRefTokByName(__in __nullterminated char* szName)
+    mdToken GetModuleRefTokByName(_In_ __nullterminated char* szName)
     {
         if(szName && *szName)
         {
index ef377b5..6299719 100644 (file)
@@ -20,7 +20,7 @@ public:
 
     virtual ~ReadStream() = default;
 
-    virtual unsigned getAll(__out char** ppch) = 0;
+    virtual unsigned getAll(_Out_ char** ppch) = 0;
 
     // read at most 'buffLen' bytes into 'buff', Return the
         // number of characters read.  On EOF return 0
@@ -49,7 +49,7 @@ public:
         //if(m_pBS)
         //    delete m_pBS;
     };
-    unsigned getAll(__out char **ppbuff)
+    unsigned getAll(_Out_ char **ppbuff)
     {
         *ppbuff = m_pStart;
         return m_pBS->length();
@@ -95,7 +95,7 @@ private:
 /**************************************************************************/
 class MappedFileStream : public ReadStream {
 public:
-    MappedFileStream(__in __nullterminated WCHAR* wFileName)
+    MappedFileStream(_In_ __nullterminated WCHAR* wFileName)
     {
         fileNameW = wFileName;
         m_hFile = INVALID_HANDLE_VALUE;
@@ -124,7 +124,7 @@ public:
             fileNameW = NULL;
         }
     }
-    unsigned getAll(__out char** pbuff)
+    unsigned getAll(_Out_ char** pbuff)
     {
         *pbuff = m_pStart;
         return m_FileSize;
@@ -214,14 +214,14 @@ typedef LIFO<ARG_NAME_LIST> ARG_NAME_LIST_STACK;
 /*--------------------------------------------------------------------------*/
 typedef char*(*PFN_NEXTCHAR)(char*);
 
-char* nextcharU(__in __nullterminated char* pos);
-char* nextcharW(__in __nullterminated char* pos);
+char* nextcharU(_In_ __nullterminated char* pos);
+char* nextcharW(_In_ __nullterminated char* pos);
 
 /*--------------------------------------------------------------------------*/
 typedef unsigned(*PFN_SYM)(char*);
 
-unsigned SymAU(__in __nullterminated char* curPos);
-unsigned SymW(__in __nullterminated char* curPos);
+unsigned SymAU(_In_ __nullterminated char* curPos);
+unsigned SymW(_In_ __nullterminated char* curPos);
 /*--------------------------------------------------------------------------*/
 typedef char*(*PFN_NEWSTRFROMTOKEN)(char*,size_t);
 
@@ -235,8 +235,8 @@ char* NewStaticStrFromTokenW(__in_ecount(tokLen) char* curTok, size_t tokLen, __
 /*--------------------------------------------------------------------------*/
 typedef unsigned(*PFN_GETDOUBLE)(char*,unsigned,double**);
 
-unsigned GetDoubleAU(__in __nullterminated char* begNum, unsigned L, double** ppRes);
-unsigned GetDoubleW(__in __nullterminated char* begNum, unsigned L, double** ppRes);
+unsigned GetDoubleAU(_In_ __nullterminated char* begNum, unsigned L, double** ppRes);
+unsigned GetDoubleW(_In_ __nullterminated char* begNum, unsigned L, double** ppRes);
 /*--------------------------------------------------------------------------*/
 struct PARSING_ENVIRONMENT
 {
@@ -284,9 +284,9 @@ public:
     virtual void warn(const char* fmt, ...);
     virtual void msg(const char* fmt, ...);
        char *getLine(int lineNum) { return penv->in->getLine(lineNum); };
-    unsigned getAll(__out char** pbuff) { return penv->in->getAll(pbuff); };
+    unsigned getAll(_Out_ char** pbuff) { return penv->in->getAll(pbuff); };
        bool Success() {return success; };
-    void SetIncludePath(__in WCHAR* wz) { wzIncludePath = wz; };
+    void SetIncludePath(_In_ WCHAR* wz) { wzIncludePath = wz; };
 
     ARG_NAME_LIST_STACK  m_ANSFirst;
     ARG_NAME_LIST_STACK  m_ANSLast;
@@ -303,15 +303,15 @@ private:
     HANDLE hstderr;
 
 private:
-    friend void yyerror(__in __nullterminated const char* str);
+    friend void yyerror(_In_ __nullterminated const char* str);
     friend int parse_literal(unsigned curSym, __inout __nullterminated char* &curPos, BOOL translate_escapes);
     friend int yyparse();
     friend int yylex();
     friend Instr* SetupInstr(unsigned short opcode);
     friend int findKeyword(const char* name, size_t nameLen, unsigned short* opcode);
     friend TypeDefDescr* findTypedef(__in_ecount(nameLen) char* name, size_t nameLen);
-    friend char* skipBlanks(__in __nullterminated char*,unsigned*);
-    friend char* nextBlank(__in __nullterminated char*);
+    friend char* skipBlanks(_In_ __nullterminated char*,unsigned*);
+    friend char* nextBlank(_In_ __nullterminated char*);
     friend int ProcessEOF();
     friend unsigned __int8* skipType(unsigned __int8* ptr, BOOL fFixupType);
     friend void FixupConstraints();
index e8044d1..6ab3fcb 100644 (file)
@@ -1039,7 +1039,7 @@ BOOL Assembler::EmitProp(PropDescriptor* pPD)
     return TRUE;
 }
 
-Class *Assembler::FindCreateClass(__in __nullterminated const char *pszFQN)
+Class *Assembler::FindCreateClass(_In_ __nullterminated const char *pszFQN)
 {
     Class *pSearch = NULL;
 
@@ -1186,7 +1186,7 @@ BOOL Assembler::DoGlobalFixups()
     return TRUE;
 }
 
-state_t Assembler::AddGlobalLabel(__in __nullterminated char *pszName, HCEESECTION section)
+state_t Assembler::AddGlobalLabel(_In_ __nullterminated char *pszName, HCEESECTION section)
 {
     if (FindGlobalLabel(pszName) != NULL)
     {
@@ -1213,7 +1213,7 @@ state_t Assembler::AddGlobalLabel(__in __nullterminated char *pszName, HCEESECTI
     return m_State;
 }
 
-void Assembler::AddLabel(DWORD CurPC, __in __nullterminated char *pszName)
+void Assembler::AddLabel(DWORD CurPC, _In_ __nullterminated char *pszName)
 {
     if (m_pCurMethod->FindLabel(pszName) != NULL)
     {
index 48f9487..3063a48 100644 (file)
@@ -15,7 +15,7 @@
 #define FAIL_UNLESS(x, y) if (!(x)) { report->error y; return; }
 
 /**************************************************************************/
-void Assembler::StartNameSpace(__in __nullterminated char* name)
+void Assembler::StartNameSpace(_In_ __nullterminated char* name)
 {
     m_NSstack.PUSH(m_szNamespace);
     m_szNamespace = name;
@@ -91,7 +91,7 @@ void    Assembler::ClearBoundList(void)
     m_TyParList = NULL;
 }
 /**************************************************************************/
-mdToken Assembler::ResolveClassRef(mdToken tkResScope, __in __nullterminated const char *pszFullClassName, Class** ppClass)
+mdToken Assembler::ResolveClassRef(mdToken tkResScope, _In_ __nullterminated const char *pszFullClassName, Class** ppClass)
 {
     Class *pClass = NULL;
     mdToken tkRet = mdTokenNil;
@@ -239,7 +239,7 @@ mdToken Assembler::ResolveTypeSpec(BinStr* typeSpec)
 }
 
 /**************************************************************************/
-mdToken Assembler::GetAsmRef(__in __nullterminated const char* szName)
+mdToken Assembler::GetAsmRef(_In_ __nullterminated const char* szName)
 {
     mdToken tkResScope = 0;
     if(strcmp(szName,"*")==0) tkResScope = mdTokenNil;
@@ -330,7 +330,7 @@ mdToken Assembler::GetInterfaceImpl(mdToken tsClass, mdToken tsInterface)
 }
 
 /**************************************************************************/
-mdToken Assembler::GetModRef(__in __nullterminated char* szName)
+mdToken Assembler::GetModRef(_In_ __nullterminated char* szName)
 {
     mdToken tkResScope = 0;
     if(!strcmp(szName,m_szScopeName))
@@ -417,7 +417,7 @@ DWORD Assembler::CheckClassFlagsIfNested(Class* pEncloser, DWORD attr)
 
 /**************************************************************************/
 
-void Assembler::StartClass(__in __nullterminated char* name, DWORD attr, TyParList *typars)
+void Assembler::StartClass(_In_ __nullterminated char* name, DWORD attr, TyParList *typars)
 {
     Class *pEnclosingClass = m_pCurClass;
     char *szFQN;
@@ -607,7 +607,7 @@ void Assembler::SetPinvoke(BinStr* DllName, int Ordinal, BinStr* Alias, int Attr
 }
 
 /**************************************************************************/
-void Assembler::StartMethod(__in __nullterminated char* name, BinStr* sig, CorMethodAttr flags, BinStr* retMarshal, DWORD retAttr, TyParList *typars)
+void Assembler::StartMethod(_In_ __nullterminated char* name, BinStr* sig, CorMethodAttr flags, BinStr* retMarshal, DWORD retAttr, TyParList *typars)
 {
     if (m_pCurMethod != NULL)
     {
@@ -801,7 +801,7 @@ void Assembler::EndMethod()
 }
 /**************************************************************************/
 /* rvaLabel is the optional label that indicates this field points at a particular RVA */
-void Assembler::AddField(__inout_z __inout char* name, BinStr* sig, CorFieldAttr flags, __in __nullterminated char* rvaLabel, BinStr* pVal, ULONG ulOffset)
+void Assembler::AddField(__inout_z __inout char* name, BinStr* sig, CorFieldAttr flags, _In_ __nullterminated char* rvaLabel, BinStr* pVal, ULONG ulOffset)
 {
     FieldDescriptor*    pFD;
     ULONG   i,n;
@@ -1030,7 +1030,7 @@ void Assembler::NewSEHDescriptor(void) //sets m_SEHD
     if(m_SEHD == NULL) report->error("Failed to allocate SEH descriptor\n");
 }
 /**************************************************************************/
-void Assembler::SetTryLabels(__in __nullterminated char * szFrom, __in __nullterminated char *szTo)
+void Assembler::SetTryLabels(_In_ __nullterminated char * szFrom, _In_ __nullterminated char *szTo)
 {
     if(!m_SEHD) return;
     Label *pLbl = m_pCurMethod->FindLabel(szFrom);
@@ -1043,7 +1043,7 @@ void Assembler::SetTryLabels(__in __nullterminated char * szFrom, __in __nullter
     else report->error("Undefined 1st label in 'try <label> to <label>'\n");
 }
 /**************************************************************************/
-void Assembler::SetFilterLabel(__in __nullterminated char *szFilter)
+void Assembler::SetFilterLabel(_In_ __nullterminated char *szFilter)
 {
     if(!m_SEHD) return;
     Label *pLbl = m_pCurMethod->FindLabel(szFilter);
@@ -1058,7 +1058,7 @@ void Assembler::SetCatchClass(mdToken catchClass)
 
 }
 /**************************************************************************/
-void Assembler::SetHandlerLabels(__in __nullterminated char *szHandlerFrom, __in __nullterminated char *szHandlerTo)
+void Assembler::SetHandlerLabels(_In_ __nullterminated char *szHandlerFrom, _In_ __nullterminated char *szHandlerTo)
 {
     if(!m_SEHD) return;
     Label *pLbl = m_pCurMethod->FindLabel(szHandlerFrom);
@@ -1273,7 +1273,7 @@ void Assembler::EmitData(__in_opt void *buffer, unsigned len)
 }
 
 /**************************************************************************/
-void Assembler::EmitDD(__in __nullterminated char *str)
+void Assembler::EmitDD(_In_ __nullterminated char *str)
 {
     DWORD       dwAddr = 0;
     GlobalLabel *pLabel = FindGlobalLabel(str);
@@ -1333,7 +1333,7 @@ GlobalLabel *Assembler::FindGlobalLabel(LPCUTF8 pszName)
 
 /**************************************************************************/
 
-GlobalFixup *Assembler::AddDeferredGlobalFixup(__in __nullterminated char *pszLabel, BYTE* pReference)
+GlobalFixup *Assembler::AddDeferredGlobalFixup(_In_ __nullterminated char *pszLabel, BYTE* pReference)
 {
     GlobalFixup *pNew = new GlobalFixup(pszLabel, (BYTE*) pReference);
     if (pNew == NULL)
@@ -1565,7 +1565,7 @@ void Assembler::EmitInstrVar(Instr* instr, int var)
 }
 
 /**************************************************************************/
-void Assembler::EmitInstrVarByName(Instr* instr, __in __nullterminated char* label)
+void Assembler::EmitInstrVarByName(Instr* instr, _In_ __nullterminated char* label)
 {
     int idx = -1, nArgVarFlag=0;
     switch(instr->opcode)
@@ -1675,7 +1675,7 @@ void Assembler::EmitInstrR(Instr* instr, double* pval)
 }
 
 /**************************************************************************/
-void Assembler::EmitInstrBrTarget(Instr* instr, __in __nullterminated char* label)
+void Assembler::EmitInstrBrTarget(Instr* instr, _In_ __nullterminated char* label)
 {
     Label * pLabel = m_pCurMethod->FindLabel(label);
     int offset=0;
@@ -1711,7 +1711,7 @@ void Assembler::EmitInstrBrTarget(Instr* instr, __in __nullterminated char* labe
     else              EmitBytes((BYTE *)&offset,4);
 }
 /**************************************************************************/
-void Assembler::AddDeferredFixup(__in __nullterminated char *pszLabel, BYTE *pBytes, DWORD RelativeToPC, BYTE FixupSize)
+void Assembler::AddDeferredFixup(_In_ __nullterminated char *pszLabel, BYTE *pBytes, DWORD RelativeToPC, BYTE FixupSize)
 {
     Fixup *pNew = new Fixup(pszLabel, pBytes, RelativeToPC, FixupSize);
 
@@ -1744,7 +1744,7 @@ void Assembler::EmitInstrBrOffset(Instr* instr, int offset)
 }
 
 /**************************************************************************/
-mdToken Assembler::MakeMemberRef(mdToken cr, __in __nullterminated char* pszMemberName, BinStr* sig)
+mdToken Assembler::MakeMemberRef(mdToken cr, _In_ __nullterminated char* pszMemberName, BinStr* sig)
 {
     DWORD           cSig = sig->length();
     COR_SIGNATURE*  mySig = (COR_SIGNATURE *)(sig->ptr());
@@ -2140,13 +2140,13 @@ void Assembler::EmitInstrSwitch(Instr* instr, Labels* targets)
 }
 
 /**************************************************************************/
-void Assembler::EmitLabel(__in __nullterminated char* label)
+void Assembler::EmitLabel(_In_ __nullterminated char* label)
 {
     _ASSERTE(m_pCurMethod);
     AddLabel(m_CurPC, label);
 }
 /**************************************************************************/
-void Assembler::EmitDataLabel(__in __nullterminated char* label)
+void Assembler::EmitDataLabel(_In_ __nullterminated char* label)
 {
     AddGlobalLabel(label, m_pCurSection);
 }
@@ -2208,7 +2208,7 @@ void Assembler::EmitBytes(BYTE *p, unsigned len)
     m_CurPC += len;
 }
 /**************************************************************************/
-BinStr* Assembler::EncodeSecAttr(__in __nullterminated char* szReflName, BinStr* pbsSecAttrBlob, unsigned nProps)
+BinStr* Assembler::EncodeSecAttr(_In_ __nullterminated char* szReflName, BinStr* pbsSecAttrBlob, unsigned nProps)
 {
     unsigned cnt;
 
@@ -2328,7 +2328,7 @@ void Assembler::EmitSecurityInfo(mdToken            token,
     }
 }
 
-void Assembler::AddMethodImpl(mdToken tkImplementedTypeSpec, __in __nullterminated char* szImplementedName, BinStr* pImplementedSig,
+void Assembler::AddMethodImpl(mdToken tkImplementedTypeSpec, _In_ __nullterminated char* szImplementedName, BinStr* pImplementedSig,
                   mdToken tkImplementingTypeSpec, __in_opt __nullterminated char* szImplementingName, BinStr* pImplementingSig)
 {
     if(m_pCurClass)
@@ -2373,7 +2373,7 @@ void Assembler::AddMethodImpl(mdToken tkImplementedTypeSpec, __in __nullterminat
         report->error(".override directive outside class scope");
 }
 // source file name paraphernalia
-void Assembler::SetSourceFileName(__in __nullterminated char* szName)
+void Assembler::SetSourceFileName(_In_ __nullterminated char* szName)
 {
     if(szName)
     {
@@ -2411,7 +2411,7 @@ void Assembler::SetSourceFileName(BinStr* pbsName)
 }
 
 // Portable PDB paraphernalia
-void Assembler::SetPdbFileName(__in __nullterminated char* szName)
+void Assembler::SetPdbFileName(_In_ __nullterminated char* szName)
 {
     if (szName)
     {
index 794532a..f9a3c35 100644 (file)
@@ -269,7 +269,7 @@ public:
 /* represents a switch table before the lables are bound */
 
 struct Labels {
-    Labels(__in __nullterminated char* aLabel, Labels* aNext, bool aIsLabel) : Label(aLabel), Next(aNext), isLabel(aIsLabel) {}
+    Labels(_In_ __nullterminated char* aLabel, Labels* aNext, bool aIsLabel) : Label(aLabel), Next(aNext), isLabel(aIsLabel) {}
     ~Labels() { if(isLabel && Label) delete [] Label; delete Next; }
 
     char*       Label;
@@ -374,7 +374,7 @@ struct ImportDescriptor
 //    char   szDllName[MAX_FILENAME_LENGTH];
     DWORD  dwDllName;
     mdModuleRef mrDll;
-    ImportDescriptor(__in __nullterminated char* sz, DWORD l)
+    ImportDescriptor(_In_ __nullterminated char* sz, DWORD l)
     {
         if((sz != NULL)&&(l > 0))
         {
@@ -607,7 +607,7 @@ struct VTFEntry
     char*   m_szLabel;
     WORD    m_wCount;
     WORD    m_wType;
-    VTFEntry(WORD wCount, WORD wType, __in __nullterminated char* szLabel) { m_wCount = wCount; m_wType = wType; m_szLabel = szLabel; }
+    VTFEntry(WORD wCount, WORD wType, _In_ __nullterminated char* szLabel) { m_wCount = wCount; m_wType = wType; m_szLabel = szLabel; }
     ~VTFEntry() { delete m_szLabel; }
 };
 typedef FIFO<VTFEntry> VTFList;
@@ -696,7 +696,7 @@ struct Indx
     {
         for(int i = 1; i < 128; i++) delete ((Indx*)(table[i]));
     };
-    void IndexString(__in_z __in char* psz, void* pkywd)
+    void IndexString(__in_z _In_ char* psz, void* pkywd)
     {
         int i = (int) *psz;
         if(i == 0)
@@ -714,7 +714,7 @@ struct Indx
             pInd->IndexString(psz+1,pkywd);
         }
     }
-    void*  FindString(__in __nullterminated char* psz)
+    void*  FindString(_In_ __nullterminated char* psz)
     {
         if(*psz > 0)
         {
@@ -822,8 +822,8 @@ public:
         return NULL;
     }
     // Labels, fixups and IL fixups are defined in Method.hpp,.cpp
-    void AddLabel(DWORD CurPC, __in __nullterminated char *pszName);
-    void AddDeferredFixup(__in __nullterminated char *pszLabel, BYTE *pBytes, DWORD RelativeToPC, BYTE FixupSize);
+    void AddLabel(DWORD CurPC, _In_ __nullterminated char *pszName);
+    void AddDeferredFixup(_In_ __nullterminated char *pszLabel, BYTE *pBytes, DWORD RelativeToPC, BYTE FixupSize);
     void AddDeferredILFixup(ILFixupType Kind);
     void AddDeferredILFixup(ILFixupType Kind, GlobalFixup *GFixup);
     void DoDeferredILFixups(Method* pMethod);
@@ -834,10 +834,10 @@ public:
     void    ClearBoundList(void);
     //--------------------------------------------------------------------------------
     BOOL Init(BOOL generatePdb);
-    void ProcessLabel(__in_z __in char *pszName);
+    void ProcessLabel(__in_z _In_ char *pszName);
     GlobalLabel *FindGlobalLabel(LPCUTF8 pszName);
-    GlobalFixup *AddDeferredGlobalFixup(__in __nullterminated char *pszLabel, BYTE* reference);
-    //void AddDeferredDescrFixup(__in __nullterminated char *pszLabel);
+    GlobalFixup *AddDeferredGlobalFixup(_In_ __nullterminated char *pszLabel, BYTE* reference);
+    //void AddDeferredDescrFixup(_In_ __nullterminated char *pszLabel);
     BOOL DoGlobalFixups();
     BOOL DoDescrFixups();
     OPCODE DecodeOpcode(const BYTE *pCode, DWORD *pdwLen);
@@ -848,26 +848,26 @@ public:
     BOOL EmitMethod(Method *pMethod);
     BOOL EmitMethodBody(Method* pMethod, BinStr* pbsOut);
     BOOL EmitClass(Class *pClass);
-    HRESULT CreatePEFile(__in __nullterminated WCHAR *pwzOutputFilename);
+    HRESULT CreatePEFile(_In_ __nullterminated WCHAR *pwzOutputFilename);
     HRESULT CreateTLSDirectory();
     HRESULT CreateDebugDirectory();
     HRESULT InitMetaData();
-    Class *FindCreateClass(__in __nullterminated const char *pszFQN);
-    BOOL EmitFieldRef(__in_z __in char *pszArg, int opcode);
-    BOOL EmitSwitchData(__in_z __in char *pszArg);
-    mdToken ResolveClassRef(mdToken tkResScope, __in __nullterminated const char *pszClassName, Class** ppClass);
+    Class *FindCreateClass(_In_ __nullterminated const char *pszFQN);
+    BOOL EmitFieldRef(__in_z _In_ char *pszArg, int opcode);
+    BOOL EmitSwitchData(__in_z _In_ char *pszArg);
+    mdToken ResolveClassRef(mdToken tkResScope, _In_ __nullterminated const char *pszClassName, Class** ppClass);
     mdToken ResolveTypeSpec(BinStr* typeSpec);
     mdToken GetBaseAsmRef();
-    mdToken GetAsmRef(__in __nullterminated const char* szName);
-    mdToken GetModRef(__in __nullterminated char* szName);
+    mdToken GetAsmRef(_In_ __nullterminated const char* szName);
+    mdToken GetModRef(_In_ __nullterminated char* szName);
     mdToken GetInterfaceImpl(mdToken tsClass, mdToken tsInterface);
     char* ReflectionNotation(mdToken tk);
-    HRESULT ConvLocalSig(__in char* localsSig, CQuickBytes* corSig, DWORD* corSigLen, BYTE*& localTypes);
+    HRESULT ConvLocalSig(_In_ char* localsSig, CQuickBytes* corSig, DWORD* corSigLen, BYTE*& localTypes);
     DWORD GetCurrentILSectionOffset();
-    BOOL EmitCALLISig(__in char *p);
+    BOOL EmitCALLISig(_In_ char *p);
     void AddException(DWORD pcStart, DWORD pcEnd, DWORD pcHandler, DWORD pcHandlerTo, mdTypeRef crException, BOOL isFilter, BOOL isFault, BOOL isFinally);
     state_t CheckLocalTypeConsistancy(int instr, unsigned arg);
-    state_t AddGlobalLabel(__in __nullterminated char *pszName, HCEESECTION section);
+    state_t AddGlobalLabel(_In_ __nullterminated char *pszName, HCEESECTION section);
     void SetDLL(BOOL);
     void ResetForNextMethod();
     void ResetLineNumbers();
@@ -878,16 +878,16 @@ public:
     unsigned ShortOf(unsigned opcode);
     void SetErrorReporter(ErrorReporter* aReport) { report = aReport; if(m_pManifest) m_pManifest->SetErrorReporter(aReport); }
 
-    void StartNameSpace(__in __nullterminated char* name);
+    void StartNameSpace(_In_ __nullterminated char* name);
     void EndNameSpace();
-    void StartClass(__in __nullterminated char* name, DWORD attr, TyParList *typars);
+    void StartClass(_In_ __nullterminated char* name, DWORD attr, TyParList *typars);
     DWORD CheckClassFlagsIfNested(Class* pEncloser, DWORD attr);
     void AddClass();
     void EndClass();
-    void StartMethod(__in __nullterminated char* name, BinStr* sig, CorMethodAttr flags, BinStr* retMarshal, DWORD retAttr, TyParList *typars = NULL);
+    void StartMethod(_In_ __nullterminated char* name, BinStr* sig, CorMethodAttr flags, BinStr* retMarshal, DWORD retAttr, TyParList *typars = NULL);
     void EndMethod();
 
-    void AddField(__inout_z __inout char* name, BinStr* sig, CorFieldAttr flags, __in __nullterminated char* rvaLabel, BinStr* pVal, ULONG ulOffset);
+    void AddField(__inout_z __inout char* name, BinStr* sig, CorFieldAttr flags, _In_ __nullterminated char* rvaLabel, BinStr* pVal, ULONG ulOffset);
        BOOL EmitField(FieldDescriptor* pFD);
     void EmitByte(int val);
     //void EmitTry(enum CorExceptionFlag kind, char* beginLabel, char* endLabel, char* handleLabel, char* filterOrClass);
@@ -900,25 +900,25 @@ public:
     // Emits zeros if the buffer parameter is NULL.
     void EmitData(__in_opt void *buffer, unsigned len);
 
-    void EmitDD(__in __nullterminated char *str);
+    void EmitDD(_In_ __nullterminated char *str);
     void EmitDataString(BinStr* str);
 
     void EmitInstrVar(Instr* instr, int var);
-    void EmitInstrVarByName(Instr* instr, __in __nullterminated char* label);
+    void EmitInstrVarByName(Instr* instr, _In_ __nullterminated char* label);
     void EmitInstrI(Instr* instr, int val);
     void EmitInstrI8(Instr* instr, __int64* val);
     void EmitInstrR(Instr* instr, double* val);
     void EmitInstrBrOffset(Instr* instr, int offset);
-    void EmitInstrBrTarget(Instr* instr, __in __nullterminated char* label);
-    mdToken MakeMemberRef(mdToken typeSpec, __in __nullterminated char* name, BinStr* sig);
+    void EmitInstrBrTarget(Instr* instr, _In_ __nullterminated char* label);
+    mdToken MakeMemberRef(mdToken typeSpec, _In_ __nullterminated char* name, BinStr* sig);
     mdToken MakeMethodSpec(mdToken tkParent, BinStr* sig);
     void SetMemberRefFixup(mdToken tk, unsigned opcode_len);
     mdToken MakeTypeRef(mdToken tkResScope, LPCUTF8 szFullName);
     void EmitInstrStringLiteral(Instr* instr, BinStr* literal, BOOL ConvertToUnicode, BOOL Swap = FALSE);
     void EmitInstrSig(Instr* instr, BinStr* sig);
     void EmitInstrSwitch(Instr* instr, Labels* targets);
-    void EmitLabel(__in __nullterminated char* label);
-    void EmitDataLabel(__in __nullterminated char* label);
+    void EmitLabel(_In_ __nullterminated char* label);
+    void EmitDataLabel(_In_ __nullterminated char* label);
 
     unsigned OpcodeLen(Instr* instr); //returns opcode length
     // Emit just the opcode (no parameters to the instruction stream.
@@ -977,10 +977,10 @@ public:
 public:
     SEH_Descriptor  *m_SEHD;    // current descriptor ptr
     void NewSEHDescriptor(void); //sets m_SEHD
-    void SetTryLabels(__in __nullterminated char * szFrom, __in __nullterminated char *szTo);
-    void SetFilterLabel(__in __nullterminated char *szFilter);
+    void SetTryLabels(_In_ __nullterminated char * szFrom, _In_ __nullterminated char *szTo);
+    void SetFilterLabel(_In_ __nullterminated char *szFilter);
     void SetCatchClass(mdToken catchClass);
-    void SetHandlerLabels(__in __nullterminated char *szHandlerFrom, __in __nullterminated char *szHandlerTo);
+    void SetHandlerLabels(_In_ __nullterminated char *szHandlerFrom, _In_ __nullterminated char *szHandlerTo);
     void EmitTry(void);         //uses m_SEHD
 
 //private:
@@ -1043,7 +1043,7 @@ public:
     WCHAR               m_wzPdbFileName[MAX_FILENAME_LENGTH];
 
     // Sets the pdb file name of the assembled file.
-    void SetPdbFileName(__in __nullterminated char* szName);
+    void SetPdbFileName(_In_ __nullterminated char* szName);
     // Saves the pdb file.
     HRESULT SavePdbFile();
 
@@ -1120,7 +1120,7 @@ public:
     void EmitSecurityInfo(mdToken           token,
                           PermissionDecl*   pPermissions,
                           PermissionSetDecl*pPermissionSets);
-    BinStr* EncodeSecAttr(__in __nullterminated char* szReflName, BinStr* pbsSecAttrBlob, unsigned nProps);
+    BinStr* EncodeSecAttr(_In_ __nullterminated char* szReflName, BinStr* pbsSecAttrBlob, unsigned nProps);
 
     HRESULT AllocateStrongNameSignature();
 
@@ -1190,12 +1190,12 @@ public:
 private:
     MethodImplDList m_MethodImplDList;
 public:
-    void AddMethodImpl(mdToken tkImplementedTypeSpec, __in __nullterminated char* szImplementedName, BinStr* pImplementedSig,
+    void AddMethodImpl(mdToken tkImplementedTypeSpec, _In_ __nullterminated char* szImplementedName, BinStr* pImplementedSig,
                     mdToken tkImplementingTypeSpec, __in_opt __nullterminated char* szImplementingName, BinStr* pImplementingSig);
     BOOL EmitMethodImpls();
     // source file name paraphernalia
     BOOL m_fSourceFileSet;
-    void SetSourceFileName(__in __nullterminated char* szName);
+    void SetSourceFileName(_In_ __nullterminated char* szName);
     void SetSourceFileName(BinStr* pbsName);
     // header flags
     DWORD   m_dwSubsystem;
@@ -1223,21 +1223,21 @@ public:
 private:
     TypeDefDList m_TypeDefDList;
 public:
-    void AddTypeDef(BinStr* pbsTypeSpec, __in_z __in char* szName)
+    void AddTypeDef(BinStr* pbsTypeSpec, __in_z _In_ char* szName)
     {
         m_TypeDefDList.PUSH(new TypeDefDescr(szName, pbsTypeSpec, ResolveTypeSpec(pbsTypeSpec)));
     };
-    void AddTypeDef(mdToken tkTypeSpec, __in_z __in char* szName)
+    void AddTypeDef(mdToken tkTypeSpec, __in_z _In_ char* szName)
     {
         m_TypeDefDList.PUSH(new TypeDefDescr(szName, NULL, tkTypeSpec));
     };
-    void AddTypeDef(CustomDescr* pCA, __in_z __in char* szName)
+    void AddTypeDef(CustomDescr* pCA, __in_z _In_ char* szName)
     {
         TypeDefDescr* pNew = new TypeDefDescr(szName,NULL,mdtCustomAttribute);
         pNew->m_pCA = pCA;
         m_TypeDefDList.PUSH(pNew);
     };
-    TypeDefDescr* FindTypeDef(__in_z __in char* szName)
+    TypeDefDescr* FindTypeDef(__in_z _In_ char* szName)
     {
         CHECK_LOCAL_STATIC_VAR(static TypeDefDescr X(NULL, NULL, 0));
 
@@ -1249,7 +1249,7 @@ public:
     };
     unsigned NumTypeDefs() {return m_TypeDefDList.COUNT();};
 private:
-    HRESULT GetCAName(mdToken tkCA, __out LPWSTR *ppszName);
+    HRESULT GetCAName(mdToken tkCA, _Out_ LPWSTR *ppszName);
 
 public:
     void RecordTypeConstraints(GenericParamConstraintList* pGPCList, int numTyPars, TyParDescr* tyPars);
index cb649ea..5f43a92 100644 (file)
@@ -76,22 +76,22 @@ static Keywords keywords[] = {
 /********************************************************************************/
 /* File encoding-dependent functions */
 /*--------------------------------------------------------------------------*/
-char* nextcharU(__in __nullterminated char* pos)
+char* nextcharU(_In_ __nullterminated char* pos)
 {
     return ++pos;
 }
 
-char* nextcharW(__in __nullterminated char* pos)
+char* nextcharW(_In_ __nullterminated char* pos)
 {
     return (pos+2);
 }
 /*--------------------------------------------------------------------------*/
-unsigned SymAU(__in __nullterminated char* curPos)
+unsigned SymAU(_In_ __nullterminated char* curPos)
 {
     return (unsigned)*curPos;
 }
 
-unsigned SymW(__in __nullterminated char* curPos)
+unsigned SymW(_In_ __nullterminated char* curPos)
 {
     return (unsigned)*((WCHAR*)curPos);
 }
@@ -134,7 +134,7 @@ char* NewStaticStrFromTokenW(__in_ecount(tokLen) char* curTok, size_t tokLen, __
     return staticBuf;
 }
 /*--------------------------------------------------------------------------*/
-unsigned GetDoubleAU(__in __nullterminated char* begNum, unsigned L, double** ppRes)
+unsigned GetDoubleAU(_In_ __nullterminated char* begNum, unsigned L, double** ppRes)
 {
     static char dbuff[128];
     char* pdummy;
@@ -145,7 +145,7 @@ unsigned GetDoubleAU(__in __nullterminated char* begNum, unsigned L, double** pp
     return ((unsigned)(pdummy - dbuff));
 }
 
-unsigned GetDoubleW(__in __nullterminated char* begNum, unsigned L, double** ppRes)
+unsigned GetDoubleW(_In_ __nullterminated char* begNum, unsigned L, double** ppRes)
 {
     static char dbuff[256];
     char* pdummy;
@@ -198,7 +198,7 @@ char* yygetline(int Line)
     return buff;
 }
 
-void yyerror(__in __nullterminated const char* str) {
+void yyerror(_In_ __nullterminated const char* str) {
     char tokBuff[64];
     WCHAR *wzfile = (WCHAR*)(PENV->in->namew());
     int iline = PENV->curLine;
@@ -354,7 +354,7 @@ static unsigned __int64 str2uint64(const char* str, const char** endStr, unsigne
 }
 /********************************************************************************/
 /* Append an UTF-8 string preceded by compressed length, no zero terminator, to a BinStr */
-static void AppendStringWithLength(BinStr* pbs, __in __nullterminated char* sz)
+static void AppendStringWithLength(BinStr* pbs, _In_ __nullterminated char* sz)
 {
     if((pbs != NULL) && (sz != NULL))
     {
@@ -466,7 +466,7 @@ static int ByteSwapCustomBlob(BYTE *ptr, int length, int type, bool isSZArray)
 }
 #endif
 
-static void AppendFieldToCustomBlob(BinStr* pBlob, __in BinStr* pField)
+static void AppendFieldToCustomBlob(BinStr* pBlob, _In_ BinStr* pField)
 {
     pBlob->appendFrom(pField, (*(pField->ptr()) == ELEMENT_TYPE_SZARRAY) ? 2 : 1);
 
@@ -550,7 +550,7 @@ BOOL IsValidStartingSymbol(unsigned x) { return (x < 128)&&_ValidSS[x]; }
 BOOL IsValidContinuingSymbol(unsigned x) { return (x < 128)&&_ValidCS[x]; }
 
 
-char* nextBlank(__in __nullterminated char* curPos)
+char* nextBlank(_In_ __nullterminated char* curPos)
 {
     for(;;)
     {
@@ -578,7 +578,7 @@ char* nextBlank(__in __nullterminated char* curPos)
     }
 }
 
-char* skipBlanks(__in __nullterminated char* curPos, unsigned* pstate)
+char* skipBlanks(_In_ __nullterminated char* curPos, unsigned* pstate)
 {
     const unsigned eolComment = 1;
     const unsigned multiComment = 2;
@@ -658,7 +658,7 @@ PAST_WHITESPACE:
     return curPos;
 }
 
-char* FullFileName(__in __nullterminated WCHAR* wzFileName, unsigned uCodePage);
+char* FullFileName(_In_ __nullterminated WCHAR* wzFileName, unsigned uCodePage);
 
 int ProcessEOF()
 {
@@ -1280,7 +1280,7 @@ Just_A_Character:
 #endif
 
 /**************************************************************************/
-static char* newString(__in __nullterminated const char* str1)
+static char* newString(_In_ __nullterminated const char* str1)
 {
     char* ret = new char[strlen(str1)+1];
     if(ret) strcpy_s(ret, strlen(str1)+1, str1);
@@ -1290,7 +1290,7 @@ static char* newString(__in __nullterminated const char* str1)
 /**************************************************************************/
 /* concatenate strings and release them */
 
-static char* newStringWDel(__in __nullterminated char* str1, char delimiter, __in __nullterminated char* str3)
+static char* newStringWDel(_In_ __nullterminated char* str1, char delimiter, _In_ __nullterminated char* str3)
 {
     size_t len1 = strlen(str1);
     size_t len = len1+2;
@@ -1764,7 +1764,7 @@ BinStr* AsmParse::MakeTypeClass(CorElementType kind, mdToken tk)
     return(ret);
 }
 /**************************************************************************/
-void PrintANSILine(FILE* pF, __in __nullterminated char* sz)
+void PrintANSILine(FILE* pF, _In_ __nullterminated char* sz)
 {
         WCHAR *wz = &wzUniBuf[0];
         if(g_uCodePage != CP_ACP)
index b32684e..3bea6ab 100644 (file)
@@ -46,11 +46,11 @@ void SetFunctionPtrs()
 }
 
 
-static char* newStringWDel(__in __nullterminated char* str1, char delimiter, __in __nullterminated char* str3 = 0);
-static char* newString(__in __nullterminated const char* str1);
+static char* newStringWDel(_In_ __nullterminated char* str1, char delimiter, _In_ __nullterminated char* str3 = 0);
+static char* newString(_In_ __nullterminated const char* str1);
 static void corEmitInt(BinStr* buff, unsigned data);
-static void AppendStringWithLength(BinStr* pbs, __in __nullterminated char* sz);
-static void AppendFieldToCustomBlob(BinStr* pBlob, __in BinStr* pField);
+static void AppendStringWithLength(BinStr* pbs, _In_ __nullterminated char* sz);
+static void AppendFieldToCustomBlob(BinStr* pBlob, _In_ BinStr* pField);
 bool bParsingByteArray = FALSE;
 int iOpcodeLen = 0;
 int iCallConv = 0;
@@ -74,8 +74,8 @@ struct VarName
     int ComparedTo(VarName* pN) { return strcmp(name,pN->name); };
 };
 SORTEDARRAY<VarName> VarNameList;
-void DefineVar(__in __nullterminated char* sz, BinStr* pbs) { VarNameList.PUSH(new VarName(sz,pbs)); };
-void UndefVar(__in __nullterminated char* sz)
+void DefineVar(_In_ __nullterminated char* sz, BinStr* pbs) { VarNameList.PUSH(new VarName(sz,pbs)); };
+void UndefVar(_In_ __nullterminated char* sz)
 {
     CHECK_LOCAL_STATIC_VAR(static VarName VN(NULL,NULL));
 
@@ -84,7 +84,7 @@ void UndefVar(__in __nullterminated char* sz)
     VN.name = NULL;
     delete [] sz;
 }
-VarName* FindVarDef(__in __nullterminated char* sz)
+VarName* FindVarDef(_In_ __nullterminated char* sz)
 {
     CHECK_LOCAL_STATIC_VAR(static VarName VN(NULL,NULL));
 
@@ -95,7 +95,7 @@ VarName* FindVarDef(__in __nullterminated char* sz)
     delete [] sz;
     return Ret;
 }
-BOOL IsVarDefined(__in __nullterminated char* sz)
+BOOL IsVarDefined(_In_ __nullterminated char* sz)
 {
     return (FindVarDef(sz) != NULL);
 }
index 17fa665..8bedf07 100644 (file)
@@ -14,7 +14,7 @@
 #include "strsafe.h"
 #define ASSERTE_ALL_BUILDS(expr) _ASSERTE_ALL_BUILDS(__FILE__, (expr))
 
-WCHAR* EqualOrColon(__in __nullterminated WCHAR* szArg)
+WCHAR* EqualOrColon(_In_ __nullterminated WCHAR* szArg)
 {
     WCHAR* pchE = wcschr(szArg,L'=');
     WCHAR* pchC = wcschr(szArg,L':');
@@ -33,7 +33,7 @@ extern unsigned int g_uConsoleCP;
 char * g_pszExeFile;
 #endif
 
-void MakeTestFile(__in __nullterminated char* szFileName)
+void MakeTestFile(_In_ __nullterminated char* szFileName)
 {
     if(g_dwTestRepeat)
     {
@@ -55,7 +55,7 @@ void MakeTestFile(__in __nullterminated char* szFileName)
     }
 }
 
-void MakeProperSourceFileName(__in __nullterminated WCHAR* wzOrigName,
+void MakeProperSourceFileName(_In_ __nullterminated WCHAR* wzOrigName,
                               unsigned uCodePage,
                               __out_ecount(MAX_FILENAME_LENGTH) WCHAR* wzProperName,
                               __out_ecount(MAX_FILENAME_LENGTH*3) char* szProperName)
@@ -76,7 +76,7 @@ void MakeProperSourceFileName(__in __nullterminated WCHAR* wzOrigName,
     WszWideCharToMultiByte(uCodePage,0,wzProperName,-1,szProperName,MAX_FILENAME_LENGTH*3-1,NULL,NULL);
 }
 
-char* FullFileName(__in __nullterminated WCHAR* wzFileName, unsigned uCodePage)
+char* FullFileName(_In_ __nullterminated WCHAR* wzFileName, unsigned uCodePage)
 {
     static WCHAR wzFullPath[MAX_FILENAME_LENGTH];
     WCHAR* pwz;
@@ -102,7 +102,7 @@ WCHAR       wzPdbFilename[MAX_FILENAME_LENGTH];
 #pragma warning(disable:21000) // Suppress PREFast warning about overly large function
 #endif
 
-extern "C" int _cdecl wmain(int argc, __in WCHAR **argv)
+extern "C" int _cdecl wmain(int argc, _In_ WCHAR **argv)
 {
     int         i, NumFiles = 0, NumDeltaFiles = 0;
     bool        IsDLL = false;
index 10fd753..c8946e7 100644 (file)
@@ -8,7 +8,7 @@
 #include "ilasmpch.h"
 #include "assembler.h"
 
-Method::Method(Assembler *pAssembler, Class *pClass, __in __nullterminated char *pszName, BinStr* pbsSig, DWORD Attr)
+Method::Method(Assembler *pAssembler, Class *pClass, _In_ __nullterminated char *pszName, BinStr* pbsSig, DWORD Attr)
 {
 
     // default values
index 8dd5d91..f3b1bcc 100644 (file)
@@ -236,7 +236,7 @@ public:
     // Method body (header+code+EH)
     BinStr* m_pbsBody;
     mdToken m_Tok;
-    Method(Assembler *pAssembler, Class *pClass, __in __nullterminated char *pszName, BinStr* pbsSig, DWORD Attr);
+    Method(Assembler *pAssembler, Class *pClass, _In_ __nullterminated char *pszName, BinStr* pbsSig, DWORD Attr);
     ~Method()
     {
         m_lstFixup.RESET(true);
@@ -354,7 +354,7 @@ public:
     Label *FindLabel(LPCUTF8 pszName);
     Label *FindLabel(DWORD PC);
 
-    int FindTyPar(__in __nullterminated WCHAR* wz)
+    int FindTyPar(_In_ __nullterminated WCHAR* wz)
     {
         int i,retval=-1;
         for(i=0; i < (int)m_NumTyPars; i++)
@@ -366,7 +366,7 @@ public:
         }
         return retval;
     };
-    int FindTyPar(__in __nullterminated char* sz)
+    int FindTyPar(_In_ __nullterminated char* sz)
     {
         if(sz)
         {
index 7b5dd8a..de40e5d 100644 (file)
@@ -563,7 +563,7 @@ DWORD   Assembler::EmitExportStub(DWORD dwVTFSlotRVA)
 }
 //#endif
 
-HRESULT Assembler::GetCAName(mdToken tkCA, __out LPWSTR *ppszName)
+HRESULT Assembler::GetCAName(mdToken tkCA, _Out_ LPWSTR *ppszName)
 {
     HRESULT hr = S_OK;
     DWORD cchName;
@@ -1004,7 +1004,7 @@ HRESULT Assembler::AllocateStrongNameSignature()
 #pragma warning(push)
 #pragma warning(disable:21000) // Suppress PREFast warning about overly large function
 #endif
-HRESULT Assembler::CreatePEFile(__in __nullterminated WCHAR *pwzOutputFilename)
+HRESULT Assembler::CreatePEFile(_In_ __nullterminated WCHAR *pwzOutputFilename)
 {
     HRESULT             hr;
     DWORD               mresourceSize = 0;
index 89db1b5..496e349 100644 (file)
@@ -149,14 +149,14 @@ ULONG                   g_ulMetaInfoFilter = MDInfo::dumpDefault;
 // Validator module type.
 DWORD g_ValModuleType = ValidatorModuleTypeInvalid;
 IMetaDataDispenserEx *g_pDisp = NULL;
-void DisplayFile(__in __nullterminated WCHAR* szFile,
+void DisplayFile(_In_ __nullterminated WCHAR* szFile,
                  BOOL isFile,
                  ULONG DumpFilter,
                  __in_opt __nullterminated WCHAR* szObjFile,
                  strPassBackFn pDisplayString);
 extern mdMethodDef      g_tkEntryPoint; // integration with MetaInfo
 
-DWORD   DumpResourceToFile(__in __nullterminated WCHAR*   wzFileName); // see DRES.CPP
+DWORD   DumpResourceToFile(_In_ __nullterminated WCHAR*   wzFileName); // see DRES.CPP
 
 struct VTableRef
 {
@@ -1343,7 +1343,7 @@ mdToken ResolveTypeDefReflectionNotation(IMDInternalImport *pIMDI,
 }
 
 mdToken ResolveTypeRefReflectionNotation(IMDInternalImport *pIMDI,
-                                         __in __nullterminated const char* szNamespace,
+                                         _In_ __nullterminated const char* szNamespace,
                                          __inout __nullterminated char* szName,
                                          mdToken tkResScope)
 {
@@ -6923,7 +6923,7 @@ void DumpVtable(void* GUICookie)
     }
 }
 // MetaInfo integration:
-void DumpMI(__in __nullterminated const char *str)
+void DumpMI(_In_ __nullterminated const char *str)
 {
     static BOOL fInit = TRUE;
     static char* szStr = &szString[0];
@@ -6955,7 +6955,7 @@ void DumpMI(__in __nullterminated const char *str)
     }
 }
 
-void DumpMetaInfo(__in __nullterminated const WCHAR* pwzFileName, __in_opt __nullterminated const char* pszObjFileName, void* GUICookie)
+void DumpMetaInfo(_In_ __nullterminated const WCHAR* pwzFileName, __in_opt __nullterminated const char* pszObjFileName, void* GUICookie)
 {
     const WCHAR* pch = wcsrchr(pwzFileName,L'.');
 
@@ -7334,7 +7334,7 @@ void CloseNamespace(__inout __nullterminated char* szString)
     }
 }
 
-FILE* OpenOutput(__in __nullterminated const WCHAR* wzFileName)
+FILE* OpenOutput(_In_ __nullterminated const WCHAR* wzFileName)
 {
     FILE*   pfile = NULL;
         if(g_uCodePage == 0xFFFFFFFF) _wfopen_s(&pfile,wzFileName,W("wb"));
@@ -7348,7 +7348,7 @@ FILE* OpenOutput(__in __nullterminated const WCHAR* wzFileName)
     return pfile;
 }
 
-FILE* OpenOutput(__in __nullterminated const char* szFileName)
+FILE* OpenOutput(_In_ __nullterminated const char* szFileName)
 {
     return OpenOutput(UtfToUnicode(szFileName));
 }
index 0e4007a..4afd9cc 100644 (file)
@@ -156,7 +156,7 @@ const char* ERRORMSG(__in_opt __nullterminated const char* szOrig)
         return szOrig;
 }
 
-const char* ANCHORPT(__in __nullterminated const char* szOrig, mdToken tk)
+const char* ANCHORPT(_In_ __nullterminated const char* szOrig, mdToken tk)
 {
     CONTRACTL
     {
@@ -179,7 +179,7 @@ const char* ANCHORPT(__in __nullterminated const char* szOrig, mdToken tk)
     else
         return szOrig;
 }
-const char* JUMPPT(__in __nullterminated const char* szOrig, mdToken tk)
+const char* JUMPPT(_In_ __nullterminated const char* szOrig, mdToken tk)
 {
     CONTRACTL
     {
@@ -212,7 +212,7 @@ const char* AMP(void) { return g_fDumpHTML ? "&amp;" : "&"; }
 
 /******************************************************************************/
 // Function: convert spec.symbols to esc sequences and single-quote if necessary
-const char* UnquotedProperName(__in __nullterminated const char* name, unsigned len/*=(unsigned)-1*/)
+const char* UnquotedProperName(_In_ __nullterminated const char* name, unsigned len/*=(unsigned)-1*/)
 {
     CONTRACTL
     {
@@ -268,7 +268,7 @@ const char* UnquotedProperName(__in __nullterminated const char* name, unsigned
 }
 /******************************************************************************/
 // Function: convert spec.symbols to esc sequences and single-quote if necessary
-const char* ProperName(__in __nullterminated const char* name, bool isLocalName)
+const char* ProperName(_In_ __nullterminated const char* name, bool isLocalName)
 {
     CONTRACTL
     {
index 3d1286c..1a2d37b 100644 (file)
@@ -91,7 +91,7 @@ OPCODE DecodeOpcode(const BYTE *pCode, DWORD *pdwLen)
     return opcode;
 }
 //------------------------------------------------------------------
-WCHAR* UtfToUnicode(__in __nullterminated const char* sz)
+WCHAR* UtfToUnicode(_In_ __nullterminated const char* sz)
 {
     WCHAR* wz = wzUniBuf;
     if (WszMultiByteToWideChar(CP_UTF8,0,sz,-1,wz,UNIBUF_SIZE/2) == 0)
@@ -100,7 +100,7 @@ WCHAR* UtfToUnicode(__in __nullterminated const char* sz)
     }
     return wz;
 }
-char* UnicodeToAnsi(__in __nullterminated const WCHAR* wz)
+char* UnicodeToAnsi(_In_ __nullterminated const WCHAR* wz)
 {
     char* sz = (char*)(&wzUniBuf[UNIBUF_SIZE/2]);
     if (WszWideCharToMultiByte(g_uConsoleCP,0,wz,-1,sz,UNIBUF_SIZE,NULL,NULL) == 0)
@@ -109,7 +109,7 @@ char* UnicodeToAnsi(__in __nullterminated const WCHAR* wz)
     }
     return sz;
 }
-WCHAR* AnsiToUnicode(__in __nullterminated const char* sz)
+WCHAR* AnsiToUnicode(_In_ __nullterminated const char* sz)
 {
     WCHAR* wz = wzUniBuf;
     if (WszMultiByteToWideChar(g_uConsoleCP,0,sz,-1,wz,UNIBUF_SIZE/2) == 0)
@@ -118,7 +118,7 @@ WCHAR* AnsiToUnicode(__in __nullterminated const char* sz)
     }
     return wz;
 }
-char* UnicodeToUtf(__in __nullterminated const WCHAR* wz)
+char* UnicodeToUtf(_In_ __nullterminated const WCHAR* wz)
 {
     char* sz = (char*)(&wzUniBuf[UNIBUF_SIZE/2]);
     if (WszWideCharToMultiByte(CP_UTF8,0,wz,-1,sz,UNIBUF_SIZE,NULL,NULL) == 0)
@@ -127,9 +127,9 @@ char* UnicodeToUtf(__in __nullterminated const WCHAR* wz)
     }
     return sz;
 }
-char* AnsiToUtf(__in __nullterminated const char* sz) { return UnicodeToUtf(AnsiToUnicode(sz));}
+char* AnsiToUtf(_In_ __nullterminated const char* sz) { return UnicodeToUtf(AnsiToUnicode(sz));}
 
-static void UnicodeToConsoleOrMsgBox(__in __nullterminated const WCHAR* wz)
+static void UnicodeToConsoleOrMsgBox(_In_ __nullterminated const WCHAR* wz)
 {
     {
         //DWORD dw;
@@ -139,14 +139,14 @@ static void UnicodeToConsoleOrMsgBox(__in __nullterminated const WCHAR* wz)
         printf("%s\n",UnicodeToAnsi(wz));
     }
 }
-static void UnicodeToFile(__in __nullterminated const WCHAR* wz, FILE* pF)
+static void UnicodeToFile(_In_ __nullterminated const WCHAR* wz, FILE* pF)
 {
     unsigned endofline = 0x000A000D;
     int L;
     if((L=(int)wcslen(wz))) fwrite(wz,L*sizeof(WCHAR),1,pF);
     fwrite(&endofline,4,1,pF);
 }
-static void ToGUIOrFile(__in __nullterminated const char* sz, void* GUICookie)
+static void ToGUIOrFile(_In_ __nullterminated const char* sz, void* GUICookie)
 {
     {
         if(g_fDumpRTF) fprintf((FILE*)GUICookie,"%s\\line\n",sz);
@@ -154,7 +154,7 @@ static void ToGUIOrFile(__in __nullterminated const char* sz, void* GUICookie)
     }
 }
 //------------------------------------------------------------------
-void printError(void* GUICookie, __in __nullterminated const char* string)
+void printError(void* GUICookie, _In_ __nullterminated const char* string)
 {
     {
         //DWORD dw;
@@ -166,7 +166,7 @@ void printError(void* GUICookie, __in __nullterminated const char* string)
         fprintf(stderr,"%s\n",UnicodeToAnsi(UtfToUnicode(string)));
     }
 }
-void printLine(void* GUICookie, __in __nullterminated const char* string)
+void printLine(void* GUICookie, _In_ __nullterminated const char* string)
 {
     const char* sz = string;
 
@@ -194,7 +194,7 @@ void printLine(void* GUICookie, __in __nullterminated const char* string)
     ToGUIOrFile(sz,GUICookie);
 }
 
-void printLineW(void* GUICookie, __in __nullterminated const WCHAR* string)
+void printLineW(void* GUICookie, _In_ __nullterminated const WCHAR* string)
 {
     const char* sz = (const char*)string;
 
@@ -217,8 +217,8 @@ void printLineW(void* GUICookie, __in __nullterminated const WCHAR* string)
 }
 
 char * DumpQString(void* GUICookie,
-                   __in __nullterminated const char* szToDump,
-                   __in __nullterminated const char* szPrefix,
+                   _In_ __nullterminated const char* szToDump,
+                   _In_ __nullterminated const char* szPrefix,
                    unsigned uMaxLen)
 {
     unsigned Lwt = (unsigned)strlen(szString);
@@ -555,7 +555,7 @@ char* DumpDataPtr(__inout __nullterminated char* buffer, DWORD ptr, DWORD size)
     return buffer;
 }
 
-void DumpLocals(IMDInternalImport *pImport,COR_ILMETHOD_DECODER *pMethod, __in __nullterminated char* szVarPrefix, void* GUICookie)
+void DumpLocals(IMDInternalImport *pImport,COR_ILMETHOD_DECODER *pMethod, _In_ __nullterminated char* szVarPrefix, void* GUICookie)
 {
     if (pMethod->GetLocalVarSigTok())
     {
@@ -2586,7 +2586,7 @@ struct Indx
     {
         for(int i = 1; i < 128; i++) delete ((Indx*)(table[i]));
     };
-    void IndexString(__in __nullterminated const char* psz, __out const char** pkywd)
+    void IndexString(_In_ __nullterminated const char* psz, _Out_ const char** pkywd)
     {
         int i = (int) *psz;
         if(i == 0)
@@ -2604,7 +2604,7 @@ struct Indx
             pInd->IndexString(psz+1,pkywd);
         }
     }
-    const char**  FindString(__in __nullterminated const char* psz)
+    const char**  FindString(_In_ __nullterminated const char* psz)
     {
         if(*psz == 0)
             return (const char**)(table[0]);
index 262ab39..62f5cff 100644 (file)
@@ -30,15 +30,15 @@ struct LineCodeDescr
     ULONG_PTR FileToken;
 };
 
-void printLine(void* GUICookie, __in __nullterminated const char* string);
-void printLineW(void* GUICookie, __in __nullterminated const WCHAR* string);
-void printError(void* GUICookie, __in __nullterminated const char* string);
-
-char* AnsiToUtf(__in __nullterminated const char* sz);
-char* UnicodeToAnsi(__in __nullterminated const WCHAR* wz);
-char* UnicodeToUtf(__in __nullterminated const WCHAR* wz);
-WCHAR* UtfToUnicode(__in __nullterminated const char* sz);
-WCHAR* AnsiToUnicode(__in __nullterminated const char* sz);
+void printLine(void* GUICookie, _In_ __nullterminated const char* string);
+void printLineW(void* GUICookie, _In_ __nullterminated const WCHAR* string);
+void printError(void* GUICookie, _In_ __nullterminated const char* string);
+
+char* AnsiToUtf(_In_ __nullterminated const char* sz);
+char* UnicodeToAnsi(_In_ __nullterminated const WCHAR* wz);
+char* UnicodeToUtf(_In_ __nullterminated const WCHAR* wz);
+WCHAR* UtfToUnicode(_In_ __nullterminated const char* sz);
+WCHAR* AnsiToUnicode(_In_ __nullterminated const char* sz);
 void GetInputFileFullPath();
 
 char* RstrUTF(unsigned id);
@@ -63,7 +63,7 @@ void PrettyPrintToken(__inout __nullterminated char* szString, mdToken tk, IMDIn
 void DumpPermissions(mdToken tkOwner, void* GUICookie);
 void DumpHeader(IMAGE_COR20_HEADER *CORHeader, void* GUICookie);
 void DumpHeaderDetails(IMAGE_COR20_HEADER *CORHeader, void* GUICookie);
-void DumpMetaInfo(__in __nullterminated const WCHAR* pszFileName, __in_opt __nullterminated const char* pszObjFileName, void* GUICookie);
+void DumpMetaInfo(_In_ __nullterminated const WCHAR* pszFileName, __in_opt __nullterminated const char* pszObjFileName, void* GUICookie);
 void DumpStatistics(IMAGE_COR20_HEADER *CORHeader, void* GUICookie);
 BOOL DumpFile();
 void Cleanup();
@@ -71,8 +71,8 @@ void CreateProgressBar(LONG lRange);
 BOOL ProgressStep();
 void DestroyProgressBar();
 char * DumpQString(void* GUICookie,
-                   __in __nullterminated const char* szToDump,
-                   __in __nullterminated const char* szPrefix,
+                   _In_ __nullterminated const char* szToDump,
+                   _In_ __nullterminated const char* szPrefix,
                    unsigned uMaxLen);
 void DumpVtable(void* GUICookie);
 char* DumpUnicodeString(void* GUICookie,
index 53e1ad2..b1f7f16 100644 (file)
@@ -147,7 +147,7 @@ struct ResourceNode
 
 #define RES_FILE_DUMP_ENABLED
 
-DWORD   DumpResourceToFile(__in __nullterminated WCHAR*   wzFileName)
+DWORD   DumpResourceToFile(_In_ __nullterminated WCHAR*   wzFileName)
 {
 
     BYTE*   pbResBase;
index d0f0904..7e29df8 100644 (file)
@@ -88,8 +88,8 @@ HANDLE                      hConsoleErr=NULL;
 BOOL Init();
 void Uninit();
 void Cleanup();
-void DumpMetaInfo(__in __nullterminated const WCHAR* pszFileName, __in __nullterminated const char* pszObjFileName, void* GUICookie);
-FILE* OpenOutput(__in __nullterminated const char* szFileName);
+void DumpMetaInfo(_In_ __nullterminated const WCHAR* pszFileName, _In_ __nullterminated const char* pszObjFileName, void* GUICookie);
+FILE* OpenOutput(_In_ __nullterminated const char* szFileName);
 
 void PrintLogo()
 {
@@ -124,7 +124,7 @@ char* CheckForDQuotes(__inout __nullterminated char* sz)
     return ret;
 }
 
-char* EqualOrColon(__in __nullterminated char* szArg)
+char* EqualOrColon(_In_ __nullterminated char* szArg)
 {
     char* pchE = strchr(szArg,'=');
     char* pchC = strchr(szArg,':');
@@ -150,7 +150,7 @@ void GetInputFileFullPath()
     VDELETE(wzArg);
 }
 
-int ProcessOneArg(__in __nullterminated char* szArg, __out char** ppszObjFileName)
+int ProcessOneArg(_In_ __nullterminated char* szArg, _Out_ char** ppszObjFileName)
 {
     char        szOpt[128];
     if(strlen(szArg) == 0) return 0;
@@ -418,7 +418,7 @@ int ProcessOneArg(__in __nullterminated char* szArg, __out char** ppszObjFileNam
     return 0;
 }
 
-char* UTF8toANSI(__in __nullterminated char* szUTF)
+char* UTF8toANSI(_In_ __nullterminated char* szUTF)
 {
     ULONG32 L = (ULONG32) strlen(szUTF)+16;
     WCHAR* wzUnicode = new WCHAR[L];
@@ -431,7 +431,7 @@ char* UTF8toANSI(__in __nullterminated char* szUTF)
     VDELETE(wzUnicode);
     return szANSI;
 }
-char* ANSItoUTF8(__in __nullterminated char* szANSI)
+char* ANSItoUTF8(_In_ __nullterminated char* szANSI)
 {
     ULONG32 L = (ULONG32) strlen(szANSI)+16;
     WCHAR* wzUnicode = new WCHAR[L];
@@ -445,7 +445,7 @@ char* ANSItoUTF8(__in __nullterminated char* szANSI)
     return szUTF;
 }
 
-int ParseCmdLineW(__in __nullterminated WCHAR* wzCmdLine, __out char** ppszObjFileName)
+int ParseCmdLineW(_In_ __nullterminated WCHAR* wzCmdLine, _Out_ char** ppszObjFileName)
 {
     int     argc,ret=0;
     LPWSTR* argv= SegmentCommandLine(wzCmdLine, (DWORD*)&argc);
@@ -460,7 +460,7 @@ int ParseCmdLineW(__in __nullterminated WCHAR* wzCmdLine, __out char** ppszObjFi
     return ret;
 }
 
-int ParseCmdLineA(__in __nullterminated char* szCmdLine, __out char** ppszObjFileName)
+int ParseCmdLineA(_In_ __nullterminated char* szCmdLine, _Out_ char** ppszObjFileName)
 {
     if((szCmdLine == NULL)||(*szCmdLine == 0)) return 0;
 
index 9906f4d..ca9f420 100644 (file)
@@ -35,8 +35,8 @@ protected:
         void StealDataFrom(CPillar & src);
         unsigned GetDataLen() const;
         char* GetRawDataStart();
-        BOOL Contains(__in char *ptr);
-        ULONG32 GetOffset(__in char *ptr);
+        BOOL Contains(_In_ char *ptr);
+        ULONG32 GetOffset(_In_ char *ptr);
 
     protected:
         unsigned m_nTargetSize; // when we allocate, make it this large
@@ -78,10 +78,10 @@ public:
     char * ComputePointer(unsigned offset) const;
 
 // Determine if pointer came from this fetcher
-    BOOL ContainsPointer(__in char *ptr) const;
+    BOOL ContainsPointer(_In_ char *ptr) const;
 
 // Find an offset as if this were linear
-    unsigned ComputeOffset(__in char *ptr) const;
+    unsigned ComputeOffset(_In_ char *ptr) const;
 
 // Write out the section to the stream
     HRESULT Write(HANDLE file);
@@ -126,14 +126,14 @@ inline char* CBlobFetcher::CPillar::GetRawDataStart()
     return m_dataStart;
 }
 
-inline BOOL CBlobFetcher::CPillar::Contains(__in char *ptr)
+inline BOOL CBlobFetcher::CPillar::Contains(_In_ char *ptr)
 {
     LIMITED_METHOD_CONTRACT;
 
     return ptr >= m_dataStart && ptr < m_dataCur;
 }
 
-inline ULONG32 CBlobFetcher::CPillar::GetOffset(__in char *ptr)
+inline ULONG32 CBlobFetcher::CPillar::GetOffset(_In_ char *ptr)
 {
     LIMITED_METHOD_CONTRACT;
     _ASSERTE(Contains(ptr));
index 9439185..06e20a6 100644 (file)
@@ -97,22 +97,22 @@ public:
     HRESULT clearComImageFlags(DWORD mask);
     DWORD getComImageFlags();
 
-    HRESULT setOutputFileName(__in LPWSTR outputFileName);
+    HRESULT setOutputFileName(_In_ LPWSTR outputFileName);
     LPWSTR getOutputFileName();
 
-    HRESULT setResourceFileName(__in LPWSTR resourceFileName);
+    HRESULT setResourceFileName(_In_ LPWSTR resourceFileName);
     LPWSTR getResourceFileName();
 
     HRESULT setDirectoryEntry(CeeSection &section, ULONG entry, ULONG size, ULONG offset=0);
-    HRESULT computeSectionOffset(CeeSection &section, __in char *ptr,
+    HRESULT computeSectionOffset(CeeSection &section, _In_ char *ptr,
                                  unsigned *offset);
-    HRESULT computeOffset(__in char *ptr, CeeSection **pSection,
+    HRESULT computeOffset(_In_ char *ptr, CeeSection **pSection,
                           unsigned *offset);
     HRESULT getCorHeader(IMAGE_COR20_HEADER **ppHeader);
 
     HRESULT getFileTimeStamp(DWORD *pTimeStamp);
 
-    HRESULT setLibraryGuid(__in LPWSTR libraryGuid);
+    HRESULT setLibraryGuid(_In_ LPWSTR libraryGuid);
 
     HRESULT setDllSwitch(bool dllSwitch);
     bool getDllSwitch();
index 66dfa64..03600e9 100644 (file)
@@ -111,8 +111,8 @@ class CeeSectionImpl {
     virtual HRESULT directoryEntry(unsigned num) = 0;
     virtual unsigned char * name() = 0;
     virtual char * computePointer(unsigned offset) const = 0;
-    virtual BOOL containsPointer(__in char * ptr) const = 0;
-    virtual unsigned computeOffset(__in char * ptr) const = 0;
+    virtual BOOL containsPointer(_In_ char * ptr) const = 0;
+    virtual unsigned computeOffset(_In_ char * ptr) const = 0;
     virtual unsigned getBaseRVA() = 0;
     virtual void SetInitialGrowth(unsigned growth) = 0;
 };
@@ -162,8 +162,8 @@ class CeeSection {
 
     // simulate the base + offset with a more complex data storage
     char * computePointer(unsigned offset) const;
-    BOOL containsPointer(__in char *ptr) const;
-    unsigned computeOffset(__in char *ptr) const;
+    BOOL containsPointer(_In_ char *ptr) const;
+    unsigned computeOffset(_In_ char *ptr) const;
 
     CeeSectionImpl &getImpl();
     CCeeGen &ceeFile();
@@ -222,7 +222,7 @@ class CCeeGen : public ICeeGenInternal {
         void **ppInterface);
 
     STDMETHODIMP EmitString (
-        __in LPWSTR lpString,               // [IN] String to emit
+        _In_ LPWSTR lpString,               // [IN] String to emit
         ULONG *RVA);
 
     STDMETHODIMP GetString (
@@ -369,13 +369,13 @@ inline char * CeeSection::computePointer(unsigned offset) const
     return m_impl.computePointer(offset);
 }
 
-inline BOOL CeeSection::containsPointer(__in char *ptr) const
+inline BOOL CeeSection::containsPointer(_In_ char *ptr) const
 {
     WRAPPER_NO_CONTRACT;
     return m_impl.containsPointer(ptr);
 }
 
-inline unsigned CeeSection::computeOffset(__in char *ptr) const
+inline unsigned CeeSection::computeOffset(_In_ char *ptr) const
 {
     WRAPPER_NO_CONTRACT;
     return m_impl.computeOffset(ptr);
index 4348afe..0b1c7ba 100644 (file)
@@ -131,7 +131,7 @@ public:
     static BOOL IsConfigOptionSpecified(LPCWSTR name);
 
     // Free a string returned by GetConfigValue
-    static void FreeConfigString(__in __in_z LPWSTR name);
+    static void FreeConfigString(_In_ __in_z LPWSTR name);
 
     // Initialize the configuration.
     static void Initialize();
index a833da6..a732d9e 100644 (file)
@@ -859,8 +859,8 @@ typedef struct _DISPATCHER_CONTEXT {
 FORCEINLINE
 DWORD
 RtlpGetFunctionEndAddress (
-    __in PT_RUNTIME_FUNCTION FunctionEntry,
-    __in TADDR ImageBase
+    _In_ PT_RUNTIME_FUNCTION FunctionEntry,
+    _In_ TADDR ImageBase
     )
 {
     PTR_UNWIND_INFO pUnwindInfo = (PTR_UNWIND_INFO)(ImageBase + FunctionEntry->UnwindData);
@@ -879,13 +879,13 @@ NTSYSAPI
 PEXCEPTION_ROUTINE
 NTAPI
 RtlVirtualUnwind (
-    __in DWORD HandlerType,
-    __in DWORD ImageBase,
-    __in DWORD ControlPc,
-    __in PRUNTIME_FUNCTION FunctionEntry,
+    _In_ DWORD HandlerType,
+    _In_ DWORD ImageBase,
+    _In_ DWORD ControlPc,
+    _In_ PRUNTIME_FUNCTION FunctionEntry,
     __inout PT_CONTEXT ContextRecord,
-    __out PVOID *HandlerData,
-    __out PDWORD EstablisherFrame,
+    _Out_ PVOID *HandlerData,
+    _Out_ PDWORD EstablisherFrame,
     __inout_opt PT_KNONVOLATILE_CONTEXT_POINTERS ContextPointers
     );
 #endif // HOST_X86
@@ -909,8 +909,8 @@ RtlVirtualUnwind (
 FORCEINLINE
 ULONG
 RtlpGetFunctionEndAddress (
-    __in PT_RUNTIME_FUNCTION FunctionEntry,
-    __in TADDR ImageBase
+    _In_ PT_RUNTIME_FUNCTION FunctionEntry,
+    _In_ TADDR ImageBase
     )
 {
     ULONG FunctionLength;
@@ -943,13 +943,13 @@ NTSYSAPI
 PEXCEPTION_ROUTINE
 NTAPI
 RtlVirtualUnwind (
-    __in DWORD HandlerType,
-    __in DWORD ImageBase,
-    __in DWORD ControlPc,
-    __in PT_RUNTIME_FUNCTION FunctionEntry,
+    _In_ DWORD HandlerType,
+    _In_ DWORD ImageBase,
+    _In_ DWORD ControlPc,
+    _In_ PT_RUNTIME_FUNCTION FunctionEntry,
     __inout PT_CONTEXT ContextRecord,
-    __out PVOID *HandlerData,
-    __out PDWORD EstablisherFrame,
+    _Out_ PVOID *HandlerData,
+    _Out_ PDWORD EstablisherFrame,
     __inout_opt PT_KNONVOLATILE_CONTEXT_POINTERS ContextPointers
     );
 #endif // HOST_UNIX || HOST_X86
@@ -970,8 +970,8 @@ RtlVirtualUnwind (
 FORCEINLINE
 ULONG64
 RtlpGetFunctionEndAddress (
-    __in PT_RUNTIME_FUNCTION FunctionEntry,
-    __in ULONG64 ImageBase
+    _In_ PT_RUNTIME_FUNCTION FunctionEntry,
+    _In_ ULONG64 ImageBase
     )
 {
     ULONG64 FunctionLength;
index d2e8974..bd81bba 100644 (file)
@@ -19,10 +19,10 @@ class CycleTimer
 
     // This wraps GetCycleCount64 in the signature of QueryThreadCycleTime -- but note
     // that it ignores the "thrd" argument.
-    static BOOL WINAPI DefaultQueryThreadCycleTime(__in HANDLE thrd, __out PULONG64 cyclesPtr);
+    static BOOL WINAPI DefaultQueryThreadCycleTime(_In_ HANDLE thrd, _Out_ PULONG64 cyclesPtr);
 
     // The function pointer type for QueryThreadCycleTime.
-    typedef BOOL (WINAPI *QueryThreadCycleTimeSig)(__in HANDLE, __out PULONG64);
+    typedef BOOL (WINAPI *QueryThreadCycleTimeSig)(_In_ HANDLE, _Out_ PULONG64);
 
     // Returns a function pointer for QueryThreadCycleTime, or else BadFPtr.
     static QueryThreadCycleTimeSig GetQueryThreadCycleTime();
index b769fce..62f062f 100644 (file)
 #include "safemath.h"
 #include "corerror.h"
 
-#ifndef __in
-#include <specstrings.h>
-#endif
-
 #define DACCESS_TABLE_RESOURCE "COREXTERNALDATAACCESSRESOURCE"
 
 #ifdef PAL_STDCPP_COMPAT
@@ -650,7 +646,7 @@ extern "C" {
 // These two functions are largely just for marking code
 // that is not fully converted.  DacWarning prints a debug
 // message, while DacNotImpl throws a not-implemented exception.
-void __cdecl DacWarning(__in __in_z char* format, ...);
+void __cdecl DacWarning(_In_ __in_z char* format, ...);
 void DacNotImpl(void);
 
 void    DacError(HRESULT err);
index 74d2b79..835b607 100644 (file)
@@ -822,7 +822,7 @@ namespace ETW
         friend class ETW::EnumerationLog;
 #if defined(FEATURE_EVENT_TRACE)
         static VOID SendModuleEvent(Module *pModule, DWORD dwEventOptions, BOOL bFireDomainModuleEvents=FALSE);
-        static ULONG SendModuleRange(__in Module *pModule, __in 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:
@@ -960,8 +960,8 @@ namespace ETW
     {
 #ifdef FEATURE_EVENT_TRACE
     public:
-        static VOID StrongNameVerificationStart(DWORD dwInFlags, __in LPWSTR strFullyQualifiedAssemblyName);
-        static VOID StrongNameVerificationStop(DWORD dwInFlags,ULONG result, __in LPWSTR strFullyQualifiedAssemblyName);
+        static VOID StrongNameVerificationStart(DWORD dwInFlags, _In_ LPWSTR strFullyQualifiedAssemblyName);
+        static VOID StrongNameVerificationStop(DWORD dwInFlags,ULONG result, _In_ LPWSTR strFullyQualifiedAssemblyName);
 
         static void FireFieldTransparencyComputationStart(LPCWSTR wszFieldName,
                                                           LPCWSTR wszModuleName,
@@ -1322,10 +1322,10 @@ EXTERN_C DOTNET_TRACE_CONTEXT MICROSOFT_WINDOWS_DOTNETRUNTIME_STRESS_PROVIDER_DO
 ETW_INLINE
 ULONG
 CoMofTemplate_h(
-    __in REGHANDLE RegHandle,
-    __in PCEVENT_DESCRIPTOR Descriptor,
+    _In_ REGHANDLE RegHandle,
+    _In_ PCEVENT_DESCRIPTOR Descriptor,
     __in_opt LPCGUID EventGuid,
-    __in const unsigned short  ClrInstanceID
+    _In_ const unsigned short  ClrInstanceID
     )
 {
 #define ARGUMENT_COUNT_h 1
@@ -1388,8 +1388,8 @@ public:
 FORCEINLINE
 BOOLEAN __stdcall
 McGenEventTracingEnabled(
-    __in PMCGEN_TRACE_CONTEXT EnableInfo,
-    __in PCEVENT_DESCRIPTOR EventDescriptor
+    _In_ PMCGEN_TRACE_CONTEXT EnableInfo,
+    _In_ PCEVENT_DESCRIPTOR EventDescriptor
     )
 {
 
@@ -1483,9 +1483,9 @@ struct CallStackFrame
 FORCEINLINE
 BOOLEAN __stdcall
 McGenEventProviderEnabled(
-    __in PMCGEN_TRACE_CONTEXT Context,
-    __in UCHAR Level,
-    __in ULONGLONG Keyword
+    _In_ PMCGEN_TRACE_CONTEXT Context,
+    _In_ UCHAR Level,
+    _In_ ULONGLONG Keyword
     )
 {
     if(!Context) {
index 00dab3a..052413b 100644 (file)
@@ -68,14 +68,14 @@ const char* PrettyPrintClass(
 
 bool IsNameToQuote(const char *name);
 bool IsLocalToQuote(const char *name);
-const char* UnquotedProperName(__in __nullterminated const char* name, unsigned len=(unsigned)-1);
-const char* ProperName(__in __nullterminated const char* name, bool isLocalName = false);
+const char* UnquotedProperName(_In_ __nullterminated const char* name, unsigned len=(unsigned)-1);
+const char* ProperName(_In_ __nullterminated const char* name, bool isLocalName = false);
 #define ProperLocalName(x) ProperName(x, true)
 const char* KEYWORD(__in_opt __nullterminated const char* szOrig);
 const char* COMMENT(__in_opt __nullterminated const char* szOrig);
 const char* ERRORMSG(__in_opt __nullterminated const char* szOrig);
-const char* ANCHORPT(__in __nullterminated const char* szOrig, mdToken tk);
-const char* JUMPPT(__in __nullterminated const char* szOrig, mdToken tk);
+const char* ANCHORPT(_In_ __nullterminated const char* szOrig, mdToken tk);
+const char* JUMPPT(_In_ __nullterminated const char* szOrig, mdToken tk);
 const char* SCOPE(void);
 const char* UNSCOPE(void);
 const char* LTN(void);
index 208f179..1301b73 100644 (file)
@@ -24,13 +24,13 @@ namespace FString
     // Caller of Unicode_Utf8 and Utf8_Unicode must pass in a buffer of size at least length + 1.
 
     // Scan for ASCII only string, calculate result UTF8 string length
-    HRESULT Unicode_Utf8_Length(__in_z LPCWSTR pString, __out bool * pAllAscii, __out DWORD * pLength);
+    HRESULT Unicode_Utf8_Length(__in_z LPCWSTR pString, _Out_ bool * pAllAscii, _Out_ DWORD * pLength);
 
     // Convert UNICODE string to UTF8 string. Direct/fast conversion if ASCII
     HRESULT Unicode_Utf8(__in_z LPCWSTR pString, bool allAscii, __out_z LPSTR pBuffer, DWORD length);
 
     // Scan for ASCII string, calculate result UNICODE string length
-    HRESULT Utf8_Unicode_Length(__in_z LPCSTR pString, __out bool * pAllAscii, __out DWORD * pLength);
+    HRESULT Utf8_Unicode_Length(__in_z LPCSTR pString, _Out_ bool * pAllAscii, _Out_ DWORD * pLength);
 
     // Convert UTF8 string to UNICODE. Direct/fast conversion if ASCII
     HRESULT Utf8_Unicode(__in_z LPCSTR pString, bool allAscii, __out_z LPWSTR pBuffer, DWORD length);
index ac0669a..0f5c677 100644 (file)
@@ -33,9 +33,9 @@ public:
     virtual void RealBackoutMem(void *pMem
                         , size_t dwSize
 #ifdef _DEBUG
-                        , __in __in_z const char *szFile
+                        , _In_ __in_z const char *szFile
                         , int lineNum
-                        , __in __in_z const char *szAllocFile
+                        , _In_ __in_z const char *szAllocFile
                         , int allocLineNum
 #endif
                         ) = 0;
@@ -323,13 +323,13 @@ protected:
     // allocations, it is more likely that these errors will be encountered.
     void *UnlockedAllocMem(size_t dwSize
 #ifdef _DEBUG
-                          ,__in __in_z const char *szFile
+                          ,_In_ __in_z const char *szFile
                           ,int  lineNum
 #endif
                           );
     void *UnlockedAllocMem_NoThrow(size_t dwSize
 #ifdef _DEBUG
-                                   ,__in __in_z const char *szFile
+                                   ,_In_ __in_z const char *szFile
                                    ,int  lineNum
 #endif
                                    );
@@ -363,7 +363,7 @@ protected:
                                  ,size_t  dwAlignment
                                  ,size_t *pdwExtra
 #ifdef _DEBUG
-                                 ,__in __in_z const char *szFile
+                                 ,_In_ __in_z const char *szFile
                                  ,int  lineNum
 #endif
                                  );
@@ -372,7 +372,7 @@ protected:
                                          ,size_t  dwAlignment
                                          ,size_t *pdwExtra
 #ifdef _DEBUG
-                                         ,__in __in_z const char *szFile
+                                         ,_In_ __in_z const char *szFile
                                          ,int  lineNum
 #endif
                                  );
@@ -384,9 +384,9 @@ protected:
     void UnlockedBackoutMem(void *pMem
                           , size_t dwSize
 #ifdef _DEBUG
-                          , __in __in_z const char *szFile
+                          , _In_ __in_z const char *szFile
                           , int lineNum
-                          , __in __in_z const char *szAllocFile
+                          , _In_ __in_z const char *szAllocFile
                           , int AllocLineNum
 #endif
                           );
@@ -505,7 +505,7 @@ public:
 public:
     FORCEINLINE TaggedMemAllocPtr RealAllocMem(S_SIZE_T dwSize
 #ifdef _DEBUG
-                                  ,__in __in_z const char *szFile
+                                  ,_In_ __in_z const char *szFile
                                   ,int  lineNum
 #endif
                   )
@@ -520,7 +520,7 @@ public:
 
     FORCEINLINE TaggedMemAllocPtr RealAllocMem_NoThrow(S_SIZE_T  dwSize
 #ifdef _DEBUG
-                                           ,__in __in_z const char *szFile
+                                           ,_In_ __in_z const char *szFile
                                            ,int  lineNum
 #endif
                   )
@@ -547,7 +547,7 @@ private:
 
     TaggedMemAllocPtr RealAllocMemUnsafe(size_t dwSize
 #ifdef _DEBUG
-                                  ,__in __in_z const char *szFile
+                                  ,_In_ __in_z const char *szFile
                                   ,int  lineNum
 #endif
                   )
@@ -578,7 +578,7 @@ private:
 
     TaggedMemAllocPtr RealAllocMemUnsafe_NoThrow(size_t  dwSize
 #ifdef _DEBUG
-                                           ,__in __in_z const char *szFile
+                                           ,_In_ __in_z const char *szFile
                                            ,int  lineNum
 #endif
                   )
@@ -623,7 +623,7 @@ public:
     TaggedMemAllocPtr RealAllocAlignedMem(size_t  dwRequestedSize
                                          ,size_t  dwAlignment
 #ifdef _DEBUG
-                                         ,__in __in_z const char *szFile
+                                         ,_In_ __in_z const char *szFile
                                          ,int  lineNum
 #endif
                                          )
@@ -662,7 +662,7 @@ public:
     TaggedMemAllocPtr RealAllocAlignedMem_NoThrow(size_t  dwRequestedSize
                                                  ,size_t  dwAlignment
 #ifdef _DEBUG
-                                                 ,__in __in_z const char *szFile
+                                                 ,_In_ __in_z const char *szFile
                                                  ,int  lineNum
 #endif
                                                  )
@@ -707,9 +707,9 @@ public:
     void RealBackoutMem(void *pMem
                         , size_t dwSize
 #ifdef _DEBUG
-                        , __in __in_z const char *szFile
+                        , _In_ __in_z const char *szFile
                         , int lineNum
-                        , __in __in_z const char *szAllocFile
+                        , _In_ __in_z const char *szAllocFile
                         , int allocLineNum
 #endif
                         )
@@ -786,7 +786,7 @@ public:
 public:
     void *RealAllocMem(size_t dwSize
 #ifdef _DEBUG
-                       ,__in __in_z const char *szFile
+                       ,_In_ __in_z const char *szFile
                        ,int  lineNum
 #endif
                        )
@@ -806,7 +806,7 @@ public:
 
     void *RealAllocMem_NoThrow(size_t dwSize
 #ifdef _DEBUG
-                               ,__in __in_z const char *szFile
+                               ,_In_ __in_z const char *szFile
                                ,int  lineNum
 #endif
                                )
index 085aef1..042a5df 100644 (file)
@@ -136,11 +136,11 @@ class PESection : public CeeSectionImpl {
     virtual char * computePointer(unsigned offset) const;
 
     // Checks to see if pointer is in section
-    virtual BOOL containsPointer(__in char *ptr) const;
+    virtual BOOL containsPointer(_In_ char *ptr) const;
 
     // Given a pointer pointing into this section,
     // computes an offset as if this were an array
-    virtual unsigned computeOffset(__in char *ptr) const;
+    virtual unsigned computeOffset(_In_ char *ptr) const;
 
     // Make 'destination' a copy of the current PESection
     HRESULT cloneInstance(PESection *destination);
index 4459373..4b3d13c 100644 (file)
@@ -81,7 +81,7 @@ void GetStringFromAddr(DWORD_PTR dwAddr, __out_ecount(cchMaxAssertStackLevelStri
 *       Exactly the contents of RtlCaptureContext for Win7 - Win2K doesn't
 *       support this, so we need it for CoreCLR 4, if we require Win2K support
 ****************************************************************************/
-extern "C" void __stdcall ClrCaptureContext(__out PCONTEXT ctx);
+extern "C" void __stdcall ClrCaptureContext(_Out_ PCONTEXT ctx);
 #else // HOST_X86 && !TARGET_UNIX
 #define ClrCaptureContext RtlCaptureContext
 #endif // HOST_X86 && !TARGET_UNIX
index 2c26ed7..6d687c0 100644 (file)
@@ -13,7 +13,7 @@
 
 // Holder for any memory allocated by the strong name APIs
 template<class T>
-void VoidStrongNameFreeBuffer(__in T *pBuffer)
+void VoidStrongNameFreeBuffer(_In_ T *pBuffer)
 {
     StrongNameFreeBuffer(reinterpret_cast<BYTE *>(pBuffer));
 }
index bae570f..4e683b1 100644 (file)
@@ -976,18 +976,18 @@ void    SplitPath(const WCHAR *path,
 // A much more sensible version that just points to each section of the string.
 //*******************************************************************************
 void    SplitPathInterior(
-    __in      LPCWSTR wszPath,
+    _In_      LPCWSTR wszPath,
     __out_opt LPCWSTR *pwszDrive,    __out_opt size_t *pcchDrive,
     __out_opt LPCWSTR *pwszDir,      __out_opt size_t *pcchDir,
     __out_opt LPCWSTR *pwszFileName, __out_opt size_t *pcchFileName,
     __out_opt LPCWSTR *pwszExt,      __out_opt size_t *pcchExt);
 
 
-void    MakePath(__out CQuickWSTR &path,
-                 __in LPCWSTR drive,
-                 __in LPCWSTR dir,
-                 __in LPCWSTR fname,
-                 __in LPCWSTR ext);
+void    MakePath(_Out_ CQuickWSTR &path,
+                 _In_ LPCWSTR drive,
+                 _In_ LPCWSTR dir,
+                 _In_ LPCWSTR fname,
+                 _In_ LPCWSTR ext);
 
 WCHAR * FullPath(__out_ecount (maxlen) WCHAR *UserBuf, const WCHAR *path, size_t maxlen);
 
@@ -996,7 +996,7 @@ WCHAR * FullPath(__out_ecount (maxlen) WCHAR *UserBuf, const WCHAR *path, size_t
 // SString version of the path functions.
 //
 //*****************************************************************************
-void    SplitPath(__in SString const &path,
+void    SplitPath(_In_ SString const &path,
                   __inout_opt SString *drive,
                   __inout_opt SString *dir,
                   __inout_opt SString *fname,
@@ -3469,7 +3469,7 @@ private:
 //*****************************************************************************
 // Checks if string length exceeds the specified limit
 //*****************************************************************************
-inline BOOL IsStrLongerThan(__in __in_z char* pstr, unsigned N)
+inline BOOL IsStrLongerThan(_In_ __in_z char* pstr, unsigned N)
 {
     LIMITED_METHOD_CONTRACT;
     unsigned i = 0;
@@ -3505,7 +3505,7 @@ public:
         return m_pNames == 0;
     }
 
-    AssemblyNamesList(__in LPWSTR list);
+    AssemblyNamesList(_In_ LPWSTR list);
     ~AssemblyNamesList();
 };
 
@@ -3536,7 +3536,7 @@ public:
         pNames = 0;
     }
 
-    void Init(__in __in_z LPWSTR list)
+    void Init(_In_ __in_z LPWSTR list)
     {
         WRAPPER_NO_CONTRACT;
         pNames = 0;
@@ -3545,7 +3545,7 @@ public:
 
     void Destroy();
 
-    void Insert(__in __in_z LPWSTR list);
+    void Insert(_In_ __in_z LPWSTR list);
 
     bool IsInList(LPCUTF8 methodName, LPCUTF8 className, PCCOR_SIGNATURE sig = NULL);
     bool IsInList(LPCUTF8 methodName, LPCUTF8 className, CORINFO_SIG_INFO* pSigInfo);
@@ -3565,7 +3565,7 @@ public:
         Init();
     }
 
-    MethodNamesList(__in LPWSTR list)
+    MethodNamesList(_In_ LPWSTR list)
     {
         WRAPPER_NO_CONTRACT;
         Init(list);
index 09dff5c..a033308 100644 (file)
@@ -9155,7 +9155,7 @@ void Compiler::gtDispCommonEndLine(GenTree* tree)
 //    'indentStack' may be null, in which case no indentation or arcs are printed
 //    'msg' may be null
 
-void Compiler::gtDispNode(GenTree* tree, IndentStack* indentStack, __in __in_z __in_opt const char* msg, bool isLIR)
+void Compiler::gtDispNode(GenTree* tree, IndentStack* indentStack, _In_ __in_z __in_opt const char* msg, bool isLIR)
 {
     bool printFlags = true; // always true..
 
@@ -10512,7 +10512,7 @@ extern const char* const simdIntrinsicNames[] = {
 
 void Compiler::gtDispTree(GenTree*     tree,
                           IndentStack* indentStack,                 /* = nullptr */
-                          __in __in_z __in_opt const char* msg,     /* = nullptr  */
+                          _In_ __in_z __in_opt const char* msg,     /* = nullptr  */
                           bool                             topOnly, /* = false */
                           bool                             isLIR)   /* = false */
 {
index a4c2102..7a110ee 100644 (file)
@@ -314,7 +314,7 @@ char * CBlobFetcher::ComputePointer(unsigned offset) const
 //-----------------------------------------------------------------------------
 // See if a pointer came from this blob fetcher
 //-----------------------------------------------------------------------------
-BOOL CBlobFetcher::ContainsPointer( __in char *ptr) const
+BOOL CBlobFetcher::ContainsPointer( _In_ char *ptr) const
 {
     _ASSERTE(m_pIndex);
 
@@ -337,7 +337,7 @@ BOOL CBlobFetcher::ContainsPointer( __in char *ptr) const
 //-----------------------------------------------------------------------------
 // Find a pointer as if this were linear (middle weight function)
 //-----------------------------------------------------------------------------
-unsigned CBlobFetcher::ComputeOffset(__in char *ptr) const
+unsigned CBlobFetcher::ComputeOffset(_In_ char *ptr) const
 {
     _ASSERTE(m_pIndex);
 
index adddcdd..5d985b3 100644 (file)
@@ -98,7 +98,7 @@ STDMETHODIMP CCeeGen::SetInitialGrowth(DWORD growth)
     return S_OK;
 }
 
-STDMETHODIMP CCeeGen::EmitString (__in LPWSTR lpString, ULONG *RVA)
+STDMETHODIMP CCeeGen::EmitString (_In_ LPWSTR lpString, ULONG *RVA)
 {
     HRESULT hr = S_OK;
     BEGIN_ENTRYPOINT_NOTHROW;
index a75558b..e5b1111 100644 (file)
@@ -281,14 +281,14 @@ char * PESection::computePointer(unsigned offset) const // virtual
 }
 
 /******************************************************************/
-BOOL PESection::containsPointer(__in char *ptr) const // virtual
+BOOL PESection::containsPointer(_In_ char *ptr) const // virtual
 {
     return m_blobFetcher.ContainsPointer(ptr);
 }
 
 /******************************************************************/
 // Compute an offset (wrap blobfetcher)
-unsigned PESection::computeOffset(__in char *ptr) const // virtual
+unsigned PESection::computeOffset(_In_ char *ptr) const // virtual
 {
     return m_blobFetcher.ComputeOffset(ptr);
 }
index 44acdf6..d0cbb37 100644 (file)
@@ -811,20 +811,20 @@ ErrExit:
 #define STRING_BUFFER_LEN 1024
 #define ENUM_BUFFER_SIZE 10
 
-int DumpMD_Write(__in __in_z const char *str)
+int DumpMD_Write(_In_ __in_z const char *str)
 {
     OutputDebugStringA(str);
     return 0; // strlen(str);
 } // int DumpMD_Write()
 
-int DumpMD_WriteLine(__in __in_z const char *str)
+int DumpMD_WriteLine(_In_ __in_z const char *str)
 {
     OutputDebugStringA(str);
     OutputDebugStringA("\n");
     return 0; // strlen(str);
 } // int DumpMD_Write()
 
-int DumpMD_VWriteMarker(__in __in_z const char *str, va_list marker)
+int DumpMD_VWriteMarker(_In_ __in_z const char *str, va_list marker)
 {
     CQuickBytes m_output;
 
@@ -846,7 +846,7 @@ int DumpMD_VWriteMarker(__in __in_z const char *str, va_list marker)
     return count;
 } // int DumpMD_VWriteMarker()
 
-int DumpMD_VWrite(__in __in_z const char *str, ...)
+int DumpMD_VWrite(_In_ __in_z const char *str, ...)
 {
     va_list marker;
     int     count;
@@ -857,7 +857,7 @@ int DumpMD_VWrite(__in __in_z const char *str, ...)
     return count;
 } // int DumpMD_VWrite()
 
-int DumpMD_VWriteLine(__in __in_z const char *str, ...)
+int DumpMD_VWriteLine(_In_ __in_z const char *str, ...)
 {
     va_list marker;
     int     count;
index 40315d2..19a2faf 100644 (file)
@@ -1354,19 +1354,19 @@ public:
     // Returns S_OK or error code. Fills *pcbStringsHeapSize with 0 on error.
     // Implements public API code:IMetaDataTables::GetStringHeapSize.
     STDMETHODIMP GetStringHeapSize(
-        __out ULONG *pcbStringsHeapSize);       // [OUT] Size of the string heap.
+        _Out_ ULONG *pcbStringsHeapSize);       // [OUT] Size of the string heap.
 
     // Fills size (*pcbBlobsHeapSize) of blobs heap (#Blob).
     // Returns S_OK or error code. Fills *pcbBlobsHeapSize with 0 on error.
     // Implements public API code:IMetaDataTables::GetBlobHeapSize.
     STDMETHODIMP GetBlobHeapSize(
-        __out ULONG *pcbBlobsHeapSize);         // [OUT] Size of the blob heap.
+        _Out_ ULONG *pcbBlobsHeapSize);         // [OUT] Size of the blob heap.
 
     // Fills size (*pcbGuidsHeapSize) of guids heap (#GUID).
     // Returns S_OK or error code. Fills *pcbGuidsHeapSize with 0 on error.
     // Implements public API code:IMetaDataTables::GetGuidHeapSize.
     STDMETHODIMP GetGuidHeapSize(
-        __out ULONG *pcbGuidsHeapSize);         // [OUT] Size of the Guid heap.
+        _Out_ ULONG *pcbGuidsHeapSize);         // [OUT] Size of the Guid heap.
 
     // Fills size (*pcbUserStringsHeapSize) of user strings heap (#US) (referenced from IL).
     // Returns S_OK or error code. Fills *pcbUserStringsHeapSize with 0 on error.
@@ -1374,16 +1374,16 @@ public:
     // Backward compatibility: returns S_OK even if the string doesn't have odd number of bytes as specified
     // in CLI ECMA specification.
     STDMETHODIMP GetUserStringHeapSize(
-        __out ULONG *pcbUserStringsHeapSize);   // [OUT] Size of the user string heap.
+        _Out_ ULONG *pcbUserStringsHeapSize);   // [OUT] Size of the user string heap.
 
     // Implements public API code:IMetaDataTables::GetNumTables.
     STDMETHODIMP GetNumTables(
-        __out ULONG *pcTables);         // [OUT] Count of tables.
+        _Out_ ULONG *pcTables);         // [OUT] Count of tables.
 
     // Implements public API code:IMetaDataTables::GetNumTables.
     STDMETHODIMP GetTableIndex(
               ULONG  token,             // [IN] Token for which to get table index.
-        __out ULONG *pixTbl);           // [OUT] Put table index here.
+        _Out_ ULONG *pixTbl);           // [OUT] Put table index here.
 
     // Implements public API code:IMetaDataTables::GetTableInfo.
     STDMETHODIMP GetTableInfo(
@@ -1458,7 +1458,7 @@ public:
     // Implements public API code:IMetaDataTables::GetUserString.
     STDMETHODIMP GetUserString(
                         ULONG        ixUserString,  // [IN] Value from a UserString column.
-        __out           ULONG       *pcbData,       // [OUT] Put size of the UserString here.
+        _Out_           ULONG       *pcbData,       // [OUT] Put size of the UserString here.
         __deref_out_opt const void **ppData);       // [OUT] Put a pointer to the UserString here.
 
     //#GetNextString_IMetaDataTables
@@ -1468,7 +1468,7 @@ public:
     // Implements public API code:IMetaDataTables::.GetNextString.
     STDMETHODIMP GetNextString(
               ULONG  ixString,                  // [IN] Value from a string column.
-        __out ULONG *pixNextString);            // [OUT] Put the index of the next string here.
+        _Out_ ULONG *pixNextString);            // [OUT] Put the index of the next string here.
 
     //#GetNextBlob_IMetaDataTables
     // Fills index of blob (*pixNextBlob) from the blobs heap (#Blob) starting behind blob at index ixBlob.
@@ -1476,7 +1476,7 @@ public:
     // Implements public API code:IMetaDataTables::GetNextString.
     STDMETHODIMP GetNextBlob(
               ULONG  ixBlob,                    // [IN] Value from a blob column.
-        __out ULONG *pixNextBlob);              // [OUT] Put the index of the next blob here.
+        _Out_ ULONG *pixNextBlob);              // [OUT] Put the index of the next blob here.
 
     //#GetNextGuid_IMetaDataTables
     // Fills index of guid (*pixNextGuid) from the guids heap (#GUID) starting behind guid at index ixGuid.
@@ -1486,7 +1486,7 @@ public:
     // specified in CLI ECMA specification.
     STDMETHODIMP GetNextGuid(
               ULONG  ixGuid,                    // [IN] Value from a guid column.
-        __out ULONG *pixNextGuid);              // [OUT] Put the index of the next guid here.
+        _Out_ ULONG *pixNextGuid);              // [OUT] Put the index of the next guid here.
 
     //#GetNextUserString_IMetaDataTables
     // Fills index of user string (*pixNextUserString) from the user strings heap (#US) starting behind string
@@ -1497,7 +1497,7 @@ public:
     // in CLI ECMA specification.
     STDMETHODIMP GetNextUserString(
               ULONG  ixUserString,              // [IN] Value from a UserString column.
-        __out ULONG *ixpNextUserString);        // [OUT] Put the index of the next user string here.
+        _Out_ ULONG *ixpNextUserString);        // [OUT] Put the index of the next user string here.
 
     // Implements public API code:IMetaDataTables2::GetMetaDataStorage.
     STDMETHODIMP GetMetaDataStorage(
index b00dcaa..b34e181 100644 (file)
@@ -46,7 +46,7 @@
 //
 HRESULT
 RegMeta::GetStringHeapSize(
-    __out ULONG *pcbStringsHeapSize)    // [OUT] Size of the string heap.
+    _Out_ ULONG *pcbStringsHeapSize)    // [OUT] Size of the string heap.
 {
     HRESULT hr = S_OK;
     BEGIN_ENTRYPOINT_NOTHROW;
@@ -65,7 +65,7 @@ RegMeta::GetStringHeapSize(
 //
 HRESULT
 RegMeta::GetBlobHeapSize(
-    __out ULONG *pcbBlobsHeapSize)  // [OUT] Size of the blob heap.
+    _Out_ ULONG *pcbBlobsHeapSize)  // [OUT] Size of the blob heap.
 {
     HRESULT hr = S_OK;
     BEGIN_ENTRYPOINT_NOTHROW;
@@ -84,7 +84,7 @@ RegMeta::GetBlobHeapSize(
 //
 HRESULT
 RegMeta::GetGuidHeapSize(
-    __out ULONG *pcbGuidsHeapSize)      // [OUT] Size of the Guid heap.
+    _Out_ ULONG *pcbGuidsHeapSize)      // [OUT] Size of the Guid heap.
 {
     HRESULT hr = S_OK;
     BEGIN_ENTRYPOINT_NOTHROW;
@@ -103,7 +103,7 @@ RegMeta::GetGuidHeapSize(
 //
 HRESULT
 RegMeta::GetUserStringHeapSize(
-    __out ULONG *pcbUserStringsHeapSize)    // [OUT] Size of the user string heap.
+    _Out_ ULONG *pcbUserStringsHeapSize)    // [OUT] Size of the user string heap.
 {
     HRESULT hr = S_OK;
     BEGIN_ENTRYPOINT_NOTHROW;
@@ -152,7 +152,7 @@ Exit:
 //
 HRESULT RegMeta::GetBlob(
                 ULONG        ixBlob,        // [IN] Value from a blob column.
-    __out       ULONG       *pcbDataSize,   // [OUT] Put size of the blob here.
+    _Out_       ULONG       *pcbDataSize,   // [OUT] Put size of the blob here.
     __deref_out const void **ppvData)       // [OUT] Put a pointer to the blob here.
 {
     HRESULT hr = S_OK;
@@ -225,7 +225,7 @@ ErrExit:
 HRESULT
 RegMeta::GetUserString(
                     ULONG        ixUserString,      // [IN] Value from a UserString column.
-    __out           ULONG       *pcbDataSize,       // [OUT] Put size of the UserString here.
+    _Out_           ULONG       *pcbDataSize,       // [OUT] Put size of the UserString here.
     __deref_out_opt const void **ppvData)           // [OUT] Put a pointer to the UserString here.
 {
     HRESULT hr = S_OK;
@@ -259,7 +259,7 @@ Exit:
 HRESULT
 RegMeta::GetNextString(
           ULONG  ixString,        // [IN] Value from a string column.
-    __out ULONG *pixNextString)   // [OUT] Put the index of the next string here.
+    _Out_ ULONG *pixNextString)   // [OUT] Put the index of the next string here.
 {
     HRESULT hr = S_OK;
     BEGIN_ENTRYPOINT_NOTHROW;
@@ -307,7 +307,7 @@ Exit:
 HRESULT
 RegMeta::GetNextBlob(
           ULONG  ixBlob,        // [IN] Value from a blob column.
-    __out ULONG *pixNextBlob)   // [OUT] Put the index of the next blob here.
+    _Out_ ULONG *pixNextBlob)   // [OUT] Put the index of the next blob here.
 {
     HRESULT hr = S_OK;
     BEGIN_ENTRYPOINT_NOTHROW;
@@ -358,7 +358,7 @@ Exit:
 HRESULT
 RegMeta::GetNextGuid(
           ULONG  ixGuid,            // [IN] Value from a guid column.
-    __out ULONG *pixNextGuid)       // [OUT] Put the index of the next guid here.
+    _Out_ ULONG *pixNextGuid)       // [OUT] Put the index of the next guid here.
 {
     HRESULT hr = S_OK;
     BEGIN_ENTRYPOINT_NOTHROW;
@@ -402,7 +402,7 @@ Exit:
 HRESULT
 RegMeta::GetNextUserString(
           ULONG  ixUserString,          // [IN] Value from a UserString column.
-    __out ULONG *pixNextUserString)     // [OUT] Put the index of the next user string here.
+    _Out_ ULONG *pixNextUserString)     // [OUT] Put the index of the next user string here.
 {
     HRESULT hr = S_OK;
     BEGIN_ENTRYPOINT_NOTHROW;
@@ -445,7 +445,7 @@ Exit:
 //
 HRESULT
 RegMeta::GetNumTables(
-    __out ULONG *pcTables)  // [OUT] Count of tables.
+    _Out_ ULONG *pcTables)  // [OUT] Count of tables.
 {
     BEGIN_ENTRYPOINT_NOTHROW;
 
@@ -465,7 +465,7 @@ RegMeta::GetNumTables(
 HRESULT
 RegMeta::GetTableIndex(
           ULONG  token,     // [IN] Token for which to get table index.
-    __out ULONG *pixTbl)    // [OUT] Put table index here.
+    _Out_ ULONG *pixTbl)    // [OUT] Put table index here.
 {
     BEGIN_ENTRYPOINT_NOTHROW;
 
index e6ee51a..7d2159f 100644 (file)
@@ -68,7 +68,7 @@ public:
     __success(return)
     static inline BOOL GetEncodingSize(
               UINT32  nValue,
-        __out UINT32 *pcbEncodingSize);
+        _Out_ UINT32 *pcbEncodingSize);
     // Returns TRUE if the value (nValue) fits into 1-byte, 2-bytes or 4-bytes encoding and fills
     // *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
@@ -76,8 +76,8 @@ public:
     __success(return)
     static inline BOOL Encode(
               UINT32  nValue,
-        __out UINT32 *pnEncodedValue,
-        __out UINT32 *pcbEncodingSize);
+        _Out_ UINT32 *pnEncodedValue,
+        _Out_ UINT32 *pcbEncodingSize);
 
 };  // class CompressedInteger
 
index acdc504..384b1b2 100644 (file)
@@ -30,7 +30,7 @@ inline
 BOOL
 CompressedInteger::GetEncodingSize(
           UINT32  nValue,
-    __out UINT32 *pcbEncodingSize)
+    _Out_ UINT32 *pcbEncodingSize)
 {
     // Does it fit into 1-byte encoding?
     if (nValue <= const_Max1Byte)
@@ -67,8 +67,8 @@ inline
 BOOL
 CompressedInteger::Encode(
           UINT32  nValue,
-    __out UINT32 *pnEncodedValue,
-    __out UINT32 *pcbEncodingSize)
+    _Out_ UINT32 *pnEncodedValue,
+    _Out_ UINT32 *pcbEncodingSize)
 {
     // Does it fit into 1-byte encoding?
     if (nValue <= const_Max1Byte)
index ed8c949..01d16f7 100644 (file)
@@ -65,19 +65,19 @@ public:
     // 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 __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;
+    __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 __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);
+    __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.
@@ -89,8 +89,8 @@ public:
     __checkReturn
     __success(return)
     inline BOOL PeekCompressedU(
-        __out UINT32 *pnValue,
-        __out UINT32 *pcbCompressedValueSize);
+        _Out_ UINT32 *pnValue,
+        _Out_ UINT32 *pcbCompressedValueSize);
     // Reads compressed integer (1, 2 or 4 bytes of format code:CompressedInteger#Format) from the data blob
     // and skips the read data.
     // Returns FALSE if there's not enough data in the blob or the compression is invalid (starts with byte
@@ -98,7 +98,7 @@ public:
     // Returns TRUE otherwise, fills *pnValue and moves the memory block behind the read data.
     __checkReturn
     __success(return)
-    inline BOOL GetCompressedU(__out UINT32 *pnValue);
+    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 FALSE if there's not enough data in the blob or the compression is invalid (starts with byte
@@ -109,8 +109,8 @@ public:
     __checkReturn
     __success(return)
     inline BOOL GetCompressedU(
-        __out UINT32 *pnValue,
-        __out UINT32 *pcbCompressedValueSize);
+        _Out_ UINT32 *pnValue,
+        _Out_ UINT32 *pcbCompressedValueSize);
 
     // Reads data of size cbDataSize and skips the data (instead of reading the bytes, returns the data as
     // *pData).
@@ -121,7 +121,7 @@ public:
     __success(return)
     inline BOOL GetDataOfSize(
               UINT32    cbDataSize,
-        __out DataBlob *pData);
+        _Out_ DataBlob *pData);
 
     // Checks if there's at least cbDataSize bytes in the represented memory block.
     // Returns TRUE if there's >= cbDataSize bytes. Returns FALSE otherwise.
@@ -210,7 +210,7 @@ public:
     // Returns TRUE on success and moves memory block behind the written data.
     __checkReturn
     __success(return)
-    inline BOOL StoreData(__in const DataBlob *pSource);
+    inline BOOL StoreData(_In_ const DataBlob *pSource);
 
 private:
     //
index 5f55af6..3925787 100644 (file)
@@ -107,7 +107,7 @@ __checkReturn
 _Success_(return)
 inline
 BOOL
-DataBlob::PeekU1(__out BYTE *pnValue) const
+DataBlob::PeekU1(_Out_ BYTE *pnValue) const
 {
     if (m_cbSize < sizeof(BYTE))
     {
@@ -125,7 +125,7 @@ __checkReturn
 _Success_(return)
 inline
 BOOL
-DataBlob::PeekU2(__out UINT16 *pnValue) const
+DataBlob::PeekU2(_Out_ UINT16 *pnValue) const
 {
     if (m_cbSize < sizeof(UINT16))
     {
@@ -143,7 +143,7 @@ __checkReturn
 _Success_(return)
 inline
 BOOL
-DataBlob::PeekU4(__out UINT32 *pnValue) const
+DataBlob::PeekU4(_Out_ UINT32 *pnValue) const
 {
     if (m_cbSize < sizeof(UINT32))
     {
@@ -161,7 +161,7 @@ __checkReturn
 _Success_(return)
 inline
 BOOL
-DataBlob::PeekU8(__out UINT64 *pnValue) const
+DataBlob::PeekU8(_Out_ UINT64 *pnValue) const
 {
     if (m_cbSize < sizeof(UINT64))
     {
@@ -188,7 +188,7 @@ __checkReturn
 _Success_(return)
 inline
 BOOL
-DataBlob::GetU1(__out BYTE *pnValue)
+DataBlob::GetU1(_Out_ BYTE *pnValue)
 {
     if (m_cbSize < sizeof(BYTE))
     {
@@ -207,7 +207,7 @@ __checkReturn
 _Success_(return)
 inline
 BOOL
-DataBlob::GetU2(__out UINT16 *pnValue)
+DataBlob::GetU2(_Out_ UINT16 *pnValue)
 {
     if (m_cbSize < sizeof(UINT16))
     {
@@ -226,7 +226,7 @@ __checkReturn
 _Success_(return)
 inline
 BOOL
-DataBlob::GetU4(__out UINT32 *pnValue)
+DataBlob::GetU4(_Out_ UINT32 *pnValue)
 {
     if (m_cbSize < sizeof(UINT32))
     {
@@ -245,7 +245,7 @@ __checkReturn
 _Success_(return)
 inline
 BOOL
-DataBlob::GetU8(__out UINT64 *pnValue)
+DataBlob::GetU8(_Out_ UINT64 *pnValue)
 {
     if (m_cbSize < sizeof(UINT64))
     {
@@ -267,7 +267,7 @@ DataBlob::GetU8(__out UINT64 *pnValue)
 __checkReturn
 inline
 BOOL
-DataBlob::GetCompressedU(__out UINT32 *pnValue)
+DataBlob::GetCompressedU(_Out_ UINT32 *pnValue)
 {
     UINT32 cbCompressedValueSize_Ignore;
     return GetCompressedU(pnValue, &cbCompressedValueSize_Ignore);
@@ -288,8 +288,8 @@ _Success_(return)
 inline
 BOOL
 DataBlob::PeekCompressedU(
-    __out UINT32 *pnValue,
-    __out UINT32 *pcbCompressedValueSize)
+    _Out_ UINT32 *pnValue,
+    _Out_ UINT32 *pcbCompressedValueSize)
 {
     // This algorithm has to be in sync with code:CompressedInteger#Format encoding definition.
     //
@@ -359,8 +359,8 @@ __checkReturn
 inline
 BOOL
 DataBlob::GetCompressedU(
-    __out UINT32 *pnValue,
-    __out UINT32 *pcbCompressedValueSize)
+    _Out_ UINT32 *pnValue,
+    _Out_ UINT32 *pcbCompressedValueSize)
 {
     // Read the compressed integer from withou skipping the read data
     BOOL fReadResult = PeekCompressedU(
@@ -389,7 +389,7 @@ inline
 BOOL
 DataBlob::GetDataOfSize(
           UINT32    cbDataSize,
-    __out DataBlob *pData)
+    _Out_ DataBlob *pData)
 {
     if (m_cbSize < cbDataSize)
     {   // There's not enough data in the memory block
@@ -544,7 +544,7 @@ DataBlob::StoreCompressedU(UINT32 nValue)
 __checkReturn
 inline
 BOOL
-DataBlob::StoreData(__in const DataBlob *pSource)
+DataBlob::StoreData(_In_ const DataBlob *pSource)
 {
     // Check that we have enough space to store the *pSource data
     if (m_cbSize < pSource->m_cbSize)
index c051bb4..0e4960a 100644 (file)
@@ -1612,7 +1612,7 @@ HRESULT MDInternalRW::GetCustomAttributeByName( // S_OK or error.
     mdToken     tkObj,                  // [IN] Object with Custom Attribute.
     LPCUTF8     szName,                 // [IN] Name of desired Custom Attribute.
     __deref_out_bcount(*pcbData) const void  **ppData, // [OUT] Put pointer to data here.
-    __out ULONG *pcbData)               // [OUT] Put size of data here.
+    _Out_ ULONG *pcbData)               // [OUT] Put size of data here.
 {
     HRESULT hr = S_OK;
     LOCKREADIFFAILRET();
index 435a7a8..9f6e865 100644 (file)
@@ -47,7 +47,7 @@ TiggerStorage::~TiggerStorage()
 HRESULT
 TiggerStorage::Init(
     StgIO            *pStgIO,       // The I/O subsystem.
-    __in __in_z LPSTR pVersion)     // 'Compiled for' CLR version
+    _In_ __in_z LPSTR pVersion)     // 'Compiled for' CLR version
 {
     PSTORAGESIGNATURE pSig;         // Signature data for file.
     ULONG             cbData;       // Offset of header data.
@@ -508,7 +508,7 @@ TiggerStorage::OpenStorage(
     const OLECHAR * wcsName,
     IStorage *      pStgPriority,
     DWORD           dwMode,
-  __in
+  _In_
     SNB             snbExclude,
     DWORD           reserved,
     IStorage **     ppStg)
@@ -520,7 +520,7 @@ HRESULT STDMETHODCALLTYPE
 TiggerStorage::CopyTo(
     DWORD       cIidExclude,
     const IID * rgIidExclude,
-  __in
+  _In_
     SNB         snbExclude,
     IStorage *  pStgDest)
 {
@@ -706,7 +706,7 @@ TiggerStorage::Write(
 HRESULT
 TiggerStorage::FindStream(
     LPCSTR                szName,
-    __out PSTORAGESTREAM *stream)
+    _Out_ PSTORAGESTREAM *stream)
 {
     *stream = NULL;
     // In read mode, just walk the list and return one.
index cfa68c7..a3a643e 100644 (file)
@@ -65,7 +65,7 @@ public:
     __checkReturn
     inline HRESULT GetBlob(
               UINT32    nIndex,
-        __out DataBlob *pData)
+        _Out_ DataBlob *pData)
     {
         return m_BlobPool.GetBlob(nIndex, pData);
     }
@@ -176,7 +176,7 @@ public:
     __checkReturn
     inline HRESULT GetBlob(
               UINT32    nIndex,
-        __out DataBlob *pData)
+        _Out_ DataBlob *pData)
     {
         return m_BlobPool.GetBlob(nIndex, pData);
     }
@@ -190,7 +190,7 @@ public:
     __checkReturn
     inline HRESULT GetBlobWithSizePrefix(
               UINT32    nIndex,
-        __out DataBlob *pData)
+        _Out_ DataBlob *pData)
     {
         return m_BlobPool.GetBlobWithSizePrefix(nIndex, pData);
     }
@@ -204,7 +204,7 @@ public:
     // Fills *pcbSize with 0 on error.
     __checkReturn
     inline HRESULT GetAlignedSize(
-        __out UINT32 *pcbSize) const
+        _Out_ UINT32 *pcbSize) const
     {
         return m_BlobPool.GetSaveSize(pcbSize);
     }
@@ -224,7 +224,7 @@ public:
     __checkReturn
     HRESULT SaveToStream_Aligned(
              UINT32   nStartIndex,
-        __in IStream *pStream) const
+        _In_ IStream *pStream) const
     {
         if (nStartIndex == 0)
         {
@@ -249,7 +249,7 @@ public:
     __checkReturn
     inline HRESULT AddBlob(
               DataBlob data,
-        __out UINT32  *pnIndex)
+        _Out_ UINT32  *pnIndex)
     {
         return m_BlobPool.AddBlob(&data, pnIndex);
     }
@@ -298,7 +298,7 @@ public:
     // Gets size (in bytes) aligned to 4-bytes of adds made from the beginning of the last EnC session.
     __checkReturn
     inline HRESULT GetEnCSessionAddedHeapSize_Aligned(
-        __out UINT32 *pcbSize) const
+        _Out_ UINT32 *pcbSize) const
     {
         if (m_BlobPool.HaveEdits())
         {
index 0311617..7b49fa3 100644 (file)
@@ -205,7 +205,7 @@ public:
 
     __checkReturn
     inline HRESULT SaveToStream(
-        __in IStream *pStream) const
+        _In_ IStream *pStream) const
     {
         return const_cast<StgGuidPool &>(m_GuidPool).PersistToStream(pStream);
     }
@@ -220,8 +220,8 @@ public:
     // Returns error code otherwise (and fills *pnIndex with 0 - an invalid GUID index).
     __checkReturn
     inline HRESULT AddGuid(
-        __in  const GUID *pGuid,
-        __out UINT32     *pnIndex)
+        _In_  const GUID *pGuid,
+        _Out_ UINT32     *pnIndex)
     {
         return m_GuidPool.AddGuid(pGuid, pnIndex);
     }
index e7b9222..8fde8fd 100644 (file)
@@ -172,7 +172,7 @@ public:
     // Fills *pcbSize with 0 on error.
     __checkReturn
     inline HRESULT GetAlignedSize(
-        __out UINT32 *pcbSize) const
+        _Out_ UINT32 *pcbSize) const
     {
         return m_StringPool.GetSaveSize(pcbSize);
     }
@@ -192,7 +192,7 @@ public:
     __checkReturn
     inline HRESULT SaveToStream_Aligned(
              UINT32   nStartIndex,
-        __in IStream *pStream) const
+        _In_ IStream *pStream) const
     {
         if (nStartIndex == 0)
         {
@@ -220,7 +220,7 @@ public:
     __checkReturn
     inline HRESULT AddString(
         __in_z LPCSTR  szString,
-        __out  UINT32 *pnIndex)
+        _Out_  UINT32 *pnIndex)
     {
         return m_StringPool.AddString(szString, pnIndex);
     }
@@ -230,7 +230,7 @@ public:
     __checkReturn
     inline HRESULT AddStringW(
         __in_z LPCWSTR wszString,
-        __out  UINT32 *pnIndex)
+        _Out_  UINT32 *pnIndex)
     {
         return m_StringPool.AddStringW(wszString, pnIndex);
     }
@@ -281,7 +281,7 @@ public:
     // Gets size (in bytes) aligned to 4-bytes of adds made from the beginning of the last EnC session.
     __checkReturn
     inline HRESULT GetEnCSessionAddedHeapSize_Aligned(
-        __out UINT32 *pcbSize) const
+        _Out_ UINT32 *pcbSize) const
     {
         if (m_StringPool.HaveEdits())
         {
index 56845d2..90191e7 100644 (file)
@@ -659,7 +659,7 @@ protected:
     // Primitives -- these must be implemented in the Impl class.
 public:
     __checkReturn
-    FORCEINLINE HRESULT getString(UINT32 nIndex, __out LPCSTR *pszString)
+    FORCEINLINE HRESULT getString(UINT32 nIndex, _Out_ LPCSTR *pszString)
     {
         MINIMD_POSSIBLE_INTERNAL_POINTER_EXPOSED();
         return static_cast<Impl*>(this)->Impl_GetString(nIndex, pszString);
@@ -677,7 +677,7 @@ public:
         return static_cast<Impl*>(this)->Impl_GetGuid(nIndex, pGuid);
     }
     __checkReturn
-    FORCEINLINE HRESULT getBlob(UINT32 nIndex, __out MetaData::DataBlob *pData)
+    FORCEINLINE HRESULT getBlob(UINT32 nIndex, _Out_ MetaData::DataBlob *pData)
     {
         MINIMD_POSSIBLE_INTERNAL_POINTER_EXPOSED();
         return static_cast<Impl*>(this)->Impl_GetBlob(nIndex, pData);
@@ -694,7 +694,7 @@ public:
               RID          nRowIndex,
               CMiniColDef &columnDefinition,
               UINT32       nTargetTableIndex,
-        __out RID         *pEndRid)
+        _Out_ RID         *pEndRid)
     {
         MINIMD_POSSIBLE_INTERNAL_POINTER_EXPOSED();
         return static_cast<Impl*>(this)->Impl_GetEndRidForColumn(nTableIndex, nRowIndex, columnDefinition, nTargetTableIndex, pEndRid);
index 9df8e01..e64821e 100644 (file)
@@ -85,7 +85,7 @@ protected:
     //*************************************************************************
     // Overridables -- must be provided in derived classes.
     __checkReturn
-    FORCEINLINE HRESULT Impl_GetString(UINT32 nIndex, __out LPCSTR *pszString)
+    FORCEINLINE HRESULT Impl_GetString(UINT32 nIndex, _Out_ LPCSTR *pszString)
     { return m_StringHeap.GetString(nIndex, pszString); }
     __checkReturn
     HRESULT Impl_GetStringW(ULONG ix, __inout_ecount (cchBuffer) LPWSTR szOut, ULONG cchBuffer, ULONG *pcchBuffer);
@@ -103,7 +103,7 @@ protected:
         return S_OK;
     }
     __checkReturn
-    FORCEINLINE HRESULT Impl_GetBlob(UINT32 nIndex, __out MetaData::DataBlob *pData)
+    FORCEINLINE HRESULT Impl_GetBlob(UINT32 nIndex, _Out_ MetaData::DataBlob *pData)
     { return m_BlobHeap.GetBlob(nIndex, pData); }
 
     __checkReturn
index a8ccf8a..fe0b0ac 100644 (file)
@@ -1139,7 +1139,7 @@ protected:
     //*************************************************************************
     // Overridables -- must be provided in derived classes.
     __checkReturn
-    FORCEINLINE HRESULT Impl_GetString(UINT32 nIndex, __out LPCSTR *pszString)
+    FORCEINLINE HRESULT Impl_GetString(UINT32 nIndex, _Out_ LPCSTR *pszString)
     { return m_StringHeap.GetString(nIndex, pszString); }
     __checkReturn
     HRESULT Impl_GetStringW(ULONG ix, __inout_ecount (cchBuffer) LPWSTR szOut, ULONG cchBuffer, ULONG *pcchBuffer);
@@ -1158,7 +1158,7 @@ protected:
     }
 
     __checkReturn
-    FORCEINLINE HRESULT Impl_GetBlob(ULONG nIndex, __out MetaData::DataBlob *pData)
+    FORCEINLINE HRESULT Impl_GetBlob(ULONG nIndex, _Out_ MetaData::DataBlob *pData)
     { return m_BlobHeap.GetBlob(nIndex, pData); }
 
     __checkReturn
index d445d5e..15d0253 100644 (file)
@@ -87,7 +87,7 @@ public:
 //*****************************************************************************
     HRESULT Init(                           // Return code.
         StgIO       *pStgIO,                // The I/O subsystem.
-        __in __in_z LPSTR       pVersion);  // Compiler-supplied CLR version
+        _In_ __in_z LPSTR       pVersion);  // Compiler-supplied CLR version
 
 //*****************************************************************************
 // Retrieves a the size and a pointer to the extra data that can optionally be
@@ -132,7 +132,7 @@ public:
 // This is not good enough to fulfill ACID props, but it ain't that bad.
 //*****************************************************************************
     HRESULT Restore(                        // Return code.
-        __in __in_z LPWSTR szBackup,        // If non-0, backup the file.
+        _In_ __in_z LPWSTR szBackup,        // If non-0, backup the file.
         int         bDeleteOnSuccess);      // Delete backup file if successful.
 
 //*****************************************************************************
@@ -209,7 +209,7 @@ public:
         const OLECHAR * wcsName,
         IStorage *      pStgPriority,
         DWORD           dwMode,
-      __in
+      _In_
         SNB             snbExclude,
         DWORD           reserved,
         IStorage **     ppStg);
@@ -217,7 +217,7 @@ public:
     virtual HRESULT STDMETHODCALLTYPE CopyTo(
         DWORD       cIidExclude,
         const IID * rgIidExclude,
-      __in
+      _In_
         SNB         snbExclude,
         IStorage *  pStgDest);
 
@@ -284,7 +284,7 @@ protected:
         ULONG       *pcbWritten);       // How much did we write.
 
 private:
-    HRESULT FindStream(LPCSTR szName, __out PSTORAGESTREAM *stream);
+    HRESULT FindStream(LPCSTR szName, _Out_ PSTORAGESTREAM *stream);
     HRESULT WriteSignature(LPCSTR pVersion);
     HRESULT VerifySignature(PSTORAGESIGNATURE pSig);
     HRESULT ReadHeader();
index 7f8005a..9c0df99 100644 (file)
@@ -721,7 +721,7 @@ HRESULT MDInternalRO::GetCustomAttributeByName( // S_OK or error.
     mdToken     tkObj,                  // [IN] Object with Custom Attribute.
     LPCUTF8     szName,                 // [IN] Name of desired Custom Attribute.
     __deref_out_bcount(*pcbData) const void  **ppData, // [OUT] Put pointer to data here.
-    __out ULONG *pcbData)               // [OUT] Put size of data here.
+    _Out_ ULONG *pcbData)               // [OUT] Put size of data here.
 {
     return m_LiteWeightStgdb.m_MiniMd.CommonGetCustomAttributeByNameEx(tkObj, szName, NULL, ppData, pcbData);
 } // MDInternalRO::GetCustomAttributeByName
index 5c019cd..88ae89d 100644 (file)
@@ -178,8 +178,8 @@ public:
 
     __checkReturn
     inline HRESULT AddRecord(
-        __out                        BYTE  **ppbRecord,
-        __out                        UINT32 *pnIndex)
+        _Out_                        BYTE  **ppbRecord,
+        _Out_                        UINT32 *pnIndex)
     {
         return m_RecordStorage.AddRecord(ppbRecord, pnIndex);
     }
index 9d115b2..de3dbec 100644 (file)
@@ -4342,7 +4342,7 @@ void ETW::MethodLog::MethodTableRestored(MethodTable *pMethodTable)
 /****************************************************************************/
 /* This is called by the runtime when a Strong Name Verification Starts */
 /****************************************************************************/
-void ETW::SecurityLog::StrongNameVerificationStart(DWORD dwInFlags, __in LPWSTR strFullyQualifiedAssemblyName)
+void ETW::SecurityLog::StrongNameVerificationStart(DWORD dwInFlags, _In_ LPWSTR strFullyQualifiedAssemblyName)
 {
     WRAPPER_NO_CONTRACT;
 #ifndef FEATURE_CORECLR
@@ -4362,7 +4362,7 @@ void ETW::SecurityLog::StrongNameVerificationStart(DWORD dwInFlags, __in LPWSTR
 /****************************************************************************/
 /* This is called by the runtime when a Strong Name Verification Ends */
 /****************************************************************************/
-void ETW::SecurityLog::StrongNameVerificationStop(DWORD dwInFlags,ULONG result, __in LPWSTR strFullyQualifiedAssemblyName)
+void ETW::SecurityLog::StrongNameVerificationStop(DWORD dwInFlags,ULONG result, _In_ LPWSTR strFullyQualifiedAssemblyName)
 {
     WRAPPER_NO_CONTRACT;
 #ifndef FEATURE_CORECLR
@@ -4885,8 +4885,8 @@ void ETW::LoaderLog::SendAssemblyEvent(Assembly *pAssembly, DWORD dwEventOptions
 ETW_INLINE
     ULONG
     ETW::LoaderLog::SendModuleRange(
-    __in Module *pModule,
-    __in DWORD dwEventOptions)
+    _In_ Module *pModule,
+    _In_ DWORD dwEventOptions)
 
 {
     ULONG Result = ERROR_SUCCESS;
index afe833e..d197d59 100644 (file)
@@ -505,8 +505,8 @@ namespace ETW
     {
 #ifdef FEATURE_EVENT_TRACE
     public:
-        static void StrongNameVerificationStart(DWORD dwInFlags, __in LPWSTR strFullyQualifiedAssemblyName);
-        static void StrongNameVerificationStop(DWORD dwInFlags,ULONG result, __in LPWSTR strFullyQualifiedAssemblyName);
+        static void StrongNameVerificationStart(DWORD dwInFlags, _In_ LPWSTR strFullyQualifiedAssemblyName);
+        static void StrongNameVerificationStop(DWORD dwInFlags,ULONG result, _In_ LPWSTR strFullyQualifiedAssemblyName);
 
         static void FireFieldTransparencyComputationStart(LPCWSTR wszFieldName,
                                                           LPCWSTR wszModuleName,
@@ -742,8 +742,8 @@ extern ETW::CEtwTracer *  g_pEtwTracer;
 FORCEINLINE
 BOOLEAN __stdcall
 McGenEventTracingEnabled(
-    __in PMCGEN_TRACE_CONTEXT EnableInfo,
-    __in PCEVENT_DESCRIPTOR EventDescriptor
+    _In_ PMCGEN_TRACE_CONTEXT EnableInfo,
+    _In_ PCEVENT_DESCRIPTOR EventDescriptor
     )
 {
 
@@ -863,9 +863,9 @@ struct CallStackFrame
 FORCEINLINE
 BOOLEAN __stdcall
 McGenEventProviderEnabled(
-    __in PMCGEN_TRACE_CONTEXT Context,
-    __in UCHAR Level,
-    __in ULONGLONG Keyword
+    _In_ PMCGEN_TRACE_CONTEXT Context,
+    _In_ UCHAR Level,
+    _In_ ULONGLONG Keyword
     )
 {
     if(!Context) {
@@ -989,10 +989,10 @@ namespace ETW
 ETW_INLINE
 ULONG
 CoMofTemplate_h(
-    __in REGHANDLE RegHandle,
-    __in PCEVENT_DESCRIPTOR Descriptor,
+    _In_ REGHANDLE RegHandle,
+    _In_ PCEVENT_DESCRIPTOR Descriptor,
     __in_opt LPCGUID EventGuid,
-    __in const unsigned short  ClrInstanceID
+    _In_ const unsigned short  ClrInstanceID
     )
 {
 #define ARGUMENT_COUNT_h 1
index 8ef6bc9..14fcc8e 100644 (file)
@@ -628,7 +628,7 @@ extern "C" {
 // These two functions are largely just for marking code
 // that is not fully converted.  DacWarning prints a debug
 // message, while DacNotImpl throws a not-implemented exception.
-void __cdecl DacWarning(__in __in_z char* format, ...);
+void __cdecl DacWarning(_In_ __in_z char* format, ...);
 void DacNotImpl(void);
 void    DacError(HRESULT err);
 void __declspec(noreturn) DacError_NoRet(HRESULT err);
index 88991ce..198b46d 100644 (file)
@@ -2648,12 +2648,6 @@ buffer, use the table in the buffer annotations section.
 -------------------------------------------------------------------------------
 */
 
-// These macros conflict with c++ headers.
-#ifndef PAL_STDCPP_COMPAT
-#define __in                                                     _SAL1_Source_(__in, (), _In_)
-#define __out                                                    _SAL1_Source_(__out, (), _Out_)
-#endif // !PAL_STDCPP_COMPAT
-
 #define __ecount(size)                                           _SAL1_Source_(__ecount, (size), __notnull __elem_writableTo(size))
 #define __bcount(size)                                           _SAL1_Source_(__bcount, (size), __notnull __byte_writableTo(size))
 #define __in_ecount(size)                                        _SAL1_Source_(__in_ecount, (size), _In_reads_(size))
index 5f5e6e1..749b20f 100644 (file)
@@ -97,7 +97,7 @@ __ANNOTATION(SAL_failureDefault(enum __SAL_failureKind));
 #endif // ]
 
 #define __xcount(size)                                          __notnull __inexpressible_writableTo(size)
-#define __in_xcount(size)                                       __in _Pre_ __inexpressible_readableTo(size)
+#define __in_xcount(size)                                       _In_ _Pre_ __inexpressible_readableTo(size)
 #define __out_xcount(size)                                      __xcount(size) _Post_ __valid __refparam
 #define __out_xcount_part(size,length)                          __out_xcount(size) _Post_ __inexpressible_readableTo(length)
 #define __out_xcount_full(size)                                 __out_xcount_part(size,size)
@@ -113,7 +113,7 @@ __ANNOTATION(SAL_failureDefault(enum __SAL_failureKind));
 #define __inout_xcount_part_opt(size,length)                    __inout_xcount_part(size,length)            __exceptthat __maybenull
 #define __inout_xcount_full_opt(size)                           __inout_xcount_full(size)                   __exceptthat __maybenull
 #define __deref_xcount(size)                                    __ecount(1) _Post_ __elem_readableTo(1) _Post_ __deref __notnull _Post_ __deref __inexpressible_writableTo(size)
-#define __deref_in                                              __in _Pre_ __deref __deref __readonly
+#define __deref_in                                              _In_ _Pre_ __deref __deref __readonly
 #define __deref_in_ecount(size)                                 __deref_in _Pre_ __deref __elem_readableTo(size)
 #define __deref_in_bcount(size)                                 __deref_in _Pre_ __deref __byte_readableTo(size)
 #define __deref_in_xcount(size)                                 __deref_in _Pre_ __deref __inexpressible_readableTo(size)
@@ -125,7 +125,7 @@ __ANNOTATION(SAL_failureDefault(enum __SAL_failureKind));
 #define __inout_xcount_part_opt(size,length)                    __inout_xcount_part(size,length)            __exceptthat __maybenull
 #define __inout_xcount_full_opt(size)                           __inout_xcount_full(size)                   __exceptthat __maybenull
 #define __deref_xcount(size)                                    __ecount(1) _Post_ __elem_readableTo(1) _Post_ __deref __notnull _Post_ __deref __inexpressible_writableTo(size)
-#define __deref_in                                              __in _Pre_ __deref __deref __readonly
+#define __deref_in                                              _In_ _Pre_ __deref __deref __readonly
 #define __deref_in_ecount(size)                                 __deref_in _Pre_ __deref __elem_readableTo(size)
 #define __deref_in_bcount(size)                                 __deref_in _Pre_ __deref __byte_readableTo(size)
 #define __deref_in_xcount(size)                                 __deref_in _Pre_ __deref __inexpressible_readableTo(size)
index 7aaabd1..816ba80 100644 (file)
 *  LWSTDAPI_(BOOL) StrToIntExA(
 *      LPCSTR pszString,  //  No annotation required, const implies __in.
 *      DWORD dwFlags,
-*      __out int *piRet   // A pointer whose dereference will be filled in.
+*      _Out_ int *piRet   // A pointer whose dereference will be filled in.
 *  );
 *
 *  void MyPaintingFunction(
-*      __in HWND hwndControl,     //  An initialized read-only parameter.
+*      _In_ HWND hwndControl,     //  An initialized read-only parameter.
 *      __in_opt HDC hdcOptional,  //  An initialized read-only parameter that
 *                                 //  might be NULL.
 *      __inout IPropertyStore *ppsStore // An initialized parameter that
 #define __ecount(size)                                _SAL_VERSION_CHECK(__ecount)
 #define __bcount(size)                                _SAL_VERSION_CHECK(__bcount)
 #define __xcount(size)                                _SAL_VERSION_CHECK(__xcount)
-#define __in                                          _SAL_VERSION_CHECK(__in)
 #define __in_ecount(size)                             _SAL_VERSION_CHECK(__in_ecount)
 #define __in_bcount(size)                             _SAL_VERSION_CHECK(__in_bcount)
 #define __in_xcount(size)                             _SAL_VERSION_CHECK(__in_xcount)
 #define __in_z                                        _SAL_VERSION_CHECK(__in_z)
 #define __in_ecount_z(size)                           _SAL_VERSION_CHECK(__in_ecount_z)
 #define __in_bcount_z(size)                           _SAL_VERSION_CHECK(__in_bcount_z)
-#define __out                                         _SAL_VERSION_CHECK(__out)
 #define __out_ecount(size)                            _SAL_VERSION_CHECK(__out_ecount)
 #define __out_bcount(size)                            _SAL_VERSION_CHECK(__out_bcount)
 #define __out_xcount(size)                            _SAL_VERSION_CHECK(__out_xcount)
 *    __field_bcount_full(sz)
 *    char *buf;
 *   };
-*   void InitBuf(__out struct *buf_s b,int sz) {
+*   void InitBuf(_Out_ struct *buf_s b,int sz) {
 *        b->buf = calloc(sz,sizeof(char));
 *        b->sz = sz;
 *   }
-*   void WriteBuf(__in FILE *fp,__in struct *buf_s b) {
+*   void WriteBuf(_In_ FILE *fp,_In_ struct *buf_s b) {
 *     fwrite(b->buf,b->sz,sizeof(char),fp);
 *   }
-*   void ReadBuf(__in FILE *fp,__inout struct *buf_s b) {
+*   void ReadBuf(_In_ FILE *fp,__inout struct *buf_s b) {
 *     fread(b->buf,b->sz,sizeof(char),fp);
 *   }
 *
 *    __field_bcount(sz)
 *    char buf[1];
 *   };
-*   void WriteBuf(__in FILE *fp,__in struct *buf_s b) {
+*   void WriteBuf(_In_ FILE *fp,_In_ struct *buf_s b) {
 *     fwrite(&(b->buf),b->sz,sizeof(char),fp);
 *   }
-*   void ReadBuf(__in FILE *fp,__inout struct *buf_s b) {
+*   void ReadBuf(_In_ FILE *fp,__inout struct *buf_s b) {
 *     fread(&(b->buf),b->sz,sizeof(char),fp);
 *   }
 *
 *   struct buf_s {
 *    int sz;
 *   };
-*   void WriteBuf(__in FILE *fp,__in struct *buf_s b) {
+*   void WriteBuf(_In_ FILE *fp,_In_ struct *buf_s b) {
 *     fwrite(&b,b->sz,sizeof(char),fp);
 *   }
-*   void ReadBuf(__in FILE *fp,__inout struct *buf_s b) {
+*   void ReadBuf(_In_ FILE *fp,__inout struct *buf_s b) {
 *     fread(&b,b->sz,sizeof(char),fp);
 *   }
 *
index 9537f6f..e6b397b 100644 (file)
@@ -264,11 +264,11 @@ extern int _nstream;
 extern void **__piob;
 
 FILE * __cdecl _getstream(void);
-FILE * __cdecl _openfile(__in_z const char * _Filename, __in_z const char * _Mode, __in int _ShFlag, __out FILE * _File);
-FILE * __cdecl _wopenfile(__in_z const char16_t * _Filename, __in_z const char16_t * _Mode, __in int _ShFlag, __out FILE * _File);
-void __cdecl _getbuf(__out FILE * _File);
+FILE * __cdecl _openfile(__in_z const char * _Filename, __in_z const char * _Mode, _In_ int _ShFlag, _Out_ FILE * _File);
+FILE * __cdecl _wopenfile(__in_z const char16_t * _Filename, __in_z const char16_t * _Mode, _In_ int _ShFlag, _Out_ FILE * _File);
+void __cdecl _getbuf(_Out_ FILE * _File);
 int __cdecl _filwbuf (__inout FILE * _File);
-int __cdecl _flswbuf(__in int _Ch, __inout FILE * _File);
+int __cdecl _flswbuf(_In_ int _Ch, __inout FILE * _File);
 void __cdecl _freebuf(__inout FILE * _File);
 int __cdecl _stbuf(__inout FILE * _File);
 void __cdecl _ftbuf(int _Flag, __inout FILE * _File);
@@ -299,10 +299,10 @@ typedef int (*WOUTPUTFN)(__inout FILE * _File, const char16_t *, _locale_t, va_l
 
 #ifdef _SAFECRT_IMPL
 
-int __cdecl _input(__in FILE * _File, __in_z __format_string const unsigned char * _Format, va_list _ArgList);
-int __cdecl _winput(__in FILE * _File, __in_z __format_string const char16_t * _Format, va_list _ArgList);
-int __cdecl _input_s(__in FILE * _File, __in_z __format_string const unsigned char * _Format, va_list _ArgList);
-int __cdecl _winput_s(__in FILE * _File, __in_z __format_string const char16_t * _Format, va_list _ArgList);
+int __cdecl _input(_In_ FILE * _File, __in_z __format_string const unsigned char * _Format, va_list _ArgList);
+int __cdecl _winput(_In_ FILE * _File, __in_z __format_string const char16_t * _Format, va_list _ArgList);
+int __cdecl _input_s(_In_ FILE * _File, __in_z __format_string const unsigned char * _Format, va_list _ArgList);
+int __cdecl _winput_s(_In_ FILE * _File, __in_z __format_string const char16_t * _Format, va_list _ArgList);
 typedef int (*INPUTFN)(FILE *, const unsigned char *, va_list);
 typedef int (*WINPUTFN)(FILE *, const char16_t *, va_list);
 
@@ -327,11 +327,11 @@ int __cdecl _flush(__inout FILE * _File);
 void __cdecl _endstdio(void);
 
 errno_t __cdecl _sopen_helper(__in_z const char * _Filename,
-    __in int _OFlag, __in int _ShFlag, __in int _PMode,
-    __out int * _PFileHandle, int _BSecure);
+    _In_ int _OFlag, _In_ int _ShFlag, _In_ int _PMode,
+    _Out_ int * _PFileHandle, int _BSecure);
 errno_t __cdecl _wsopen_helper(__in_z const char16_t * _Filename,
-    __in int _OFlag, __in int _ShFlag, __in int _PMode,
-    __out int * _PFileHandle, int _BSecure);
+    _In_ int _OFlag, _In_ int _ShFlag, _In_ int _PMode,
+    _Out_ int * _PFileHandle, int _BSecure);
 
 #ifndef CRTDLL
 extern int _cflush;
@@ -349,8 +349,8 @@ extern char _exitflag;      /* callable termination flag */
 
 extern int _C_Termination_Done; /* termination done flag */
 
-char * __cdecl _getpath(__in_z const char * _Src, __out_ecount_z(_SizeInChars) char * _Dst, __in size_t _SizeInChars);
-char16_t * __cdecl _wgetpath(__in_z const char16_t * _Src, __out_ecount_z(_SizeInWords) char16_t * _Dst, __in size_t _SizeInWords);
+char * __cdecl _getpath(__in_z const char * _Src, __out_ecount_z(_SizeInChars) char * _Dst, _In_ size_t _SizeInChars);
+char16_t * __cdecl _wgetpath(__in_z const char16_t * _Src, __out_ecount_z(_SizeInWords) char16_t * _Dst, _In_ size_t _SizeInWords);
 
 extern int _dowildcard;     /* flag to enable argv[] wildcard expansion */
 
@@ -368,7 +368,7 @@ typedef int (__clrcall * __MPNH)( size_t );
 
 
 /* calls the currently installed new handler */
-int __cdecl _callnewh(__in size_t _Size);
+int __cdecl _callnewh(_In_ size_t _Size);
 
 extern int _newmode;    /* malloc new() handler mode */
 
@@ -460,8 +460,8 @@ _MRTIMP int __cdecl _onexit_app_domain(_CPVFV);
 #endif  /* MRTDLL */
 
 #ifndef _MANAGED_MAIN
-int __CRTDECL main(__in int _Argc, __in_ecount_z(_Argc) char ** _Argv, __in_z char ** _Env);
-int __CRTDECL wmain(__in int _Argc, __in_ecount_z(_Argc) char16_t ** _Argv, __in_z char16_t ** _Env);
+int __CRTDECL main(_In_ int _Argc, __in_ecount_z(_Argc) char ** _Argv, __in_z char ** _Env);
+int __CRTDECL wmain(_In_ int _Argc, __in_ecount_z(_Argc) char16_t ** _Argv, __in_z char16_t ** _Env);
 #endif  /* _MANAGED_MAIN */
 
 /* helper functions for wide/multibyte environment conversion */
@@ -474,8 +474,8 @@ int __cdecl __wtomb_environ (void);
    NULL out the incoming char * / char16_t * to ensure there is no
    double-free
 */
-int __cdecl __crtsetenv (__deref_inout_opt char ** _POption, __in const int _Primary);
-int __cdecl __crtwsetenv (__deref_inout_opt char16_t ** _POption, __in const int _Primary);
+int __cdecl __crtsetenv (__deref_inout_opt char ** _POption, _In_ const int _Primary);
+int __cdecl __crtwsetenv (__deref_inout_opt char16_t ** _POption, _In_ const int _Primary);
 
 #ifndef _M_CEE_PURE
 _CRTIMP extern void (__cdecl * _aexit_rtn)(int);
@@ -491,13 +491,13 @@ typedef struct
 #define _STARTUP_INFO_DEFINED
 #endif  /* _STARTUP_INFO_DEFINED */
 
-_CRTIMP int __cdecl __getmainargs(__out int * _Argc, __deref_out_ecount(*_Argc) char *** _Argv,
-                                  __deref_out_opt char *** _Env, __in int _DoWildCard,
-                                  __in _startupinfo * _StartInfo);
+_CRTIMP int __cdecl __getmainargs(_Out_ int * _Argc, __deref_out_ecount(*_Argc) char *** _Argv,
+                                  __deref_out_opt char *** _Env, _In_ int _DoWildCard,
+                                  _In_ _startupinfo * _StartInfo);
 
-_CRTIMP int __cdecl __wgetmainargs(__out int * _Argc, __deref_out_ecount(*_Argc)char16_t *** _Argv,
-                                   __deref_out_opt char16_t *** _Env, __in int _DoWildCard,
-                                                                   __in _startupinfo * _StartInfo);
+_CRTIMP int __cdecl __wgetmainargs(_Out_ int * _Argc, __deref_out_ecount(*_Argc)char16_t *** _Argv,
+                                   __deref_out_opt char16_t *** _Env, _In_ int _DoWildCard,
+                                                                   _In_ _startupinfo * _StartInfo);
 
 #endif  /* defined (_DLL) || defined (CRTDLL) */
 
@@ -610,15 +610,15 @@ extern int __cdecl _get_errno_from_oserr(unsigned long);
  * internal routines used by the exec/spawn functions
  */
 
-extern intptr_t __cdecl _dospawn(__in int _Mode, __in_z_opt const char * _Name, __inout_z char * _Cmd, __in_z_opt char * _Env);
-extern intptr_t __cdecl _wdospawn(__in int _Mode, __in_z_opt const char16_t * _Name, __inout_z char16_t * _Cmd, __in_z_opt char16_t * _Env);
+extern intptr_t __cdecl _dospawn(_In_ int _Mode, __in_z_opt const char * _Name, __inout_z char * _Cmd, __in_z_opt char * _Env);
+extern intptr_t __cdecl _wdospawn(_In_ int _Mode, __in_z_opt const char16_t * _Name, __inout_z char16_t * _Cmd, __in_z_opt char16_t * _Env);
 extern int __cdecl _cenvarg(__in_z const char * const * _Argv, __in_z_opt const char * const * _Env,
         __deref_out_opt char ** _ArgBlk, __deref_out_opt char ** _EnvBlk, __in_z const char *_Name);
 extern int __cdecl _wcenvarg(__in_z const char16_t * const * _Argv, __in_z_opt const char16_t * const * _Env,
         __deref_out_opt char16_t ** _ArgBlk, __deref_out_opt char16_t ** _EnvBlk, __in_z const char16_t * _Name);
 #ifndef _M_IX86
-extern char ** _capture_argv(__in va_list *, __in_z const char * _FirstArg, __out_ecount_z(_MaxCount) char ** _Static_argv, __in size_t _MaxCount);
-extern char16_t ** _wcapture_argv(__in va_list *, __in_z const char16_t * _FirstArg, __out_ecount_z(_MaxCount) char16_t ** _Static_argv, __in size_t _MaxCount);
+extern char ** _capture_argv(_In_ va_list *, __in_z const char * _FirstArg, __out_ecount_z(_MaxCount) char ** _Static_argv, _In_ size_t _MaxCount);
+extern char16_t ** _wcapture_argv(_In_ va_list *, __in_z const char16_t * _FirstArg, __out_ecount_z(_MaxCount) char16_t ** _Static_argv, _In_ size_t _MaxCount);
 #endif  /* _M_IX86 */
 
 /*
index 7d5fd1e..4ad915f 100644 (file)
@@ -29,7 +29,7 @@
 #define __in_z_opt
 #define __out_ecount_z_opt( x )
 #define __in_z
-#define __in
+#define _In_
 
 /*
  * The original SafeCRT implemention allows runtime control over buffer checking.
index 7bbaf26..ac2b3c5 100644 (file)
 _FUNC_PROLOGUE
 errno_t __cdecl _FUNC_NAME(
     __in_z const _CHAR *_Path,
-    __out_ecount_z_opt(_DriveSize) _CHAR *_Drive, __in size_t _DriveSize,
-    __out_ecount_z_opt(_DirSize) _CHAR *_Dir, __in size_t _DirSize,
-    __out_ecount_z_opt(_FilenameSize) _CHAR *_Filename, __in size_t _FilenameSize,
-    __out_ecount_z_opt(_ExtSize) _CHAR *_Ext, __in size_t _ExtSize
+    __out_ecount_z_opt(_DriveSize) _CHAR *_Drive, _In_ size_t _DriveSize,
+    __out_ecount_z_opt(_DirSize) _CHAR *_Dir, _In_ size_t _DirSize,
+    __out_ecount_z_opt(_FilenameSize) _CHAR *_Filename, _In_ size_t _FilenameSize,
+    __out_ecount_z_opt(_ExtSize) _CHAR *_Ext, _In_ size_t _ExtSize
 )
 {
     const _CHAR *tmp;
index 24c782b..4184b6a 100644 (file)
@@ -204,7 +204,7 @@ void MDInfo::InitSigBuffer()
 
 // helper to append a string into the signature buffer. If size of signature buffer is not big enough,
 // we will grow it.
-HRESULT MDInfo::AddToSigBuffer(__in_z __in const char *string)
+HRESULT MDInfo::AddToSigBuffer(__in_z _In_ const char *string)
 {
     HRESULT     hr;
     size_t LL = strlen((LPSTR)m_sigBuf.Ptr()) + strlen(string) + 1;
@@ -368,7 +368,7 @@ void MDInfo::DisplayMD()
     WriteLine("===========================================================");
 } // MDVEHandlerClass()
 
-int MDInfo::WriteLine(__in_z __in const char *str)
+int MDInfo::WriteLine(__in_z _In_ const char *str)
 {
     ULONG32 count = (ULONG32) strlen(str);
 
@@ -377,7 +377,7 @@ int MDInfo::WriteLine(__in_z __in const char *str)
     return count;
 } // int MDInfo::WriteLine()
 
-int MDInfo::Write(__in_z __in const char *str)
+int MDInfo::Write(__in_z _In_ const char *str)
 {
     ULONG32 count = (ULONG32) strlen(str);
 
@@ -385,7 +385,7 @@ int MDInfo::Write(__in_z __in const char *str)
     return count;
 } // int MDInfo::Write()
 
-int MDInfo::VWriteLine(__in_z __in const char *str, ...)
+int MDInfo::VWriteLine(__in_z _In_ const char *str, ...)
 {
     va_list marker;
     int     count;
@@ -397,7 +397,7 @@ int MDInfo::VWriteLine(__in_z __in const char *str, ...)
     return count;
 } // int MDInfo::VWriteLine()
 
-int MDInfo::VWrite(__in_z __in const char *str, ...)
+int MDInfo::VWrite(__in_z _In_ const char *str, ...)
 {
     va_list marker;
     int     count;
@@ -408,7 +408,7 @@ int MDInfo::VWrite(__in_z __in const char *str, ...)
     return count;
 } // int MDInfo::VWrite()
 
-int MDInfo::VWriteMarker(__in_z __in const char *str, va_list marker)
+int MDInfo::VWriteMarker(__in_z _In_ const char *str, va_list marker)
 {
     HRESULT hr;
     int count = -1;
index 04002fd..0ef7567 100644 (file)
@@ -170,15 +170,15 @@ private:
 
     int DumpHex(const char *szPrefix, const void *pvData, ULONG cbData, int bText=true, ULONG nLine=16);
 
-    int Write(__in_z __in const char *str);
-    int WriteLine(__in_z __in const char *str);
+    int Write(__in_z _In_ const char *str);
+    int WriteLine(__in_z _In_ const char *str);
 
-    int VWrite(__in_z __in const char *str, ...);
-    int VWriteLine(__in_z __in const char *str, ...);
-    int VWriteMarker(__in_z __in const char *str, va_list marker);
+    int VWrite(__in_z _In_ const char *str, ...);
+    int VWriteLine(__in_z _In_ const char *str, ...);
+    int VWriteMarker(__in_z _In_ const char *str, va_list marker);
 
     void InitSigBuffer();
-    HRESULT AddToSigBuffer(__in_z __in const char *string);
+    HRESULT AddToSigBuffer(__in_z _In_ const char *string);
 
     IMetaDataImport2 *m_pRegImport;
     IMetaDataImport2 *m_pImport;
index c8851a8..a6cf99f 100644 (file)
@@ -57,7 +57,7 @@ static HRESULT FindObjMetaData(PVOID pImage, PVOID *ppMetaData, long *pcbMetaDat
 
 
 // This function returns the address to the MapView of file and file size.
-void GetMapViewOfFile(__in WCHAR *szFile, PBYTE *ppbMap, DWORD *pdwFileSize)
+void GetMapViewOfFile(_In_ WCHAR *szFile, PBYTE *ppbMap, DWORD *pdwFileSize)
 {
     HANDLE      hMapFile;
     DWORD       dwHighSize;
@@ -161,7 +161,7 @@ char *GetNameOfObj(PBYTE pbLongNames, PIMAGE_ARCHIVE_MEMBER_HEADER pMemHdr, char
 //
 // Opens the .LIB file, and displays the metadata in the specified object files.
 
-void DisplayArchive(__in_z __in WCHAR* szFile, ULONG DumpFilter, __in_z __in_opt WCHAR* szObjName, strPassBackFn pDisplayString)
+void DisplayArchive(__in_z _In_ WCHAR* szFile, ULONG DumpFilter, __in_z __in_opt WCHAR* szObjName, strPassBackFn pDisplayString)
 {
     PBYTE       pbMapAddress;
     PBYTE       pbStartAddress;
@@ -249,7 +249,7 @@ void DisplayArchive(__in_z __in WCHAR* szFile, ULONG DumpFilter, __in_z __in_opt
 // Opens the meta data content of a .EXE, .CLB, .CLASS, .TLB, .DLL or .LIB file, and
 // calls RawDisplay()
 
-void DisplayFile(__in_z __in WCHAR* szFile, BOOL isFile, ULONG DumpFilter, __in_z __in_opt WCHAR* szObjName, strPassBackFn pDisplayString)
+void DisplayFile(__in_z _In_ WCHAR* szFile, BOOL isFile, ULONG DumpFilter, __in_z __in_opt WCHAR* szObjName, strPassBackFn pDisplayString)
 {
     // Open the emit scope
 
index 510d86c..b0fddb5 100644 (file)
@@ -365,7 +365,7 @@ bool ConsoleArgs::GetFullFileName(LPCWSTR szSource, __out_ecount(cchFilenameBuff
 // Clear previous error message if any and set the new one by copying into m_lastErrorMessage.
 // We are responsible for freeing the memory destruction.
 //
-void ConsoleArgs::SetErrorMessage(__in LPCWSTR pwzMessage)
+void ConsoleArgs::SetErrorMessage(_In_ LPCWSTR pwzMessage)
 {
     if (m_lastErrorMessage != nullptr)
     {
@@ -680,7 +680,7 @@ LEADINGWHITE:
 // We expand any response files that may be contained in the args and return a new
 // set of args, pargc2 and pppargv2 that contain the full flat command line.
 //
-bool ConsoleArgs::ExpandResponseFiles(__in int argc, __deref_in_ecount(argc) const LPCWSTR * argv, int * pargc2, __deref_out_ecount(*pargc2) LPWSTR ** pppargv2)
+bool ConsoleArgs::ExpandResponseFiles(_In_ int argc, __deref_in_ecount(argc) const LPCWSTR * argv, int * pargc2, __deref_out_ecount(*pargc2) LPWSTR ** pppargv2)
 {
     *pargc2 = 0;
     *pppargv2 = NULL;
index 10cc1e4..82d0da5 100644 (file)
@@ -35,7 +35,7 @@ public:
     };
 
     // returns false if there are errors
-    bool ExpandResponseFiles(__in int argc, __deref_in_ecount(argc) const LPCWSTR * argv, int * pargc2, __deref_out_ecount(*pargc2) LPWSTR ** pppargv2);
+    bool ExpandResponseFiles(_In_ int argc, __deref_in_ecount(argc) const LPCWSTR * argv, int * pargc2, __deref_out_ecount(*pargc2) LPWSTR ** pppargv2);
 
     // Frees all memory used by the arg list and the argv/argc array
     void CleanUpArgs();
@@ -53,7 +53,7 @@ public:
     }
 
 private:
-    void SetErrorMessage(__in LPCWSTR pwzMessage);
+    void SetErrorMessage(_In_ LPCWSTR pwzMessage);
     b_tree * MakeLeaf( LPCWSTR szText);
     void CleanupTree( b_tree * root);
     HRESULT TreeAdd( b_tree ** root, LPCWSTR szAdd);
index e671420..d706261 100644 (file)
@@ -63,10 +63,10 @@ DbsX64StackUnwinder::s_UnwindOpSlotTable[] =
 
 HRESULT
 DbsX64StackUnwinder::UnwindPrologue(
-    __in ULONG64 ImageBase,
-    __in ULONG64 ControlPc,
-    __in ULONG64 FrameBase,
-    __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    _In_ ULONG64 ImageBase,
+    _In_ ULONG64 ControlPc,
+    _In_ ULONG64 FrameBase,
+    _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
     __inout PAMD64_CONTEXT ContextRecord
     )
 
@@ -520,11 +520,11 @@ Arguments:
 
 HRESULT
 DbsX64StackUnwinder::VirtualUnwind(
-    __in ULONG64 ImageBase,
-    __in ULONG64 ControlPc,
-    __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    _In_ ULONG64 ImageBase,
+    _In_ ULONG64 ControlPc,
+    _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
     __inout PAMD64_CONTEXT ContextRecord,
-    __out PULONG64 EstablisherFrame
+    _Out_ PULONG64 EstablisherFrame
     )
 
 /*++
@@ -1033,9 +1033,9 @@ Arguments:
 
 ULONG64
 DbsX64StackUnwinder::LookupPrimaryUnwindInfo(
-    __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
-    __in ULONG64 ImageBase,
-    __out _PIMAGE_RUNTIME_FUNCTION_ENTRY PrimaryEntry
+    _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    _In_ ULONG64 ImageBase,
+    _Out_ _PIMAGE_RUNTIME_FUNCTION_ENTRY PrimaryEntry
     )
 
 /*++
@@ -1114,10 +1114,10 @@ Return Value:
 
 _PIMAGE_RUNTIME_FUNCTION_ENTRY
 DbsX64StackUnwinder::SameFunction(
-    __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
-    __in ULONG64 ImageBase,
-    __in ULONG64 ControlPc,
-    __out _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionReturnBuffer
+    _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    _In_ ULONG64 ImageBase,
+    _In_ ULONG64 ControlPc,
+    _Out_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionReturnBuffer
     )
 
 /*++
@@ -1265,7 +1265,7 @@ DbsX64StackUnwinder::Unwind(void)
 
 DWORD
 DbsX64StackUnwinder::
-GetFullUnwindInfoSize(__in PVOID InfoHeader)
+GetFullUnwindInfoSize(_In_ PVOID InfoHeader)
 {
     PAMD64_UNWIND_INFO UnwindInfo = (PAMD64_UNWIND_INFO)InfoHeader;
 
@@ -1289,9 +1289,9 @@ GetFullUnwindInfoSize(__in PVOID InfoHeader)
 
 HRESULT
 DbsX64StackUnwinder::DbhStart(__inout LPSTACKFRAME64 StackFrame,
-                              __in DWORD DbhVersion,
+                              _In_ DWORD DbhVersion,
                               __in_bcount(DbhStorageBytes) PVOID DbhStorage,
-                              __in DWORD DbhStorageBytes,
+                              _In_ DWORD DbhStorageBytes,
                               __inout PVOID Context)
 {
     HRESULT Status;
@@ -1343,9 +1343,9 @@ DbsX64StackUnwinder::DbhStart(__inout LPSTACKFRAME64 StackFrame,
 HRESULT
 DbsX64StackUnwinder::
 DbhContinue(__inout LPSTACKFRAME64 StackFrame,
-            __in DWORD DbhVersion,
+            _In_ DWORD DbhVersion,
             __in_bcount(DbhStorageBytes) PVOID DbhStorage,
-            __in DWORD DbhStorageBytes,
+            _In_ DWORD DbhStorageBytes,
             __inout PVOID Context)
 {
     HRESULT Status;
@@ -1385,7 +1385,7 @@ DbsX64StackUnwinder::DbhUpdatePreUnwind(__inout LPSTACKFRAME64 StackFrame)
 
 HRESULT
 DbsX64StackUnwinder::DbhUpdatePostUnwind(__inout LPSTACKFRAME64 StackFrame,
-                                         __in HRESULT UnwindStatus)
+                                         _In_ HRESULT UnwindStatus)
 {
     HRESULT Status;
 
index ef1c5e0..d241756 100644 (file)
@@ -321,13 +321,13 @@ UNWIND_INFO * OOPStackUnwinderAMD64::GetUnwindInfo(TADDR taUnwindInfo)
 //     returned.
 //
 PEXCEPTION_ROUTINE RtlVirtualUnwind_Unsafe(
-    __in ULONG HandlerType,
-    __in ULONG64 ImageBase,
-    __in ULONG64 ControlPc,
-    __in PT_RUNTIME_FUNCTION FunctionEntry,
-    __in OUT PCONTEXT ContextRecord,
-    __out PVOID *HandlerData,
-    __out PULONG64 EstablisherFrame,
+    _In_ ULONG HandlerType,
+    _In_ ULONG64 ImageBase,
+    _In_ ULONG64 ControlPc,
+    _In_ PT_RUNTIME_FUNCTION FunctionEntry,
+    _In_ OUT PCONTEXT ContextRecord,
+    _Out_ PVOID *HandlerData,
+    _Out_ PULONG64 EstablisherFrame,
     __inout_opt PKNONVOLATILE_CONTEXT_POINTERS ContextPointers
     )
 {
@@ -395,10 +395,10 @@ PEXCEPTION_ROUTINE RtlVirtualUnwind_Unsafe(
 
 HRESULT
 OOPStackUnwinderAMD64::UnwindEpilogue(
-    __in ULONG64 ImageBase,
-    __in ULONG64 ControlPc,
-    __in ULONG EpilogueOffset,
-    __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    _In_ ULONG64 ImageBase,
+    _In_ ULONG64 ControlPc,
+    _In_ ULONG EpilogueOffset,
+    _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
     __inout PCONTEXT ContextRecord,
     __inout_opt PKNONVOLATILE_CONTEXT_POINTERS ContextPointers
 )
@@ -634,10 +634,10 @@ HRESULT.
 
 HRESULT
 OOPStackUnwinderAMD64::UnwindPrologue(
-    __in ULONG64 ImageBase,
-    __in ULONG64 ControlPc,
-    __in ULONG64 FrameBase,
-    __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    _In_ ULONG64 ImageBase,
+    _In_ ULONG64 ControlPc,
+    _In_ ULONG64 FrameBase,
+    _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
     __inout PCONTEXT ContextRecord,
     __inout_opt PKNONVOLATILE_CONTEXT_POINTERS ContextPointers,
     __deref_out _PIMAGE_RUNTIME_FUNCTION_ENTRY *FinalFunctionEntry
@@ -1012,13 +1012,13 @@ Return Value:
 
 HRESULT
 OOPStackUnwinderAMD64::VirtualUnwind(
-    __in DWORD HandlerType,
-    __in ULONG64 ImageBase,
-    __in ULONG64 ControlPc,
-    __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    _In_ DWORD HandlerType,
+    _In_ ULONG64 ImageBase,
+    _In_ ULONG64 ControlPc,
+    _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
     __inout PCONTEXT ContextRecord,
-    __out PVOID *HandlerData,
-    __out PULONG64 EstablisherFrame,
+    _Out_ PVOID *HandlerData,
+    _Out_ PULONG64 EstablisherFrame,
     __inout_opt PKNONVOLATILE_CONTEXT_POINTERS ContextPointers,
     __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine
     )
@@ -1663,8 +1663,8 @@ ExitSetHandler:
 
 _PIMAGE_RUNTIME_FUNCTION_ENTRY
 OOPStackUnwinderAMD64::LookupPrimaryFunctionEntry(
-    __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
-    __in ULONG64 ImageBase
+    _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    _In_ ULONG64 ImageBase
 
     )
 
@@ -1732,9 +1732,9 @@ Return Value:
 
 _PIMAGE_RUNTIME_FUNCTION_ENTRY
 OOPStackUnwinderAMD64::SameFunction(
-    __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
-    __in ULONG64 ImageBase,
-    __in ULONG64 ControlPc
+    _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    _In_ ULONG64 ImageBase,
+    _In_ ULONG64 ControlPc
     )
 
 /*++
@@ -1812,7 +1812,7 @@ Return Value:
     }
 }
 
-ULONG OOPStackUnwinderAMD64::UnwindOpSlots(__in UNWIND_CODE UnwindCode)
+ULONG OOPStackUnwinderAMD64::UnwindOpSlots(_In_ UNWIND_CODE UnwindCode)
 /*++
 
 Routine Description:
index 48e67f6..347e00a 100644 (file)
@@ -24,43 +24,43 @@ public:
     // Everything below comes from dbghelp.dll.
     //
 
-    static HRESULT VirtualUnwind(__in DWORD HandlerType,
-        __in DWORD64 ImageBase,
-        __in DWORD64 ControlPc,
-        __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    static HRESULT VirtualUnwind(_In_ DWORD HandlerType,
+        _In_ DWORD64 ImageBase,
+        _In_ DWORD64 ControlPc,
+        _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
         __inout PCONTEXT ContextRecord,
-        __out PVOID *HandlerData,
-        __out PDWORD64 EstablisherFrame,
+        _Out_ PVOID *HandlerData,
+        _Out_ PDWORD64 EstablisherFrame,
         __inout_opt PKNONVOLATILE_CONTEXT_POINTERS ContextPointers,
         __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine);
 
 protected:
 
-    static ULONG UnwindOpSlots(__in UNWIND_CODE UnwindCode);
+    static ULONG UnwindOpSlots(_In_ UNWIND_CODE UnwindCode);
 
-    static HRESULT UnwindEpilogue(__in ULONG64 ImageBase,
-                                  __in ULONG64 ControlPc,
-                                  __in ULONG EpilogueOffset,
-                                  __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    static HRESULT UnwindEpilogue(_In_ ULONG64 ImageBase,
+                                  _In_ ULONG64 ControlPc,
+                                  _In_ ULONG EpilogueOffset,
+                                  _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
                                   __inout PCONTEXT ContextRecord,
                                   __inout_opt PKNONVOLATILE_CONTEXT_POINTERS ContextPointers);
 
-    static HRESULT UnwindPrologue(__in DWORD64 ImageBase,
-                                  __in DWORD64 ControlPc,
-                                  __in DWORD64 FrameBase,
-                                  __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    static HRESULT UnwindPrologue(_In_ DWORD64 ImageBase,
+                                  _In_ DWORD64 ControlPc,
+                                  _In_ DWORD64 FrameBase,
+                                  _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
                                   __inout PCONTEXT ContextRecord,
                                   __inout_opt PKNONVOLATILE_CONTEXT_POINTERS ContextPointers,
                                   __deref_out _PIMAGE_RUNTIME_FUNCTION_ENTRY *FinalFunctionEntry);
 
     static _PIMAGE_RUNTIME_FUNCTION_ENTRY LookupPrimaryFunctionEntry
-        (__in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
-         __in DWORD64 ImageBase);
+        (_In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+         _In_ DWORD64 ImageBase);
 
     static _PIMAGE_RUNTIME_FUNCTION_ENTRY SameFunction
-        (__in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
-         __in DWORD64 ImageBase,
-         __in DWORD64 ControlPc);
+        (_In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+         _In_ DWORD64 ImageBase,
+         _In_ DWORD64 ControlPc);
 
     static UNWIND_INFO * GetUnwindInfo(TADDR taUnwindInfo);
 };
index 5c8de35..7debfb5 100644 (file)
@@ -258,8 +258,8 @@ static const ULONG RegisterMaskLookup[1 << 6] =
 NTSTATUS
 RtlpUnwindCustom(
     __inout PT_CONTEXT ContextRecord,
-    __in BYTE Opcode,
-    __in PARM_UNWIND_PARAMS UnwindParams
+    _In_ BYTE Opcode,
+    _In_ PARM_UNWIND_PARAMS UnwindParams
     )
 
 /*++
@@ -385,9 +385,9 @@ Return Value:
 NTSTATUS
 RtlpPopVfpRegisterRange(
     __inout PT_CONTEXT ContextRecord,
-    __in ULONG RegStart,
-    __in ULONG RegStop,
-    __in PARM_UNWIND_PARAMS UnwindParams
+    _In_ ULONG RegStart,
+    _In_ ULONG RegStop,
+    _In_ PARM_UNWIND_PARAMS UnwindParams
     )
 
 /*++
@@ -445,9 +445,9 @@ Return Value:
 FORCEINLINE
 WORD
 RtlpRangeToMask(
-    __in ULONG Start,
-    __in ULONG Stop,
-    __in ULONG Lr
+    _In_ ULONG Start,
+    _In_ ULONG Stop,
+    _In_ ULONG Lr
     )
 
 /*++
@@ -485,8 +485,8 @@ Return Value:
 NTSTATUS
 RtlpPopRegisterMask(
     __inout PT_CONTEXT ContextRecord,
-    __in WORD RegMask,
-    __in PARM_UNWIND_PARAMS UnwindParams
+    _In_ WORD RegMask,
+    _In_ PARM_UNWIND_PARAMS UnwindParams
     )
 /*++
 
@@ -556,8 +556,8 @@ Return Value:
 FORCEINLINE
 BOOLEAN
 RtlpCheckCondition(
-    __in PT_CONTEXT ContextRecord,
-    __in ULONG Condition
+    _In_ PT_CONTEXT ContextRecord,
+    _In_ ULONG Condition
     )
 
 /*++
@@ -585,10 +585,10 @@ Return Value:
 
 ULONG
 RtlpComputeScopeSize(
-    __in ULONG UnwindCodePtr,
-    __in ULONG UnwindCodesEndPtr,
-    __in BOOLEAN IsEpilog,
-    __in PVOID UnwindParams
+    _In_ ULONG UnwindCodePtr,
+    _In_ ULONG UnwindCodesEndPtr,
+    _In_ BOOLEAN IsEpilog,
+    _In_ PVOID UnwindParams
     )
 
 /*++
@@ -647,13 +647,13 @@ Return Value:
 
 HRESULT
 RtlpUnwindFunctionCompact(
-    __in ULONG ControlPcRva,
-    __in PT_RUNTIME_FUNCTION FunctionEntry,
+    _In_ ULONG ControlPcRva,
+    _In_ PT_RUNTIME_FUNCTION FunctionEntry,
     __inout PT_CONTEXT ContextRecord,
-    __out PULONG EstablisherFrame,
+    _Out_ PULONG EstablisherFrame,
     __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine,
-    __out PVOID *HandlerData,
-    __in PARM_UNWIND_PARAMS UnwindParams
+    _Out_ PVOID *HandlerData,
+    _In_ PARM_UNWIND_PARAMS UnwindParams
     )
 {
     ULONG CBit;
@@ -916,14 +916,14 @@ RtlpUnwindFunctionCompact(
 
 HRESULT
 RtlpUnwindFunctionFull(
-    __in ULONG ControlPcRva,
-    __in ULONG ImageBase,
-    __in PT_RUNTIME_FUNCTION FunctionEntry,
+    _In_ ULONG ControlPcRva,
+    _In_ ULONG ImageBase,
+    _In_ PT_RUNTIME_FUNCTION FunctionEntry,
     __inout PT_CONTEXT ContextRecord,
-    __out PULONG EstablisherFrame,
+    _Out_ PULONG EstablisherFrame,
     __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine,
-    __out PVOID *HandlerData,
-    __in PARM_UNWIND_PARAMS UnwindParams
+    _Out_ PVOID *HandlerData,
+    _In_ PARM_UNWIND_PARAMS UnwindParams
     )
 
 /*++
@@ -1499,13 +1499,13 @@ BOOL DacUnwindStackFrame(T_CONTEXT *pContext, T_KNONVOLATILE_CONTEXT_POINTERS* p
 
 #if defined(HOST_UNIX)
 PEXCEPTION_ROUTINE RtlVirtualUnwind(
-    __in ULONG HandlerType,
-    __in ULONG ImageBase,
-    __in ULONG ControlPc,
-    __in PT_RUNTIME_FUNCTION FunctionEntry,
-    __in OUT PCONTEXT ContextRecord,
-    __out PVOID *HandlerData,
-    __out PULONG EstablisherFrame,
+    _In_ ULONG HandlerType,
+    _In_ ULONG ImageBase,
+    _In_ ULONG ControlPc,
+    _In_ PT_RUNTIME_FUNCTION FunctionEntry,
+    _In_ OUT PCONTEXT ContextRecord,
+    _Out_ PVOID *HandlerData,
+    _Out_ PULONG EstablisherFrame,
     __inout_opt PT_KNONVOLATILE_CONTEXT_POINTERS ContextPointers
     )
 {
index 1a8e52f..cb73307 100644 (file)
@@ -25,28 +25,28 @@ public:
     //
 
 protected:
-    HRESULT UnwindPrologue(__in DWORD64 ImageBase,
-                           __in DWORD64 ControlPc,
-                           __in DWORD64 FrameBase,
-                           __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    HRESULT UnwindPrologue(_In_ DWORD64 ImageBase,
+                           _In_ DWORD64 ControlPc,
+                           _In_ DWORD64 FrameBase,
+                           _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
                            __inout PT_CONTEXT ContextRecord);
 
-    HRESULT VirtualUnwind(__in DWORD64 ImageBase,
-                          __in DWORD64 ControlPc,
-                          __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    HRESULT VirtualUnwind(_In_ DWORD64 ImageBase,
+                          _In_ DWORD64 ControlPc,
+                          _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
                           __inout PT_CONTEXT ContextRecord,
-                          __out PDWORD64 EstablisherFrame);
+                          _Out_ PDWORD64 EstablisherFrame);
 
     DWORD64 LookupPrimaryUnwindInfo
-        (__in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
-         __in DWORD64 ImageBase,
-         __out _PIMAGE_RUNTIME_FUNCTION_ENTRY PrimaryEntry);
+        (_In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+         _In_ DWORD64 ImageBase,
+         _Out_ _PIMAGE_RUNTIME_FUNCTION_ENTRY PrimaryEntry);
 
     _PIMAGE_RUNTIME_FUNCTION_ENTRY SameFunction
-        (__in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
-         __in DWORD64 ImageBase,
-         __in DWORD64 ControlPc,
-         __out _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionReturnBuffer);
+        (_In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+         _In_ DWORD64 ImageBase,
+         _In_ DWORD64 ControlPc,
+         _Out_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionReturnBuffer);
 };
 
 #endif // __unwinder_arm__
index 5740c3c..feb5c81 100644 (file)
@@ -167,8 +167,8 @@ static const BYTE UnwindCodeSizeTable[256] =
 NTSTATUS
 RtlpUnwindCustom(
     __inout PT_CONTEXT ContextRecord,
-    __in BYTE Opcode,
-    __in PARM64_UNWIND_PARAMS UnwindParams
+    _In_ BYTE Opcode,
+    _In_ PARM64_UNWIND_PARAMS UnwindParams
     )
 
 /*++
@@ -374,10 +374,10 @@ Return Value:
 
 ULONG
 RtlpComputeScopeSize(
-    __in ULONG_PTR UnwindCodePtr,
-    __in ULONG_PTR UnwindCodesEndPtr,
-    __in BOOLEAN IsEpilog,
-    __in PARM64_UNWIND_PARAMS UnwindParams
+    _In_ ULONG_PTR UnwindCodePtr,
+    _In_ ULONG_PTR UnwindCodesEndPtr,
+    _In_ BOOLEAN IsEpilog,
+    _In_ PARM64_UNWIND_PARAMS UnwindParams
     )
 
 /*++
@@ -441,10 +441,10 @@ Return Value:
 NTSTATUS
 RtlpUnwindRestoreRegisterRange(
     __inout PT_CONTEXT ContextRecord,
-    __in LONG SpOffset,
-    __in ULONG FirstRegister,
-    __in ULONG RegisterCount,
-    __in PARM64_UNWIND_PARAMS UnwindParams
+    _In_ LONG SpOffset,
+    _In_ ULONG FirstRegister,
+    _In_ ULONG RegisterCount,
+    _In_ PARM64_UNWIND_PARAMS UnwindParams
     )
 
 /*++
@@ -517,10 +517,10 @@ Return Value:
 NTSTATUS
 RtlpUnwindRestoreFpRegisterRange(
     __inout PT_CONTEXT ContextRecord,
-    __in LONG SpOffset,
-    __in ULONG FirstRegister,
-    __in ULONG RegisterCount,
-    __in PARM64_UNWIND_PARAMS UnwindParams
+    _In_ LONG SpOffset,
+    _In_ ULONG FirstRegister,
+    _In_ ULONG RegisterCount,
+    _In_ PARM64_UNWIND_PARAMS UnwindParams
     )
 
 /*++
@@ -588,14 +588,14 @@ Return Value:
 
 NTSTATUS
 RtlpUnwindFunctionFull(
-    __in DWORD64 ControlPcRva,
-    __in ULONG_PTR ImageBase,
-    __in PT_RUNTIME_FUNCTION FunctionEntry,
+    _In_ DWORD64 ControlPcRva,
+    _In_ ULONG_PTR ImageBase,
+    _In_ PT_RUNTIME_FUNCTION FunctionEntry,
     __inout T_CONTEXT *ContextRecord,
-    __out PDWORD64 EstablisherFrame,
+    _Out_ PDWORD64 EstablisherFrame,
     __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine,
-    __out PVOID *HandlerData,
-    __in PARM64_UNWIND_PARAMS UnwindParams
+    _Out_ PVOID *HandlerData,
+    _In_ PARM64_UNWIND_PARAMS UnwindParams
     )
 
 /*++
@@ -1223,13 +1223,13 @@ finished:
 
 NTSTATUS
 RtlpUnwindFunctionCompact(
-    __in DWORD64 ControlPcRva,
-    __in PT_RUNTIME_FUNCTION FunctionEntry,
+    _In_ DWORD64 ControlPcRva,
+    _In_ PT_RUNTIME_FUNCTION FunctionEntry,
     __inout T_CONTEXT *ContextRecord,
-    __out PDWORD64 EstablisherFrame,
+    _Out_ PDWORD64 EstablisherFrame,
     __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine,
-    __out PVOID *HandlerData,
-    __in PARM64_UNWIND_PARAMS UnwindParams
+    _Out_ PVOID *HandlerData,
+    _In_ PARM64_UNWIND_PARAMS UnwindParams
     )
 
 /*++
index f0767d2..701a3e4 100644 (file)
@@ -25,28 +25,28 @@ public:
     //
 
 protected:
-    HRESULT UnwindPrologue(__in DWORD64 ImageBase,
-                           __in DWORD64 ControlPc,
-                           __in DWORD64 FrameBase,
-                           __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    HRESULT UnwindPrologue(_In_ DWORD64 ImageBase,
+                           _In_ DWORD64 ControlPc,
+                           _In_ DWORD64 FrameBase,
+                           _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
                            __inout PT_CONTEXT ContextRecord);
 
-    HRESULT VirtualUnwind(__in DWORD64 ImageBase,
-                          __in DWORD64 ControlPc,
-                          __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    HRESULT VirtualUnwind(_In_ DWORD64 ImageBase,
+                          _In_ DWORD64 ControlPc,
+                          _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
                           __inout PT_CONTEXT ContextRecord,
-                          __out PDWORD64 EstablisherFrame);
+                          _Out_ PDWORD64 EstablisherFrame);
 
     DWORD64 LookupPrimaryUnwindInfo
-        (__in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
-         __in DWORD64 ImageBase,
-         __out _PIMAGE_RUNTIME_FUNCTION_ENTRY PrimaryEntry);
+        (_In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+         _In_ DWORD64 ImageBase,
+         _Out_ _PIMAGE_RUNTIME_FUNCTION_ENTRY PrimaryEntry);
 
     _PIMAGE_RUNTIME_FUNCTION_ENTRY SameFunction
-        (__in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
-         __in DWORD64 ImageBase,
-         __in DWORD64 ControlPc,
-         __out _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionReturnBuffer);
+        (_In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+         _In_ DWORD64 ImageBase,
+         _In_ DWORD64 ControlPc,
+         _Out_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionReturnBuffer);
 };
 
 #endif // __unwinder_arm64__
index 958d0af..d90fc17 100644 (file)
@@ -98,13 +98,13 @@ Arguments:
 --*/
 HRESULT
 OOPStackUnwinderX86::VirtualUnwind(
-    __in DWORD HandlerType,
-    __in DWORD ImageBase,
-    __in DWORD ControlPc,
-    __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    _In_ DWORD HandlerType,
+    _In_ DWORD ImageBase,
+    _In_ DWORD ControlPc,
+    _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
     __inout PCONTEXT ContextRecord,
-    __out PVOID *HandlerData,
-    __out PDWORD EstablisherFrame,
+    _Out_ PVOID *HandlerData,
+    _Out_ PDWORD EstablisherFrame,
     __inout_opt PKNONVOLATILE_CONTEXT_POINTERS ContextPointers,
     __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine
     )
@@ -190,13 +190,13 @@ NTSYSAPI
 PEXCEPTION_ROUTINE
 NTAPI
 RtlVirtualUnwind (
-    __in DWORD HandlerType,
-    __in DWORD ImageBase,
-    __in DWORD ControlPc,
-    __in PRUNTIME_FUNCTION FunctionEntry,
+    _In_ DWORD HandlerType,
+    _In_ DWORD ImageBase,
+    _In_ DWORD ControlPc,
+    _In_ PRUNTIME_FUNCTION FunctionEntry,
     __inout PT_CONTEXT ContextRecord,
-    __out PVOID *HandlerData,
-    __out PDWORD EstablisherFrame,
+    _Out_ PVOID *HandlerData,
+    _Out_ PDWORD EstablisherFrame,
     __inout_opt PT_KNONVOLATILE_CONTEXT_POINTERS ContextPointers
     )
 {
index 6a6c389..202e79d 100644 (file)
@@ -19,13 +19,13 @@ class OOPStackUnwinderX86 : public OOPStackUnwinder
 public:
     static BOOL Unwind(T_CONTEXT* pContextRecord, T_KNONVOLATILE_CONTEXT_POINTERS* pContextPointers);
 
-    static HRESULT VirtualUnwind(__in DWORD HandlerType,
-        __in DWORD ImageBase,
-        __in DWORD ControlPc,
-        __in _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
+    static HRESULT VirtualUnwind(_In_ DWORD HandlerType,
+        _In_ DWORD ImageBase,
+        _In_ DWORD ControlPc,
+        _In_ _PIMAGE_RUNTIME_FUNCTION_ENTRY FunctionEntry,
         __inout PCONTEXT ContextRecord,
-        __out PVOID *HandlerData,
-        __out PDWORD EstablisherFrame,
+        _Out_ PVOID *HandlerData,
+        _Out_ PDWORD EstablisherFrame,
         __inout_opt PKNONVOLATILE_CONTEXT_POINTERS ContextPointers,
         __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine);
 };
index 98245fe..9dd7039 100644 (file)
@@ -25,7 +25,7 @@ EXTERN_C void GetRuntimeStackWalkInfo(IN  ULONG64   ControlPc,
 //
 
 HRESULT OOPStackUnwinder::GetModuleBase(      DWORD64  address,
-                                          __out PDWORD64 pdwBase)
+                                          _Out_ PDWORD64 pdwBase)
 {
     GetRuntimeStackWalkInfo(address, reinterpret_cast<UINT_PTR *>(pdwBase), NULL);
     return ((*pdwBase == NULL) ? E_FAIL : S_OK);
index 0c4838f..1924418 100644 (file)
@@ -29,7 +29,7 @@ protected:
     // Given a control PC, return the base of the module it is in.  For jitted managed code, this is the
     // start of the code heap.
     static HRESULT GetModuleBase(      DWORD64  address,
-                                 __out PDWORD64 pdwBase);
+                                 _Out_ PDWORD64 pdwBase);
 
     // Given a control PC, return the function entry of the functoin it is in.
     static HRESULT GetFunctionEntry(                       DWORD64 address,
index d4f6ec2..ad61193 100644 (file)
@@ -228,7 +228,7 @@ namespace
     HRESULT GetConfigDWORD(
         LPCWSTR name,
         DWORD defValue,
-        __out DWORD *result,
+        _Out_ DWORD *result,
         LookupOptions options)
     {
         CONTRACTL
index 0f4360e..34617d1 100644 (file)
@@ -23,7 +23,7 @@ namespace FString
 #define MAX_LENGTH 0x1fffff00
 
 
-HRESULT Unicode_Utf8_Length(__in_z LPCWSTR pString, __out bool * pAllAscii, __out DWORD * pLength)
+HRESULT Unicode_Utf8_Length(__in_z LPCWSTR pString, _Out_ bool * pAllAscii, _Out_ DWORD * pLength)
 {
     CONTRACTL
     {
@@ -143,7 +143,7 @@ HRESULT Unicode_Utf8(__in_z LPCWSTR pString, bool allAscii, __out_z LPSTR pBuffe
 }
 
 
-HRESULT Utf8_Unicode_Length(__in_z LPCSTR pString, __out bool * pAllAscii, __out DWORD * pLength)
+HRESULT Utf8_Unicode_Length(__in_z LPCSTR pString, _Out_ bool * pAllAscii, _Out_ DWORD * pLength)
 {
     CONTRACTL
     {
index bc377c6..51e39de 100644 (file)
@@ -502,9 +502,9 @@ class LoaderHeapSniffer
 
         static VOID RecordEvent(UnlockedLoaderHeap *pHeap,
                                 AllocationType allocationType,
-                                __in const char *szFile,
+                                _In_ const char *szFile,
                                 int            lineNum,
-                                __in const char *szAllocFile,
+                                _In_ const char *szAllocFile,
                                 int            allocLineNum,
                                 void          *pMem,
                                 size_t         dwRequestedSize,
@@ -1248,7 +1248,7 @@ BOOL UnlockedLoaderHeap::GetMoreCommittedPages(size_t dwMinSize)
 }
 
 void *UnlockedLoaderHeap::UnlockedAllocMem(size_t dwSize
-                                           COMMA_INDEBUG(__in const char *szFile)
+                                           COMMA_INDEBUG(_In_ const char *szFile)
                                            COMMA_INDEBUG(int  lineNum))
 {
     CONTRACT(void*)
@@ -1300,7 +1300,7 @@ static DWORD ShouldInjectFault()
 #endif
 
 void *UnlockedLoaderHeap::UnlockedAllocMem_NoThrow(size_t dwSize
-                                                   COMMA_INDEBUG(__in const char *szFile)
+                                                   COMMA_INDEBUG(_In_ const char *szFile)
                                                    COMMA_INDEBUG(int lineNum))
 {
     CONTRACT(void*)
@@ -1404,9 +1404,9 @@ again:
 
 void UnlockedLoaderHeap::UnlockedBackoutMem(void *pMem,
                                             size_t dwRequestedSize
-                                            COMMA_INDEBUG(__in const char *szFile)
+                                            COMMA_INDEBUG(_In_ const char *szFile)
                                             COMMA_INDEBUG(int  lineNum)
-                                            COMMA_INDEBUG(__in const char *szAllocFile)
+                                            COMMA_INDEBUG(_In_ const char *szAllocFile)
                                             COMMA_INDEBUG(int  allocLineNum))
 {
     CONTRACTL
@@ -1576,7 +1576,7 @@ void UnlockedLoaderHeap::UnlockedBackoutMem(void *pMem,
 void *UnlockedLoaderHeap::UnlockedAllocAlignedMem_NoThrow(size_t  dwRequestedSize,
                                                           size_t  alignment,
                                                           size_t *pdwExtra
-                                                          COMMA_INDEBUG(__in const char *szFile)
+                                                          COMMA_INDEBUG(_In_ const char *szFile)
                                                           COMMA_INDEBUG(int  lineNum))
 {
     CONTRACT(void*)
@@ -1713,7 +1713,7 @@ void *UnlockedLoaderHeap::UnlockedAllocAlignedMem_NoThrow(size_t  dwRequestedSiz
 void *UnlockedLoaderHeap::UnlockedAllocAlignedMem(size_t  dwRequestedSize,
                                                   size_t  dwAlignment,
                                                   size_t *pdwExtra
-                                                  COMMA_INDEBUG(__in const char *szFile)
+                                                  COMMA_INDEBUG(_In_ const char *szFile)
                                                   COMMA_INDEBUG(int  lineNum))
 {
     CONTRACTL
@@ -1908,9 +1908,9 @@ void UnlockedLoaderHeap::UnlockedPrintEvents()
 
 /*static*/ VOID LoaderHeapSniffer::RecordEvent(UnlockedLoaderHeap *pHeap,
                                                AllocationType allocationType,
-                                               __in const char *szFile,
+                                               _In_ const char *szFile,
                                                int            lineNum,
-                                               __in const char *szAllocFile,
+                                               _In_ const char *szAllocFile,
                                                int            allocLineNum,
                                                void          *pMem,
                                                size_t         dwRequestedSize,
index 4bf8787..161e859 100644 (file)
 *******************************************************************************/
 
 void MakePath (
-        __out CQuickWSTR &szPath,
-        __in LPCWSTR drive,
-        __in LPCWSTR dir,
-        __in LPCWSTR fname,
-        __in LPCWSTR ext
+        _Out_ CQuickWSTR &szPath,
+        _In_ LPCWSTR drive,
+        _In_ LPCWSTR dir,
+        _In_ LPCWSTR fname,
+        _In_ LPCWSTR ext
         )
 {
         CONTRACTL
index b087e6c..de07d5d 100644 (file)
@@ -75,7 +75,7 @@ void SplitPath(
 // A much more sensible version that just points to each section of the string.
 //*******************************************************************************
 void    SplitPathInterior(
-    __in      LPCWSTR wszPath,
+    _In_      LPCWSTR wszPath,
     __out_opt LPCWSTR *pwszDrive,    __out_opt size_t *pcchDrive,
     __out_opt LPCWSTR *pwszDir,      __out_opt size_t *pcchDir,
     __out_opt LPCWSTR *pwszFileName, __out_opt size_t *pcchFileName,
@@ -228,7 +228,7 @@ void    SplitPathInterior(
 *
 *******************************************************************************/
 
-void    SplitPath(__in SString const &path,
+void    SplitPath(_In_ SString const &path,
                   __inout_opt SString *drive,
                   __inout_opt SString *dir,
                   __inout_opt SString *fname,
index dfa07a6..06d1492 100644 (file)
@@ -956,7 +956,7 @@ void MagicDeinit(void)
 *       support this, so we need it for CoreCLR 4, if we require Win2K support
 ****************************************************************************/
 extern "C" __declspec(naked) void __stdcall
-ClrCaptureContext(__out PCONTEXT ctx)
+ClrCaptureContext(_Out_ PCONTEXT ctx)
 {
     __asm {
         push ebx;
index 5d1cdbc..22a79f9 100644 (file)
@@ -1338,7 +1338,7 @@ void ConfigString::init(const CLRConfig::ConfigStringInfo & info)
 // MyAssembly;mscorlib;System
 // MyAssembly;mscorlib System
 
-AssemblyNamesList::AssemblyNamesList(__in LPWSTR list)
+AssemblyNamesList::AssemblyNamesList(_In_ LPWSTR list)
 {
     CONTRACTL {
         THROWS;
index 593b8ff..a162022 100644 (file)
 
 #include "genanalysis.h"
 
-static int GetThreadUICultureId(__out LocaleIDValue* pLocale);  // TODO: This shouldn't use the LCID.  We should rely on name instead
+static int GetThreadUICultureId(_Out_ LocaleIDValue* pLocale);  // TODO: This shouldn't use the LCID.  We should rely on name instead
 
 static HRESULT GetThreadUICultureNames(__inout StringArrayList* pCultureNames);
 
@@ -2136,7 +2136,7 @@ INT32 GetLatchedExitCode (void)
 // Impl for UtilLoadStringRC Callback: In VM, we let the thread decide culture
 // Return an int uniquely describing which language this thread is using for ui.
 // ---------------------------------------------------------------------------
-static int GetThreadUICultureId(__out LocaleIDValue* pLocale)
+static int GetThreadUICultureId(_Out_ LocaleIDValue* pLocale)
 {
     CONTRACTL{
         NOTHROW;
index 0578cc2..a2b0129 100644 (file)
@@ -1753,7 +1753,7 @@ HRESULT ClassLoader::FindTypeDefByExportedType(IMDInternalImport *pCTImport, mdE
 
 #ifndef DACCESS_COMPILE
 
-VOID ClassLoader::CreateCanonicallyCasedKey(LPCUTF8 pszNameSpace, LPCUTF8 pszName, __out LPUTF8 *ppszOutNameSpace, __out LPUTF8 *ppszOutName)
+VOID ClassLoader::CreateCanonicallyCasedKey(LPCUTF8 pszNameSpace, LPCUTF8 pszName, _Out_ LPUTF8 *ppszOutNameSpace, _Out_ LPUTF8 *ppszOutName)
 {
     CONTRACTL
     {
index 53afd0b..820e69d 100644 (file)
@@ -874,7 +874,7 @@ public:
     //Creates a key with both the namespace and name converted to lowercase and
     //made into a proper namespace-path.
     VOID CreateCanonicallyCasedKey(LPCUTF8 pszNameSpace, LPCUTF8 pszName,
-                                      __out LPUTF8 *ppszOutNameSpace, __out LPUTF8 *ppszOutName);
+                                      _Out_ LPUTF8 *ppszOutNameSpace, _Out_ LPUTF8 *ppszOutName);
 
     static HRESULT FindTypeDefByExportedType(IMDInternalImport *pCTImport,
                                              mdExportedType mdCurrent,
index 56805d6..731ed40 100644 (file)
@@ -1889,7 +1889,7 @@ CodeFragmentHeap::~CodeFragmentHeap()
 TaggedMemAllocPtr CodeFragmentHeap::RealAllocAlignedMem(size_t  dwRequestedSize
                     ,unsigned  dwAlignment
 #ifdef _DEBUG
-                    ,__in __in_z const char *szFile
+                    ,_In_ __in_z const char *szFile
                     ,int  lineNum
 #endif
                     )
@@ -1963,9 +1963,9 @@ TaggedMemAllocPtr CodeFragmentHeap::RealAllocAlignedMem(size_t  dwRequestedSize
 void CodeFragmentHeap::RealBackoutMem(void *pMem
                     , size_t dwSize
 #ifdef _DEBUG
-                    , __in __in_z const char *szFile
+                    , _In_ __in_z const char *szFile
                     , int lineNum
-                    , __in __in_z const char *szAllocFile
+                    , _In_ __in_z const char *szAllocFile
                     , int allocLineNum
 #endif
                     )
index 032ee96..c1b2bbd 100644 (file)
@@ -686,7 +686,7 @@ public:
     TaggedMemAllocPtr RealAllocAlignedMem(size_t  dwRequestedSize
                                          ,unsigned  dwAlignment
 #ifdef _DEBUG
-                                         ,__in __in_z const char *szFile
+                                         ,_In_ __in_z const char *szFile
                                          ,int  lineNum
 #endif
                                          );
@@ -694,9 +694,9 @@ public:
     virtual void RealBackoutMem(void *pMem
                         , size_t dwSize
 #ifdef _DEBUG
-                        , __in __in_z const char *szFile
+                        , _In_ __in_z const char *szFile
                         , int lineNum
-                        , __in __in_z const char *szAllocFile
+                        , _In_ __in_z const char *szAllocFile
                         , int allocLineNum
 #endif
                         ) DAC_EMPTY();
index 318cc21..4a5aeae 100644 (file)
@@ -165,7 +165,7 @@ EventReporter::EventReporter(EventReporterType type)
 // Return Value:
 //    None.
 //
-void EventReporter::AddDescription(__in WCHAR *pString)
+void EventReporter::AddDescription(_In_ WCHAR *pString)
 {
     CONTRACTL
     {
index ac74acb..9b600e7 100644 (file)
@@ -52,7 +52,7 @@ public:
     // Construct
     EventReporter(EventReporterType type);
     // Add extra info into description part of the log
-    void AddDescription(__in WCHAR *pString);
+    void AddDescription(_In_ WCHAR *pString);
     void AddDescription(SString& s);
     // Start callstack record
     void BeginStackTrace();
index a9a33e5..17b042c 100644 (file)
@@ -5671,7 +5671,7 @@ VOID ETW::MethodLog::MethodTableRestored(MethodTable *pMethodTable)
 /****************************************************************************/
 /* This is called by the runtime when a Strong Name Verification Starts */
 /****************************************************************************/
-VOID ETW::SecurityLog::StrongNameVerificationStart(DWORD dwInFlags, __in LPWSTR strFullyQualifiedAssemblyName)
+VOID ETW::SecurityLog::StrongNameVerificationStart(DWORD dwInFlags, _In_ LPWSTR strFullyQualifiedAssemblyName)
 {
     WRAPPER_NO_CONTRACT;
 }
@@ -5680,7 +5680,7 @@ VOID ETW::SecurityLog::StrongNameVerificationStart(DWORD dwInFlags, __in LPWSTR
 /****************************************************************************/
 /* This is called by the runtime when a Strong Name Verification Ends */
 /****************************************************************************/
-VOID ETW::SecurityLog::StrongNameVerificationStop(DWORD dwInFlags,ULONG result, __in LPWSTR strFullyQualifiedAssemblyName)
+VOID ETW::SecurityLog::StrongNameVerificationStop(DWORD dwInFlags,ULONG result, _In_ LPWSTR strFullyQualifiedAssemblyName)
 {
     WRAPPER_NO_CONTRACT;
 }
@@ -6091,8 +6091,8 @@ VOID ETW::LoaderLog::SendAssemblyEvent(Assembly *pAssembly, DWORD dwEventOptions
 ETW_INLINE
     ULONG
     ETW::LoaderLog::SendModuleRange(
-    __in Module *pModule,
-    __in DWORD dwEventOptions)
+    _In_ Module *pModule,
+    _In_ DWORD dwEventOptions)
 
 {
     ULONG Result = ERROR_SUCCESS;
index 6ca5bb6..ac8037c 100644 (file)
@@ -1628,7 +1628,7 @@ size_t Interpreter::GetFrameSize(InterpreterMethodInfo* interpMethInfo)
 }
 
 // static
-ARG_SLOT Interpreter::ExecuteMethodWrapper(struct InterpreterMethodInfo* interpMethInfo, bool directCall, BYTE* ilArgs, void* stubContext, __out bool* pDoJmpCall, CORINFO_RESOLVED_TOKEN* pResolvedToken)
+ARG_SLOT Interpreter::ExecuteMethodWrapper(struct InterpreterMethodInfo* interpMethInfo, bool directCall, BYTE* ilArgs, void* stubContext, _Out_ bool* pDoJmpCall, CORINFO_RESOLVED_TOKEN* pResolvedToken)
 {
 #define INTERP_DYNAMIC_CONTRACTS 1
 #if INTERP_DYNAMIC_CONTRACTS
@@ -1995,7 +1995,7 @@ void Interpreter::DoMonitorExitWork()
 }
 
 
-void Interpreter::ExecuteMethod(ARG_SLOT* retVal, __out bool* pDoJmpCall, __out unsigned* pJmpCallToken)
+void Interpreter::ExecuteMethod(ARG_SLOT* retVal, _Out_ bool* pDoJmpCall, _Out_ unsigned* pJmpCallToken)
 {
 #if INTERP_DYNAMIC_CONTRACTS
     CONTRACTL {
index 084a8dc..57b1fa9 100644 (file)
@@ -92,12 +92,12 @@ HRESULT RunAndroidCmd(char* c_android_adb_path, LPCWSTR w_command_to_execute)
 //-----------------------------------------------------------------------------
 MONO_API HRESULT
 CreateProcessForLaunch(
-    __in LPWSTR lpCommandLine,
-    __in BOOL bSuspendProcess,
-    __in LPVOID lpEnvironment,
-    __in LPCWSTR lpCurrentDirectory,
-    __out PDWORD pProcessId,
-    __out HANDLE *pResumeHandle)
+    _In_ LPWSTR lpCommandLine,
+    _In_ BOOL bSuspendProcess,
+    _In_ LPVOID lpEnvironment,
+    _In_ LPCWSTR lpCurrentDirectory,
+    _Out_ PDWORD pProcessId,
+    _Out_ HANDLE *pResumeHandle)
 {
     PUBLIC_CONTRACT;
     PROCESS_INFORMATION processInfo;
@@ -157,14 +157,14 @@ CreateProcessForLaunch(
 
 MONO_API HRESULT
 ResumeProcess(
-    __in HANDLE hResumeHandle)
+    _In_ HANDLE hResumeHandle)
 {
     return S_OK;
 }
 
 MONO_API HRESULT
 CloseResumeHandle(
-    __in HANDLE hResumeHandle)
+    _In_ HANDLE hResumeHandle)
 {
     return S_OK;
 }
@@ -210,10 +210,10 @@ static IUnknown* pCordb = NULL;
 
 MONO_API HRESULT
 RegisterForRuntimeStartup(
-    __in DWORD dwProcessId,
-    __in PSTARTUP_CALLBACK pfnCallback,
-    __in PVOID parameter,
-    __out PVOID *ppUnregisterToken)
+    _In_ DWORD dwProcessId,
+    _In_ PSTARTUP_CALLBACK pfnCallback,
+    _In_ PVOID parameter,
+    _Out_ PVOID *ppUnregisterToken)
 {
     if (pCordb != NULL)
         return S_OK;
@@ -255,64 +255,64 @@ RegisterForRuntimeStartup(
 
 MONO_API HRESULT
 RegisterForRuntimeStartupEx(
-    __in DWORD dwProcessId,
-    __in LPCWSTR szApplicationGroupId,
-    __in PSTARTUP_CALLBACK pfnCallback,
-    __in PVOID parameter,
-    __out PVOID *ppUnregisterToken)
+    _In_ DWORD dwProcessId,
+    _In_ LPCWSTR szApplicationGroupId,
+    _In_ PSTARTUP_CALLBACK pfnCallback,
+    _In_ PVOID parameter,
+    _Out_ PVOID *ppUnregisterToken)
 {
     return S_OK;
 }
 
 MONO_API HRESULT
 UnregisterForRuntimeStartup(
-    __in PVOID pUnregisterToken)
+    _In_ PVOID pUnregisterToken)
 {
     return S_OK;
 }
 
 MONO_API HRESULT
 GetStartupNotificationEvent(
-    __in DWORD debuggeePID,
-    __out HANDLE* phStartupEvent)
+    _In_ DWORD debuggeePID,
+    _Out_ HANDLE* phStartupEvent)
 {
     return S_OK;
 }
 
 MONO_API HRESULT
 EnumerateCLRs(DWORD debuggeePID,
-    __out HANDLE** ppHandleArrayOut,
-    __out LPWSTR** ppStringArrayOut,
-    __out DWORD* pdwArrayLengthOut)
+    _Out_ HANDLE** ppHandleArrayOut,
+    _Out_ LPWSTR** ppStringArrayOut,
+    _Out_ DWORD* pdwArrayLengthOut)
 {
     return S_OK;
 }
 
 MONO_API HRESULT
 CloseCLREnumeration(
-    __in HANDLE* pHandleArray,
-    __in LPWSTR* pStringArray,
-    __in DWORD dwArrayLength)
+    _In_ HANDLE* pHandleArray,
+    _In_ LPWSTR* pStringArray,
+    _In_ DWORD dwArrayLength)
 {
     return S_OK;
 }
 
 MONO_API HRESULT
 CreateVersionStringFromModule(
-    __in DWORD pidDebuggee,
-    __in LPCWSTR szModuleName,
+    _In_ DWORD pidDebuggee,
+    _In_ LPCWSTR szModuleName,
     __out_ecount_part(cchBuffer, *pdwLength) LPWSTR pBuffer,
-    __in DWORD cchBuffer,
-    __out DWORD* pdwLength)
+    _In_ DWORD cchBuffer,
+    _Out_ DWORD* pdwLength)
 {
     return S_OK;
 }
 
 MONO_API HRESULT
 CreateDebuggingInterfaceFromVersionEx(
-    __in int iDebuggerVersion,
-    __in LPCWSTR szDebuggeeVersion,
-    __out IUnknown ** ppCordb)
+    _In_ int iDebuggerVersion,
+    _In_ LPCWSTR szDebuggeeVersion,
+    _Out_ IUnknown ** ppCordb)
 {
     return S_OK;
 }
@@ -320,18 +320,18 @@ CreateDebuggingInterfaceFromVersionEx(
 MONO_API
 HRESULT
 CreateDebuggingInterfaceFromVersion2(
-    __in int iDebuggerVersion,
-    __in LPCWSTR szDebuggeeVersion,
-    __in LPCWSTR szApplicationGroupId,
-    __out IUnknown ** ppCordb)
+    _In_ int iDebuggerVersion,
+    _In_ LPCWSTR szDebuggeeVersion,
+    _In_ LPCWSTR szApplicationGroupId,
+    _Out_ IUnknown ** ppCordb)
 {
     return S_OK;
 }
 
 MONO_API HRESULT
 CreateDebuggingInterfaceFromVersion(
-    __in LPCWSTR szDebuggeeVersion,
-    __out IUnknown ** ppCordb)
+    _In_ LPCWSTR szDebuggeeVersion,
+    _Out_ IUnknown ** ppCordb)
 {
     return S_OK;
 }
index 0926712..49d2257 100644 (file)
@@ -19,80 +19,80 @@ typedef VOID (*PSTARTUP_CALLBACK)(IUnknown *pCordb, PVOID parameter, HRESULT hr)
 
 MONO_API HRESULT
 CreateProcessForLaunch(
-    __in LPWSTR lpCommandLine,
-    __in BOOL bSuspendProcess,
-    __in LPVOID lpEnvironment,
-    __in LPCWSTR lpCurrentDirectory,
-    __out PDWORD pProcessId,
-    __out HANDLE *pResumeHandle);
+    _In_ LPWSTR lpCommandLine,
+    _In_ BOOL bSuspendProcess,
+    _In_ LPVOID lpEnvironment,
+    _In_ LPCWSTR lpCurrentDirectory,
+    _Out_ PDWORD pProcessId,
+    _Out_ HANDLE *pResumeHandle);
 
 MONO_API HRESULT
 ResumeProcess(
-    __in HANDLE hResumeHandle);
+    _In_ HANDLE hResumeHandle);
 
 MONO_API HRESULT
 CloseResumeHandle(
-    __in HANDLE hResumeHandle);
+    _In_ HANDLE hResumeHandle);
 
 MONO_API HRESULT
 RegisterForRuntimeStartup(
-    __in DWORD dwProcessId,
-    __in PSTARTUP_CALLBACK pfnCallback,
-    __in PVOID parameter,
-    __out PVOID *ppUnregisterToken);
+    _In_ DWORD dwProcessId,
+    _In_ PSTARTUP_CALLBACK pfnCallback,
+    _In_ PVOID parameter,
+    _Out_ PVOID *ppUnregisterToken);
 
 MONO_API HRESULT
 RegisterForRuntimeStartupEx(
-    __in DWORD dwProcessId,
-    __in LPCWSTR szApplicationGroupId,
-    __in PSTARTUP_CALLBACK pfnCallback,
-    __in PVOID parameter,
-    __out PVOID *ppUnregisterToken);
+    _In_ DWORD dwProcessId,
+    _In_ LPCWSTR szApplicationGroupId,
+    _In_ PSTARTUP_CALLBACK pfnCallback,
+    _In_ PVOID parameter,
+    _Out_ PVOID *ppUnregisterToken);
 
 MONO_API HRESULT
 UnregisterForRuntimeStartup(
-    __in PVOID pUnregisterToken);
+    _In_ PVOID pUnregisterToken);
 
 MONO_API HRESULT
 GetStartupNotificationEvent(
-    __in DWORD debuggeePID,
-    __out HANDLE* phStartupEvent);
+    _In_ DWORD debuggeePID,
+    _Out_ HANDLE* phStartupEvent);
 
 MONO_API HRESULT
 EnumerateCLRs(DWORD debuggeePID,
-    __out HANDLE** ppHandleArrayOut,
-    __out LPWSTR** ppStringArrayOut,
-    __out DWORD* pdwArrayLengthOut);
+    _Out_ HANDLE** ppHandleArrayOut,
+    _Out_ LPWSTR** ppStringArrayOut,
+    _Out_ DWORD* pdwArrayLengthOut);
 
 MONO_API HRESULT
 CloseCLREnumeration(
-    __in HANDLE* pHandleArray,
-    __in LPWSTR* pStringArray,
-    __in DWORD dwArrayLength);
+    _In_ HANDLE* pHandleArray,
+    _In_ LPWSTR* pStringArray,
+    _In_ DWORD dwArrayLength);
 
 MONO_API HRESULT
 CreateVersionStringFromModule(
-    __in DWORD pidDebuggee,
-    __in LPCWSTR szModuleName,
+    _In_ DWORD pidDebuggee,
+    _In_ LPCWSTR szModuleName,
     __out_ecount_part(cchBuffer, *pdwLength) LPWSTR pBuffer,
-    __in DWORD cchBuffer,
-    __out DWORD* pdwLength);
+    _In_ DWORD cchBuffer,
+    _Out_ DWORD* pdwLength);
 
 MONO_API HRESULT
 CreateDebuggingInterfaceFromVersionEx(
-    __in int iDebuggerVersion,
-    __in LPCWSTR szDebuggeeVersion,
-    __out IUnknown ** ppCordb);
+    _In_ int iDebuggerVersion,
+    _In_ LPCWSTR szDebuggeeVersion,
+    _Out_ IUnknown ** ppCordb);
 
 MONO_API
 HRESULT
 CreateDebuggingInterfaceFromVersion2(
-    __in int iDebuggerVersion,
-    __in LPCWSTR szDebuggeeVersion,
-    __in LPCWSTR szApplicationGroupId,
-    __out IUnknown ** ppCordb);
+    _In_ int iDebuggerVersion,
+    _In_ LPCWSTR szDebuggeeVersion,
+    _In_ LPCWSTR szApplicationGroupId,
+    _Out_ IUnknown ** ppCordb);
 
 MONO_API HRESULT
 CreateDebuggingInterfaceFromVersion(
-    __in LPCWSTR szDebuggeeVersion,
-    __out IUnknown ** ppCordb);
+    _In_ LPCWSTR szDebuggeeVersion,
+    _Out_ IUnknown ** ppCordb);