-
-
[求助]想问 mickeylan大虾,可是我知道他太忙所请大家指点一下。
-
发表于: 2009-3-13 14:50 3611
-
驱动里(用C写的):
LARGE_INTEGER UpdateTime()
{
LARGE_INTEGER sysTime;
LARGE_INTEGER locTime;
KeQuerySystemTime(&sysTime);
ExSystemTimeToLocalTime(&sysTime, &locTime);
return locTime;
}
.........
..........
CHAR time[8];
ICTL_SENTTIME:
sprintf(time,"%d", UpdateTime() );
Irp->AssociatedIrp.SystemBuffer:=time;
应用(delphi):
buf:array[0..7] of char;
str:string;
SYSTEMTIME;ftime:TFileTime;time64:int64;
DeviceIoControl( hDevice, ICTL_SENTTIME,
nil, 0, buf, 8, dwBytesReturned, nil );
str:=strpas(@buf);
time64:=strtoint64(str);
copymemory(@ftime,@time64,8);
FileTimeToSystemTime(ftime, stime);
ShowMessage(Format('%2.2d:%2.2d:%2.2d',
[stime.wHour, stime.wMinute, stime.wSecond]));
显示从00:00:01开始前面的小时和分取不出来;
或者显示不65028:18:39411不知道是怎么回事
LARGE_INTEGER UpdateTime()
{
LARGE_INTEGER sysTime;
LARGE_INTEGER locTime;
KeQuerySystemTime(&sysTime);
ExSystemTimeToLocalTime(&sysTime, &locTime);
return locTime;
}
.........
..........
CHAR time[8];
ICTL_SENTTIME:
sprintf(time,"%d", UpdateTime() );
Irp->AssociatedIrp.SystemBuffer:=time;
应用(delphi):
buf:array[0..7] of char;
str:string;
SYSTEMTIME;ftime:TFileTime;time64:int64;
DeviceIoControl( hDevice, ICTL_SENTTIME,
nil, 0, buf, 8, dwBytesReturned, nil );
str:=strpas(@buf);
time64:=strtoint64(str);
copymemory(@ftime,@time64,8);
FileTimeToSystemTime(ftime, stime);
ShowMessage(Format('%2.2d:%2.2d:%2.2d',
[stime.wHour, stime.wMinute, stime.wSecond]));
显示从00:00:01开始前面的小时和分取不出来;
或者显示不65028:18:39411不知道是怎么回事
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)
赞赏
他的文章
看原图
赞赏
雪币:
留言: