delphi之调用外部dll中的函数.docVIP

  • 7
  • 0
  • 约 5页
  • 2017-07-12 发布于河南
  • 举报
delphi之调用外部dll中的函数

分早绑定和晚绑定两种。 早绑定的代码如下: unit Unit1; interface uses ?? Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ?? Dialogs, StdCtrls; type ?? TForm1 = class(TForm) ???? Button1: TButton; ????procedure Button1Click(Sender: TObject); ??private ????{ Private declarations } ??public ????{ Public declarations } ??end; var ?? Form1: TForm1; //MB 函数的声明: function MB(hWnd: HWND; lpText, lpCaption: PChar; uType: UINT): Integer; stdcall; implementation {$R *.dfm} {调用外部 DLL 中的函数,譬如调用系统 user32.dll 中的 MessageBoxA} //function MB(hWnd: HWND; lpText, lpCaption

文档评论(0)

1亿VIP精品文档

相关文档