#ifdef FEATURE_PAL
// UNIXTODO: mikem 1/13/15 Need appropriate PAL functions for getting ids
- *pPId = (DWORD)hProcess;
- *pThreadId = (DWORD)hThread;
+ *pPId = (DWORD)(SIZE_T)hProcess;
+ *pThreadId = (DWORD)(SIZE_T)hThread;
#else
#if !defined(FEATURE_CORESYSTEM)
HMODULE hKernel32 = WszGetModuleHandle(W("kernel32.dll"));
{
// Get the appdomain
IGCHandleManager *mgr = GCHandleUtilities::GetGCHandleManager();
- ADIndex appDomainIndex = ADIndex(reinterpret_cast<DWORD>(mgr->GetHandleContext(objectHandle)));
+ ADIndex appDomainIndex = ADIndex((DWORD)(SIZE_T)(mgr->GetHandleContext(objectHandle)));
pAppDomain = SystemDomain::GetAppDomainAtIndex(appDomainIndex);
_ASSERTE(pAppDomain != NULL);
--*/
static uintptr_t GetFullAffinityMask(int cpuCount)
{
- if (cpuCount < sizeof(uintptr_t) * 8)
+ if ((size_t)cpuCount < sizeof(uintptr_t) * 8)
{
return ((uintptr_t)1 << cpuCount) - 1;
}
--*/
KAFFINITY GetFullAffinityMask(int cpuCount)
{
- if (cpuCount < sizeof(KAFFINITY) * 8)
+ if ((size_t)cpuCount < sizeof(KAFFINITY) * 8)
{
return ((KAFFINITY)1 << (cpuCount)) - 1;
}
#endif
IGCHandleManager *mgr = GCHandleUtilities::GetGCHandleManager();
- ADIndex appDomainIndex = ADIndex(reinterpret_cast<DWORD>(mgr->GetHandleContext(handle)));
+ ADIndex appDomainIndex = ADIndex((DWORD)((SIZE_T)mgr->GetHandleContext(handle)));
ValidateObjectAndAppDomain(objRef, appDomainIndex);
#endif // _DEBUG_IMPL
#if defined(_DEBUG_IMPL) && !defined(DACCESS_COMPILE)
// not allowed to dispatch virtually on a IGCHandleManager when compiling for DAC
- DWORD context = (DWORD)GCHandleUtilities::GetGCHandleManager()->GetHandleContext(handle);
+ DWORD context = (DWORD)(SIZE_T)GCHandleUtilities::GetGCHandleManager()->GetHandleContext(handle);
OBJECTREF objRef = ObjectToOBJECTREF(*(Object**)handle);
ValidateObjectAndAppDomain(objRef, ADIndex(context));
ThrowHR(E_NOTIMPL);
}
- _ASSERTE(((DWORD)pResolvedToken->tokenContext & 1) == 0);
+ _ASSERTE(((DWORD)(SIZE_T)pResolvedToken->tokenContext & 1) == 0);
return GetImportForSignature<ZapDynamicHelperCell, ZapNodeType_DynamicHelperCell>((void*)pResolvedToken->tokenContext, &sigBuilder);
}
ReadyToRunHelper GetReadyToRunHelper()
{
- return (ReadyToRunHelper)((DWORD)GetHandle() & ~READYTORUN_HELPER_FLAG_VSD);
+ return (ReadyToRunHelper)((DWORD)(SIZE_T)GetHandle() & ~READYTORUN_HELPER_FLAG_VSD);
}
DWORD GetSectionIndex()
{
- return (DWORD)GetHandle2();
+ return (DWORD)(SIZE_T)GetHandle2();
}
BOOL IsDelayLoadHelper()
BOOL IsVSD()
{
- return ((DWORD)GetHandle() & READYTORUN_HELPER_FLAG_VSD) != 0;
+ return ((DWORD)(SIZE_T)GetHandle() & READYTORUN_HELPER_FLAG_VSD) != 0;
}
BOOL IsLazyHelper()