to fei_1:
具体要怎么做啊!没做过。你是否可以根据这个函数做个ActiveX,然后根据脚本在网页中显示呢(关键是把硬盘序列号传给网页)?谢谢!
下面是大富翁上的帖子,我试过可通过(不过要在网上下个DiskID32)。
function TForm1.GetSerialNumber:string
type mychar = array[0..31] of char;
type TDiskID32 = Function(var DiskModel,DiskID:mychar):BOOL;stdcall;
var
Handle : THandle;
DiskID32 : TFarproc;
model,id : mychar;
yn:boolean;
begin
yn := false;
Handle := LoadLibrary('DiskID32.dll');
if Handle <> 0 then
try
DiskID32 := GetProcAddress(Handle,'DiskID32');
if DiskID32 <> nil then yn := TDiskID32(DiskID32)(model,id);
finally
FreeLibrary(Handle);
end;
result:=model+' '+id;
end;