Y
ymkj
Unregistered / Unconfirmed
GUEST, unregistred user!
在VC++中函数引用方法如下:
LPVOID DRAWFRM_Init(HWND hWnd ,COLORREF ColorKey, DWORD
dwWidth ,DWORD dwHeight, DWORD *pdwMethod , char *RegistryPath);
DWORD DRAWFRM_Show(LPVOID lpObject, LPBYTE buffer, RECT rDestRect);
BOOL DRAWFRM_ChangeWidthHigh(int iWidth,int iHigh);
BOOL DRAWFRM_Close(LPVOID lpObject );
在DELPHI中写法如下:
unit main;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls, FileCtrl;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses drawform;
function DRAWFRM_Init(hwnd:string;colorkey:dword;width,high:integer;pdwmethodointer;registrypathointer):string;stdcall;external 'DrawFrm.dll' NAME 'DRAWFRM_Init';
function DRAWFRM_Show(lpObject:string;buffer:byte;rcDest:string):integer;stdcall;external 'DrawFrm.dll' NAME 'DRAWFRM_Init';
function DRAWFRM_ChangeWidthHigh(iWidth,iHigh:integer):integer;stdcall;external 'DrawFrm.dll' NAME 'DRAWFRM_ChangeWidthHigh';
function DRAWFRM_Close(lpObject:byte):byte;stdcall;external 'DrawFrm.dll' NAME 'DRAWFRM_Close';
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
asd:string;
pdwmethod:^dword;
registrypath:^string;
begin
form2.Show;
asd:='form2.panel1';
DRAWFRM_Init(asd,null,320,240,pdwmethod,registrypath);
end;
end.
到此出错,无法向下写。如何才能在DELPHI中将这四个函数引用。
LPVOID DRAWFRM_Init(HWND hWnd ,COLORREF ColorKey, DWORD
dwWidth ,DWORD dwHeight, DWORD *pdwMethod , char *RegistryPath);
DWORD DRAWFRM_Show(LPVOID lpObject, LPBYTE buffer, RECT rDestRect);
BOOL DRAWFRM_ChangeWidthHigh(int iWidth,int iHigh);
BOOL DRAWFRM_Close(LPVOID lpObject );
在DELPHI中写法如下:
unit main;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls, FileCtrl;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses drawform;
function DRAWFRM_Init(hwnd:string;colorkey:dword;width,high:integer;pdwmethodointer;registrypathointer):string;stdcall;external 'DrawFrm.dll' NAME 'DRAWFRM_Init';
function DRAWFRM_Show(lpObject:string;buffer:byte;rcDest:string):integer;stdcall;external 'DrawFrm.dll' NAME 'DRAWFRM_Init';
function DRAWFRM_ChangeWidthHigh(iWidth,iHigh:integer):integer;stdcall;external 'DrawFrm.dll' NAME 'DRAWFRM_ChangeWidthHigh';
function DRAWFRM_Close(lpObject:byte):byte;stdcall;external 'DrawFrm.dll' NAME 'DRAWFRM_Close';
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
asd:string;
pdwmethod:^dword;
registrypath:^string;
begin
form2.Show;
asd:='form2.panel1';
DRAWFRM_Init(asd,null,320,240,pdwmethod,registrypath);
end;
end.
到此出错,无法向下写。如何才能在DELPHI中将这四个函数引用。