LARGE_INTEGER

时间:2022-11-21 04:42:04

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR ipCmdLine,int nShowCmd)
{

LARGE_INTEGER a,b;

a.QuadPart = 100;

a.QuadPart *= 10000000000000000;

b.QuadPart = a.QuadPart;

if(b.QuadPart > 1000)

//   {

//  DbgPrint("b.QuadPart < 1000, LowPart = %d HighPart = %d", b.LowPart,b.HighPart);

//   }

return 0;
}

单独访问 a.QuadPart时整体,如果是32位自动放入低位中LowPart,超过后自动扩展到HighPart

可以去单独的也可以取到整体。