• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ LODWORD函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LODWORD函数的典型用法代码示例。如果您正苦于以下问题:C++ LODWORD函数的具体用法?C++ LODWORD怎么用?C++ LODWORD使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LODWORD函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:2asoft,项目名称:ConEmu,代码行数:34,代码来源:Inside.cpp


示例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;
}
开发者ID:LordNoteworthy,项目名称:al-khaser,代码行数:31,代码来源:timing.cpp


示例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;
    }
}
开发者ID:ArnCarveris,项目名称:GTASA,代码行数:33,代码来源:CCamera.cpp


示例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);
}
开发者ID:Natzugen,项目名称:test,代码行数:26,代码来源:MasterLevelSystem.cpp


示例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);
				}
			}
		}
	}
}
开发者ID:WLSF,项目名称:GTASA,代码行数:28,代码来源:FxSystem_c.cpp


示例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
	}
}
开发者ID:rheostat2718,项目名称:conemu-maximus5,代码行数:53,代码来源:GestureEngine.cpp


示例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;
 }
开发者ID:AmesianX,项目名称:write-ups-2015,代码行数:27,代码来源:main.c


示例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;
}
开发者ID:VladimirTyrin,项目名称:ConEmu,代码行数:34,代码来源:hkConsole.cpp


示例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;
	}
}
开发者ID:Binggoo,项目名称:RWDisk,代码行数:60,代码来源:RWDisk.cpp


示例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);
}
开发者ID:akrisiun,项目名称:ConEmu,代码行数:26,代码来源:ConEmuCheck.cpp


示例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;
}
开发者ID:DieBagger,项目名称:MediaPortal-2,代码行数:34,代码来源:FrameStepping.cpp


示例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;
	}
}
开发者ID:Binggoo,项目名称:RWDisk,代码行数:60,代码来源:RWDisk.cpp


示例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
}
开发者ID:AlexWMF,项目名称:Carberp,代码行数:8,代码来源:hook_api.cpp


示例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;
}
开发者ID:HonestarKevin,项目名称:wm8880_4_4_uboot,代码行数:19,代码来源:mem.c


示例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--;
}
开发者ID:nhanh0,项目名称:hah,代码行数:12,代码来源:utdebug.c


示例16: GuiMessageBox

int GuiMessageBox(HWND hConEmuWndRoot, LPCWSTR asText, LPCWSTR asTitle, int anBtns)
{
	int nResult = 0;
	
	if (hConEmuWndRoot)
	{
		HWND hConWnd = myGetConsoleWindow();
		CESERVER_REQ *pIn = (CESERVER_REQ*)malloc(sizeof(*pIn));
		ExecutePrepareCmd(pIn, CECMD_ASSERT, sizeof(CESERVER_REQ_HDR)+sizeof(MyAssertInfo));
		pIn->AssertInfo.nBtns = anBtns;
		_wcscpyn_c(pIn->AssertInfo.szTitle, countof(pIn->AssertInfo.szTitle), asTitle, countof(pIn->AssertInfo.szTitle)); //-V501
		_wcscpyn_c(pIn->AssertInfo.szDebugInfo, countof(pIn->AssertInfo.szDebugInfo), asText, countof(pIn->AssertInfo.szDebugInfo)); //-V501

		wchar_t szGuiPipeName[128];
		msprintf(szGuiPipeName, countof(szGuiPipeName), CEGUIPIPENAME, L".", LODWORD(hConEmuWndRoot));

		CESERVER_REQ* pOut = ExecuteCmd(szGuiPipeName, pIn, 1000, hConWnd);

		free(pIn);

		if (pOut)
		{
			if (pOut->hdr.cbSize > sizeof(CESERVER_REQ_HDR))
			{
				nResult = pOut->dwData[0];
			}
			ExecuteFreeResult(pOut);
		}
	}
	else
	{
		//_ASSERTE(hConEmuWndRoot!=NULL);
		// Избежать статической линковки к user32
		HMODULE hUser32 = GetModuleHandle(L"User32.dll");
		if (hUser32 == NULL)
			hUser32 = LoadLibrary(L"User32.dll");
		typedef int (WINAPI* MessageBoxW_T)(HWND, LPCWSTR, LPCWSTR, UINT);
		MessageBoxW_T _MessageBoxW = hUser32 ? (MessageBoxW_T)GetProcAddress(hUser32, "MessageBoxW") : NULL;
		if (_MessageBoxW)
		{
			nResult = _MessageBoxW(NULL, asText, asTitle, MB_SYSTEMMODAL|anBtns);
		}
		else
		{
			#ifdef _DEBUG
			_CrtDbgBreak();
			#endif
		}
	}

	return nResult;
}
开发者ID:akrisiun,项目名称:ConEmu,代码行数:52,代码来源:ConEmuCheck.cpp


示例17: MEMvAlign

VOID
MEMvAlign(
	PSAllocMap pamMem,
	UINT    uBoundary
	)
{
	ULONG ulAlignmentOffset = 0;

	if ((pamMem->dwRawVAddr % uBoundary) != 0)
		ulAlignmentOffset = uBoundary - (pamMem->dwRawVAddr % uBoundary);
	pamMem->dwVAddr = pamMem->dwRawVAddr + ulAlignmentOffset;
	pamMem->dwPAddr = LODWORD(pamMem->qwRawPAddr) + ulAlignmentOffset;
}
开发者ID:HonestarKevin,项目名称:wm8880_4_4_uboot,代码行数:13,代码来源:mem.c


示例18: getWindowInfo

void getWindowInfo(HWND ahWnd, wchar_t (&rsInfo)[1024], bool bProcessName /*= false*/, LPDWORD pnPID /*= NULL*/)
{
	DWORD nPID = 0;

	if (!ahWnd)
	{
		wcscpy_c(rsInfo, L"<NULL>");
	}
	else if (!IsWindow(ahWnd))
	{
		msprintf(rsInfo, countof(rsInfo), L"0x%08X: Invalid window handle", LODWORD(ahWnd));
	}
	else
	{
		wchar_t szClass[256], szTitle[512];
		wchar_t szProc[120] = L"";

		if (!GetClassName(ahWnd, szClass, 256)) wcscpy_c(szClass, L"<GetClassName failed>");
		if (!GetWindowText(ahWnd, szTitle, 512)) szTitle[0] = 0;

		if (bProcessName || pnPID)
		{
			if (GetWindowThreadProcessId(ahWnd, &nPID))
			{
				PROCESSENTRY32 pi = {};
				if (bProcessName && GetProcessInfo(nPID, &pi))
				{
					pi.szExeFile[100] = 0;
					msprintf(szProc, countof(szProc), L" - %s [%u]", pi.szExeFile, nPID);
				}
			}
		}

		msprintf(rsInfo, countof(rsInfo), L"0x%08X: %s - '%s'%s", LODWORD(ahWnd), szClass, szTitle, szProc);
	}

	if (pnPID)
		*pnPID = nPID;
}
开发者ID:BigVal71,项目名称:ConEmu,代码行数:39,代码来源:WObjects.cpp


示例19: AhciCommandRegisterFIS

OsStatus_t 
AhciCommandRegisterFIS(
    _In_ AhciTransaction_t* Transaction,
    _In_ ATACommandType_t   Command, 
    _In_ uint64_t           SectorLBA, 
    _In_ int                Device, 
    _In_ int                Write)
{
    FISRegisterH2D_t Fis = { 0 };
    OsStatus_t       Status;
    Flags_t          Flags;

    // Trace
    TRACE("AhciCommandRegisterFIS(Cmd 0x%x, Sector 0x%x)",
        LOBYTE(Command), LODWORD(SectorLBA));

    // Fill out initial information
    Fis.Type    = LOBYTE(FISRegisterH2D);
    Fis.Flags  |= FIS_HOST_TO_DEVICE;
    Fis.Command = LOBYTE(Command);
    Fis.Device  = 0x40 | ((LOBYTE(Device) & 0x1) << 4);

    // Handle LBA to CHS translation if disk uses
    // the CHS scheme
    if (Transaction->Device->AddressingMode == 0) {
        //uint16_t Head = 0, Cylinder = 0, Sector = 0;

        // Step 1 -> Transform LBA into CHS

        // Set CHS params

        // Set count
        Fis.Count = (uint16_t)(Transaction->SectorCount & 0xFF);
    }
    else if (Transaction->Device->AddressingMode == 1 || 
             Transaction->Device->AddressingMode == 2) {
        // Set LBA 28 parameters
        Fis.SectorNo            = LOBYTE(SectorLBA);
        Fis.CylinderLow         = (uint8_t)((SectorLBA >> 8) & 0xFF);
        Fis.CylinderHigh        = (uint8_t)((SectorLBA >> 16) & 0xFF);
        Fis.SectorNoExtended    = (uint8_t)((SectorLBA >> 24) & 0xFF);

        // If it's an LBA48, set LBA48 params as well
        if (Transaction->Device->AddressingMode == 2) {
            Fis.CylinderLowExtended     = (uint8_t)((SectorLBA >> 32) & 0xFF);
            Fis.CylinderHighExtended    = (uint8_t)((SectorLBA >> 40) & 0xFF);

            // Count is 16 bit here
            Fis.Count = (uint16_t)(Transaction->SectorCount & 0xFFFF);
        }
开发者ID:Fadekraft,项目名称:MollenOS,代码行数:50,代码来源:dispatch.c


示例20: clear

int MMapFile::setfile(int hFile, __int64 dwSize)
#endif
{
  clear();

#ifdef _WIN32
  m_hFile = hFile;
#else
  m_hFileDesc = hFile;
#endif
  m_bTempHandle = FALSE;

#ifdef _WIN32
  if (m_hFile == INVALID_HANDLE_VALUE)
#else
  if (m_hFileDesc == -1)
#endif
    return 0;

  m_iSize = dwSize;

  if (m_iSize <= 0)
    return 0;

#ifdef _WIN32
  assert(MAKEQWORD(LODWORD(m_iSize),HIDWORD(m_iSize)) == m_iSize);
  m_hFileMap = CreateFileMapping(m_hFile, NULL, PAGE_READONLY, HIDWORD(m_iSize), LODWORD(m_iSize) , NULL);

  if (!m_hFileMap)
    return 0;
#endif

  m_bReadOnly = TRUE;

  return 1;
}
开发者ID:Argimko,项目名称:Nsis64,代码行数:36,代码来源:mmap.cpp



注:本文中的LODWORD函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LOG函数代码示例发布时间:2022-05-30
下一篇:
C++ LOC_LOGE函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap