易截截图软件、单文件、免安装、纯绿色、仅160KB

Delphi Register Test

var
Form1: TForm1;
a, b, c: Integer;
implementation
{$R *.dfm}
procedure test1(x, y, z: integer);
asm
mov a,eax
mov b,edx
mov c,ecx
end;
procedure test2(x, y, z: integer);
var
i,j,k: integer;
asm
mov i,eax
mov j,edx
mov k,ecx
mov eax,[esp+8]
mov a,eax
mov eax,[esp+4]
mov b,eax
mov eax,[esp+0]
mov c,eax
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
test2(1,2,3);
ShowMessage(Format('%d,%d,%d', [a, b, c]));
end;
end.
new
var
Form1: TForm1;
a,b,c,d,e: Integer;
implementation
{$R *.dfm}
procedure test1(p1,p2,p3,p4,p5: integer);
asm
mov a,eax
mov b,edx
mov c,ecx
mov eax,[esp+$0c]
mov d,eax
mov eax,[esp+8]
mov e,eax
end;
procedure test2(p1,p2,p3,p4,p5: integer);
var
i,j,k: integer;
asm
mov i,eax
mov j,edx
mov k,ecx
mov eax,[esp+8]
mov a,eax
mov eax,[esp+4]
mov b,eax
mov eax,[esp+0]
mov c,eax
mov eax,[esp+$0c+$8+4]
mov d,eax
mov eax,[esp+$0c+$8+0]
mov e,eax
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
//test1(1,2,3,11,5);
test2(1,2,3,7,8);
ShowMessage(Format('%d,%d,%d,%d,%d', [a, b, c, d, e]));
end;
end.


相关文档:

delphi 取CPU序列号的方法


interface
uses Windows, Messages, SysUtils, Classes, Graphics, Controls,
Forms, Dialogs, ExtCtrls, StdCtrls, Buttons;
type
TDemoForm = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
GetButton: TBitBtn;
CloseButton: TBitBtn;
Bevel1: TBevel;
Label5: TLabel; ......

Delphi与Flash之间的数据传递技巧


要实现这一功能,首先要用到ActiveX控件中的TShockwaveFlash控件。
首先让我们来将TShockwaveFlash控件加入到Delphi的组件面板中(没有装Flash的朋友可以从网上下载一个Flash8.ocx文件来进行安装)
1.打开Delphi(本人用的是Delphi7.0)点击菜单中的Component->Import ActiveX Control...
2.在弹出的窗口中的Import ......

Delphi播放Gif和Flash动画的方法


显示一个GIF动画
procedure ShowGIF( GIFFileName : String );
var TargetFrameName,PostData,Heads,Flags : OleVariant; URL : widestring; begin TargetFrameName := '';{指定Frame的空字符串时,则在当前Frame中打开动画文件} PostData := false;{不发送数据} Heads := '';{Header信息为空} Flags := 0;{Flags设为0} ......

delphi显示 jpg、png、gif 图片及 gif 动画的方法

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Bu ......

用Delphi从内存流中判断图片格式的代码

利用内存流来判断文件的格式,其实判断文件的前几个字节就可以简单的判断这个文件是什么类型的文件。
procedure TFrm.CheckImgType(Sender: TObject);  
var   //声明变量
   MyImage:TMemoryStream;   //内存流对象
   Buffer:Word;
   i:integer;
beg ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号