本文整理汇总了C++中LODWORD函数的典型用法代码示例。如果您正苦于以下问题:C++ LODWORD函数的具体用法?C++ LODWORD怎么用?C++ LODWORD使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LODWORD函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sizeof
HWND CConEmuInside::CheckInsideFocus()
{
if (!isInsideWndSet())
{
//_ASSERTE(FALSE && "Inside was not initialized");
return NULL;
}
wchar_t szInfo[512];
GUITHREADINFO tif = { sizeof(tif) };
HWND hParentWnd = GetParentRoot();
DWORD nTID = GetWindowThreadProcessId(hParentWnd, NULL);
if (!GetGUIThreadInfo(nTID, &tif))
{
_wsprintf(szInfo, SKIPCOUNT(szInfo) L"GetGUIThreadInfo(%u) failed, code=%u", nTID, GetLastError());
LogString(szInfo);
return NULL;
}
static GUITHREADINFO last_tif = {};
if (memcmp(&last_tif, &tif, sizeof(tif)) != 0)
{
last_tif = tif;
_wsprintf(szInfo, SKIPCOUNT(szInfo)
L"ParentInputInfo: flags=x%X Active=x%X Focus=x%X Capture=x%X Menu=x%X MoveSize=x%X Caret=x%X (%i,%i)-(%i,%i)",
tif.flags, LODWORD(tif.hwndActive), LODWORD(tif.hwndFocus), LODWORD(tif.hwndCapture), LODWORD(tif.hwndMenuOwner),
LODWORD(tif.hwndMoveSize), LODWORD(tif.hwndCaret), LOGRECTCOORDS(tif.rcCaret));
LogString(szInfo);
}
return tif.hwndFocus;
}
示例2: rdtsc_diff
BOOL rdtsc_diff()
{
ULONGLONG tsc1;
ULONGLONG tsc2;
ULONGLONG tsc3;
DWORD i = 0;
// Try this 10 times in case of small fluctuations
for (i = 0; i < 10; i++)
{
tsc1 = __rdtsc();
// Waste some cycles - should be faster than CloseHandle on bare metal
GetProcessHeap();
tsc2 = __rdtsc();
// Waste some cycles - slightly longer than GetProcessHeap() on bare metal
CloseHandle(0);
tsc3 = __rdtsc();
// Did it take at least 10 times more CPU cycles to perform CloseHandle than it took to perform GetProcessHeap()?
if ((LODWORD(tsc3) - LODWORD(tsc2)) / (LODWORD(tsc2) - LODWORD(tsc1)) >= 10)
return TRUE;
}
// We consistently saw a small ratio of difference between GetProcessHeap and CloseHandle execution times
// so we're probably in a VM!
return FALSE;
}
示例3: LODWORD
void CCamera::ProcessFade()
{
if(m_bFading)
{
if(m_iFadingDirection == 1)
{
if ( this->fFadeDuration == 0.0 )
LODWORD(this->fFadeAlpha) = 0;
else
this->fFadeAlpha = this->fFadeAlpha - CTimer__ms_fTimeStep * 0.01999999955296516 / this->fFadeDuration * 255.0;
if ( this->fFadeAlpha > 0.0 )
goto LABEL_16;
this->bFading = 0;
}
else
{
if ( v1 )
goto LABEL_16;
if ( this->fFadeAlpha >= 255.0 )
this->bFading = 0;
LODWORD(v2) = 1132396544;
if ( this->fFadeDuration == 0.0 )
LODWORD(this->fFadeAlpha) = 1132396544;
else
this->fFadeAlpha = CTimer__ms_fTimeStep * 0.01999999955296516 / this->fFadeDuration * 255.0 + this->fFadeAlpha;
if ( this->fFadeAlpha < 255.0 )
goto LABEL_16;
}
m_fFadeAlpha = v2;
LABEL_16:
CDraw__FadeValue.alpha = (unsigned __int64)this->fFadeAlpha;
}
}
示例4: sizeof
//005543f0 -> 100%
void CMasterLevelSystem::GDReqMasterLevelInfoSave(LPOBJ lpObj) //OK
{
if( !lpObj->m_bMasterLevelDBLoad )
{
return;
}
// ----
MLP_REQ_MASTERLEVEL_INFOSAVE pMsg;
pMsg.h.set((LPBYTE)&pMsg, 0x31, sizeof(MLP_REQ_MASTERLEVEL_INFOSAVE));
// ----
memcpy(pMsg.szCharName, lpObj->Name, MAX_IDSTRING);
pMsg.szCharName[MAX_IDSTRING] = 0;
pMsg.nMLevel = lpObj->m_nMasterLevel;
pMsg.i64MLExp = lpObj->m_i64MasterLevelExp;
pMsg.i64NextMLExp = lpObj->m_i64NextMasterLevelExp;
pMsg.nMLPoint = LOWORD(lpObj->m_iMasterLevelPoint);
// ----
cDBSMng.Send((char*)&pMsg, pMsg.h.size);
// ----
LogAddTD("[%s][%s] MasterLevel Info Save [MLevel:%d][MLExp:%I64d][MLNextExp:%I64d][MLPoint:%d]",
lpObj->AccountID, lpObj->Name, lpObj->m_nMasterLevel,
LODWORD(lpObj->m_i64MasterLevelExp), HIDWORD(lpObj->m_i64MasterLevelExp),
LODWORD(lpObj->m_i64NextMasterLevelExp), HIDWORD(lpObj->m_i64NextMasterLevelExp),
lpObj->m_iMasterLevelPoint);
}
示例5: LODWORD
int FxSystem_c::AddParticle(RwV3d* pVecPosition, RwV3d* pVecDirection, float fBlur, FxPrtMult_c* pParticleInfo, float a6, float fBrightness, float a8, unsigned char a9)
{
signed int v11 = (unsigned __int64)((double)rand() * 0.000030517578 * 100.0);
if ( g_fx.GetFxQuality() != 0 || v11 >= 50 )
{
if ( g_fx.GetFxQuality() != 1 || v11 >= 25 )
{
float v14 = 1.0;
if ( fBrightness < (double)a8 )
v14 = 1.0 - a8 + fBrightness;
for (size_t i = 0; i < this->m_fxSystemBP->GetNumFxEmitterBP(); i++)
{
FxEmitter_c* emitter = m_fxEmitters[i];
if (emitter->IsActive())
{
(*(void (__stdcall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(v13->vtbl + 0x14))(
pVecPosition,
pVecDirection,
fBlur,
pParticleInfo,
LODWORD(a6),
LODWORD(v14),
a9);
}
}
}
}
}
示例6: _wsprintf
void CGestures::DumpGesture(LPCWSTR tp, const GESTUREINFO& gi)
{
wchar_t szDump[256];
_wsprintf(szDump, SKIPLEN(countof(szDump))
L"Gesture(x%08X {%i,%i} %s",
(DWORD)gi.hwndTarget, gi.ptsLocation.x, gi.ptsLocation.y,
tp); // tp - имя жеста
switch (gi.dwID)
{
case GID_PRESSANDTAP:
{
DWORD h = LODWORD(gi.ullArguments); _wsprintf(szDump+_tcslen(szDump), SKIPLEN(32)
L" Dist={%i,%i}", (int)(short)LOWORD(h), (int)(short)HIWORD(h));
break;
}
case GID_ROTATE:
{
DWORD h = LODWORD(gi.ullArguments); _wsprintf(szDump+_tcslen(szDump), SKIPLEN(32)
L" %i", (int)LOWORD(h));
break;
}
}
if (gi.dwFlags&GF_BEGIN)
wcscat_c(szDump, L" GF_BEGIN");
if (gi.dwFlags&GF_END)
wcscat_c(szDump, L" GF_END");
if (gi.dwFlags&GF_INERTIA)
{
wcscat_c(szDump, L" GF_INERTIA");
DWORD h = HIDWORD(gi.ullArguments); _wsprintf(szDump+_tcslen(szDump), SKIPLEN(32)
L" {%i,%i}", (int)(short)LOWORD(h), (int)(short)HIWORD(h));
}
if (gpSetCls->isAdvLogging >= 2)
{
gpConEmu->LogString(szDump);
}
else
{
#ifdef USE_DUMPGEST
wcscat_c(szDump, L")\n");
DEBUGSTR(szDump);
#endif
}
}
示例7: mainroutine
__int64 __fastcall mainroutine(__int64 a1, __int64 a2)
{
(...)
while ( 1 )
{
src = off_602540[v13];
if ( !src )
break;
v12 = time(0LL);
sleep(*(&seconds + v13));
v11 = (unsigned __int64)time(0LL) - v12;
sprintf(&s, "%d", v11, v4);
strcpy(&dest, src);
strcat(&dest, &s);
if ( !sub_400D65(&dest, (unsigned int)dword_602300[v13], &v8) )
{
LODWORD(v3) = sub_400DDD(&dest);
printf(v3);
dword_602BF8 = 0;
}
++v13;
}
putchar(10);
result = 0LL;
}
示例8: OnSetConsoleKeyShortcuts
// Undocumented function
BOOL WINAPI OnSetConsoleKeyShortcuts(BOOL bSet, BYTE bReserveKeys, LPVOID p1, DWORD n1)
{
//typedef BOOL (WINAPI* OnSetConsoleKeyShortcuts_t)(BOOL,BYTE,LPVOID,DWORD);
ORIGINALFASTEX(SetConsoleKeyShortcuts,NULL);
BOOL lbRc = FALSE;
if (F(SetConsoleKeyShortcuts))
lbRc = F(SetConsoleKeyShortcuts)(bSet, bReserveKeys, p1, n1);
if (ghConEmuWnd && IsWindow(ghConEmuWnd))
{
DWORD nLastErr = GetLastError();
DWORD nSize = sizeof(CESERVER_REQ_HDR)+sizeof(BYTE)*2;
CESERVER_REQ *pIn = ExecuteNewCmd(CECMD_KEYSHORTCUTS, nSize);
if (pIn)
{
pIn->Data[0] = bSet;
pIn->Data[1] = bReserveKeys;
wchar_t szGuiPipeName[128];
msprintf(szGuiPipeName, countof(szGuiPipeName), CEGUIPIPENAME, L".", LODWORD(ghConWnd));
CESERVER_REQ* pOut = ExecuteCmd(szGuiPipeName, pIn, 1000, NULL);
if (pOut)
ExecuteFreeResult(pOut);
ExecuteFreeResult(pIn);
}
SetLastError(nLastErr);
}
return lbRc;
}
示例9: WriteFileAsyn
BOOL WriteFileAsyn( HANDLE hFile, ULONGLONG ullOffset, DWORD &dwSize, LPBYTE lpBuffer, LPOVERLAPPED lpOverlap, PDWORD pdwErrorCode )
{
DWORD dwWriteLen = 0;
DWORD dwErrorCode = 0;
if (lpOverlap)
{
lpOverlap->Offset = LODWORD(ullOffset);
lpOverlap->OffsetHigh = HIDWORD(ullOffset);
}
else
{
LARGE_INTEGER liFileSize = {0};
liFileSize.QuadPart = (LONGLONG)ullOffset;
if (!SetFilePointerEx(hFile,liFileSize,NULL,FILE_BEGIN))
{
*pdwErrorCode = GetLastError();
return FALSE;
}
}
if (!WriteFile(hFile,lpBuffer,dwSize,&dwWriteLen,lpOverlap))
{
dwErrorCode = ::GetLastError();
if(dwErrorCode == ERROR_IO_PENDING) // 结束异步I/O
{
if (WaitForSingleObject(lpOverlap->hEvent, INFINITE) != WAIT_FAILED)
{
if(!::GetOverlappedResult(hFile, lpOverlap, &dwWriteLen, FALSE))
{
*pdwErrorCode = ::GetLastError();
return FALSE;
}
else
{
dwSize = dwWriteLen;
return TRUE;
}
}
else
{
*pdwErrorCode = ::GetLastError();
return FALSE;
}
}
else
{
*pdwErrorCode = dwErrorCode;
return FALSE;
}
}
else
{
dwSize = dwWriteLen;
return TRUE;
}
}
示例10: LoadSrvMapping
// hConWnd - HWND _реальной_ консоли
BOOL LoadSrvMapping(HWND hConWnd, CESERVER_CONSOLE_MAPPING_HDR& SrvMapping)
{
if (!hConWnd)
return FALSE;
MFileMapping<CESERVER_CONSOLE_MAPPING_HDR> SrvInfoMapping;
SrvInfoMapping.InitName(CECONMAPNAME, LODWORD(hConWnd));
const CESERVER_CONSOLE_MAPPING_HDR* pInfo = SrvInfoMapping.Open();
if (!pInfo)
return FALSE;
else if (pInfo->nProtocolVersion != CESERVER_REQ_VER)
return FALSE;
else
{
memmove(&SrvMapping, pInfo, min(pInfo->cbSize, sizeof(SrvMapping)));
/*bDosBoxAllowed = pInfo->bDosBox;
wcscpy_c(szBaseDir, pInfo->sConEmuBaseDir);
wcscat_c(szBaseDir, L"\\");
if (pInfo->nLoggingType != glt_Processes)
return NULL;*/
}
SrvInfoMapping.CloseMap();
return (SrvMapping.cbSize != 0);
}
示例11: NotifyEvent
// Completes a frame-step operation.
HRESULT EVRCustomPresenter::CompleteFrameStep(IMFSample *pSample)
{
HRESULT hr = S_OK;
MFTIME hnsSampleTime = 0;
MFTIME hnsSystemTime = 0;
// Update our state.
m_FrameStep.state = FRAMESTEP_COMPLETE;
m_FrameStep.pSampleNoRef = NULL;
// Notify the EVR that the frame-step is complete.
NotifyEvent(EC_STEP_COMPLETE, FALSE, 0); // FALSE = completed (not cancelled)
// If we are scrubbing (rate == 0), also send the "scrub time" event.
if (IsScrubbing())
{
// Get the time stamp from the sample.
hr = pSample->GetSampleTime(&hnsSampleTime);
if (FAILED(hr))
{
// No time stamp. Use the current presentation time.
if (m_pClock)
{
hr = m_pClock->GetCorrelatedTime(0, &hnsSampleTime, &hnsSystemTime);
}
hr = S_OK; // Not an error condition.
}
NotifyEvent(EC_SCRUB_TIME, LODWORD(hnsSampleTime), HIDWORD(hnsSampleTime));
}
return hr;
}
示例12: ReadSectors
BOOL ReadSectors( HANDLE hDevice, ULONGLONG ullStartSector, DWORD dwSectors, DWORD dwBytesPerSector, LPBYTE lpSectBuff, LPOVERLAPPED lpOverlap, DWORD *pdwErrorCode )
{
ULONGLONG ullOffset = ullStartSector * dwBytesPerSector;
DWORD dwLen = dwSectors * dwBytesPerSector;
DWORD dwReadLen = 0;
DWORD dwErrorCode = 0;
if (lpOverlap)
{
lpOverlap->Offset = LODWORD(ullOffset);
lpOverlap->OffsetHigh = HIDWORD(ullOffset);
}
else
{
LARGE_INTEGER liFileSize = {0};
liFileSize.QuadPart = (LONGLONG)ullOffset;
if (!SetFilePointerEx(hDevice,liFileSize,NULL,FILE_BEGIN))
{
*pdwErrorCode = GetLastError();
return FALSE;
}
}
if (!ReadFile(hDevice,lpSectBuff,dwLen,&dwReadLen,lpOverlap))
{
dwErrorCode = ::GetLastError();
if(dwErrorCode == ERROR_IO_PENDING) // 结束异步I/O
{
if (WaitForSingleObject(lpOverlap->hEvent, INFINITE) != WAIT_FAILED)
{
if(!::GetOverlappedResult(hDevice, lpOverlap, &dwReadLen, FALSE))
{
*pdwErrorCode = ::GetLastError();
return FALSE;
}
else
{
return TRUE;
}
}
else
{
*pdwErrorCode = ::GetLastError();
return FALSE;
}
}
else
{
*pdwErrorCode = dwErrorCode;
return FALSE;
}
}
else
{
return TRUE;
}
}
示例13: GetRelativeBranchDestination
LPVOID GetRelativeBranchDestination(LPVOID lpInst,hdes *hs)
{
#ifdef _AMD64_
return (LPVOID)MAKEDWORDLONG((LODWORD(lpInst)+hs->len+hs->imm.imm32),HIDWORD(lpInst));
#else
return (LPVOID)((DWORD)lpInst+hs->len+hs->imm.imm32);
#endif
}
示例14: MEMvAllocateShared
VOID
MEMvAllocateShared(
PSAllocMap pamMem
)
{
if (!g_bInit)
pamMem->dwRawVAddr = (DWORD)mALLOc((size_t)pamMem->dwRawSize * (size_t)sizeof(BYTE));
/* If allocation failed, virtual/phisical address == NULL */
if ((PVOID)pamMem->dwRawVAddr == NULL) {
LODWORD(pamMem->qwRawPAddr) = 0;
HIDWORD(pamMem->qwRawPAddr) = 0;
return;
} else
memset((PVOID)pamMem->dwRawVAddr, 0, (size_t)pamMem->dwRawSize * (size_t)sizeof(BYTE));
LODWORD(pamMem->qwRawPAddr) = pamMem->dwRawVAddr;
HIDWORD(pamMem->qwRawPAddr) = 0;
}
示例15: acpi_ut_value_exit
void
acpi_ut_value_exit (
u32 line_number,
acpi_debug_print_info *dbg_info,
acpi_integer value)
{
acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
"%s %8.8X%8.8X\n", acpi_gbl_fn_exit_str, HIDWORD(value), LODWORD(value));
acpi_gbl_nesting_level--;
}