一.方法 前言: 如果你的程序中使用了 COM对象或者 OCX控件, 发布程序的时候必须带上相关的 DLL文件或者 OCX文件, 同时还需要注册到系统中, 如果我想让我的程序 Copy Run, 不需要安装,(现在...
静态=================== unit main; interface uses ShareMem, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) mmo1: TMemo; mmo2: TMemo; btn1: TButton; btn2: TButton; p...
取得某一dll所有输出函数名 在uses里加上ImageHlp procedure ListDLLFunctions(DLLName: String; List: TStrings); type chararr = array [0..$FFFFFF] of Char; var H: THandle; I, fc: integer; st: string; arr: Pointer; ImageDebugInform...
调用外部 DLL 中的函数(2. 晚绑定) unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type //晚绑定,也就是动态调用外部函数主要用以下三个命令...
unit uHook; interface uses Windows, Messages, SysUtils, Variants, Classes, Controls, Forms, Dialogs, StdCtrls; type tagKBDLLHOOKSTRUCT = packed record vkCode: DWORD; scanCode: DWORD; flags: DWORD; time: DWORD; dwExtraInfo: DWORD; end; KBDLL...
调用外部 DLL 中的函数(1. 早绑定) unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender:...
type TDllRegisterServer=function:HResult; stdcall; procedure RegisterDll(DllName :string); var h:HModule; Ocx:TDllRegisterServer; begin h := 0; try h := LoadLibrary(PChar(DllName)); @Ocx:=GetProcAddress(H,'DllRegisterServer'); Ocx; except S...
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Butto...
procedure TForm1.Button1Click(Sender: TObject);begin//播放音乐 MCISendString(OPEN e: \1.MID type SEQUENCER ALIAS NN, , 0, 0); MCISendString(PLAY NN FROM 0, , 0, 0); MCISendString(CLOSE ANIMATION, , 0, 0);end; procedure TForm1.Button2Cli...
//使用窗口接受音频设备发出的消息:unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Button3:...