C
cm
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);
var
SerialNum: PDWord;
a, b : DWord;
Buffer : array [0..255] of Char;
begin
if GetVolumeInformation('c:/', Buffer, SizeOf(Buffer), SerialNum, a, b, nil, 0) then
Caption := IntToStr(SerialNum^);
end;
上面的程序取c盘序列号,运行正确
但是
把Caption := IntToStr(SerialNum^);
替换为(s:stringyi已定义) s:=IntToStr(SerialNum^);
就出错,为什么?如何解决
var
SerialNum: PDWord;
a, b : DWord;
Buffer : array [0..255] of Char;
begin
if GetVolumeInformation('c:/', Buffer, SizeOf(Buffer), SerialNum, a, b, nil, 0) then
Caption := IntToStr(SerialNum^);
end;
上面的程序取c盘序列号,运行正确
但是
把Caption := IntToStr(SerialNum^);
替换为(s:stringyi已定义) s:=IntToStr(SerialNum^);
就出错,为什么?如何解决