文件名称:API
介绍说明--下载内容均来自于网络,请自行研究使用
unit Unit1
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls
type
TForm1 = class(TForm)
Button1: TButton
Edit1: TEdit
Button2: TButton
procedure Button1Click(Sender: TObject)
procedure Button2Click(Sender: TObject)
private
{ Private declarations }
public
{ Public declarations }
end
var
Form1: TForm1
implementation
{$R *.dfm}
uses Registry, MMSystem, DDEMAN, ClipBRD
procedure TForm1.Button1Click(Sender: TObject)
var
SerialNum:Dword
a,b: Dword
Buffer: array [0..255] of char
Num:string
begin
GetVolumeInformation( C:\ , nil,0,@SerialNum,a,b,nil,0)
Num:=IntToHex(HiWord(serialNum),4)+ -- + IntToHex(LoWord(SerialNum),4)
Edit1.text:=(Num)
end
procedure TForm1.Button2Click(Sender: TObject)
Var
buffer:array [0..255] of char
buffsize:Dword
begin
buffsize:=sizeOf(Buffer)
GetUSERNAME(@buffer,buffsize)
ShowMessage(buffer)
end
end.
-unit Unit1
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls
type
TForm1 = class(TForm)
Button1: TButton
Edit1: TEdit
Button2: TButton
procedure Button1Click(Sender: TObject)
procedure Button2Click(Sender: TObject)
private
{ Private declarations }
public
{ Public declarations }
end
var
Form1: TForm1
implementation
{$R*.dfm}
uses Registry, MMSystem, DDEMAN, ClipBRD
procedure TForm1.Button1Click(Sender: TObject)
var
SerialNum:Dword
a,b: Dword
Buffer: array [0..255] of char
Num:string
begin
GetVolumeInformation( C:\ , nil,0,@SerialNum,a,b,nil,0)
Num:=IntToHex(HiWord(serialNum),4)+--+ IntToHex(LoWord(SerialNum),4)
Edit1.text:=(Num)
end
procedure TForm1.Button2Click(Sender: TObject)
Var
buffer:array [0..255] of char
buffsize:Dword
begin
buffsize:=sizeOf(Buffer)
GetUSERNAME(@buffer,buffsize)
ShowMessage(buffer)
end
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls
type
TForm1 = class(TForm)
Button1: TButton
Edit1: TEdit
Button2: TButton
procedure Button1Click(Sender: TObject)
procedure Button2Click(Sender: TObject)
private
{ Private declarations }
public
{ Public declarations }
end
var
Form1: TForm1
implementation
{$R *.dfm}
uses Registry, MMSystem, DDEMAN, ClipBRD
procedure TForm1.Button1Click(Sender: TObject)
var
SerialNum:Dword
a,b: Dword
Buffer: array [0..255] of char
Num:string
begin
GetVolumeInformation( C:\ , nil,0,@SerialNum,a,b,nil,0)
Num:=IntToHex(HiWord(serialNum),4)+ -- + IntToHex(LoWord(SerialNum),4)
Edit1.text:=(Num)
end
procedure TForm1.Button2Click(Sender: TObject)
Var
buffer:array [0..255] of char
buffsize:Dword
begin
buffsize:=sizeOf(Buffer)
GetUSERNAME(@buffer,buffsize)
ShowMessage(buffer)
end
end.
-unit Unit1
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls
type
TForm1 = class(TForm)
Button1: TButton
Edit1: TEdit
Button2: TButton
procedure Button1Click(Sender: TObject)
procedure Button2Click(Sender: TObject)
private
{ Private declarations }
public
{ Public declarations }
end
var
Form1: TForm1
implementation
{$R*.dfm}
uses Registry, MMSystem, DDEMAN, ClipBRD
procedure TForm1.Button1Click(Sender: TObject)
var
SerialNum:Dword
a,b: Dword
Buffer: array [0..255] of char
Num:string
begin
GetVolumeInformation( C:\ , nil,0,@SerialNum,a,b,nil,0)
Num:=IntToHex(HiWord(serialNum),4)+--+ IntToHex(LoWord(SerialNum),4)
Edit1.text:=(Num)
end
procedure TForm1.Button2Click(Sender: TObject)
Var
buffer:array [0..255] of char
buffsize:Dword
begin
buffsize:=sizeOf(Buffer)
GetUSERNAME(@buffer,buffsize)
ShowMessage(buffer)
end
end.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Project2.cfg
Project2.dof
Project2.dpr
Project2.exe
Project2.res
Unit1.dcu
Unit1.dfm
Unit1.pas
Unit1.~dfm
Unit1.~pas
Project2.dof
Project2.dpr
Project2.exe
Project2.res
Unit1.dcu
Unit1.dfm
Unit1.pas
Unit1.~dfm
Unit1.~pas