300分:只需要翻译一句C语言到Delphi!(300分)

  • 主题发起人 主题发起人 venda
  • 开始时间 开始时间
V

venda

Unregistered / Unconfirmed
GUEST, unregistred user!

UCHAR mBuffer[516];
(PULONG)mBuffer=0x045d;
// read sector number 0x45d, LBA address
DeviceIoControl( mhDevice, (DWORD)IOCTL_LSRC_RD_SEC, mBuffer, 4, mBuffer, 512,&mBytesReturned, NULL );
 
DeviceIoControl为何用途,c中无此函数
 
var
mBuffer: array[0..516] of char;
begin
@mBuffer:=$045d;
DeviceIoControl( mhDevice, IOCTL_LSRC_RD_SEC, mBuffer, 4, mBuffer, 512,@mBytesReturned, nil );
end;

再调调吧
 
同意楼上的
 
var
mBuffer: array[0..516] of char;
begin
mBuffer[0]:=$d;
mBuffer[1]:=$5;
mBuffer[2]:=$4;
mBuffer[3]:=$0;
DeviceIoControl( mhDevice, IOCTL_LSRC_RD_SEC, @mBuffer, 4, mBuffer, 512, mBytesReturned, nil );
end;
 
if DeviceIoControl( mhDevice, IOCTL_LSRC_RD_SEC, @mBuffer, 4, @mBuffer, 512, mBytesReturned, nil ) then
 
var
mBuffer:array[0..515] of char;
begin
mBuffer[0]:=char($5d);
mBuffer[1]:=char($04);
mBuffer[2]:=#0;
mBuffer[3]:=#0;
DeviceIoControl( mhDevice, DWORD(IOCTL_LSRC_RD_SEC), mBuffer, 4, mBuffer, 512,@mBytesReturned, NiL );
 
jsxjd的代码中最后一句应改为:
DeviceIoControl( mhDevice, DWORD(IOCTL_LSRC_RD_SEC), @mBuffer, 4, @mBuffer,
512,mBytesReturned, NiL );
jsxjd先生,能不能收我这个徒弟?
 
爱元元的哥哥的是对的....呵呵...
 
大富翁的高手这么多,晚辈敬礼!
 
多人接受答案了。
 
后退
顶部