03-09-2013, 10:18 PM
للتوضيح اكثر استخدمت الكود التالي:
وظهر عندي رسالة خطأ كالأتي:
access violation at address 10004f61 in module 'snapi.dll'. write of address 000000
PHP كود :
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;
function SNAPI_Init(hwnd: HWND;var DeviceHandles: array of Integer; var NumDevices: integer): Integer;external 'SNAPI.dll';
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var dh : array[0..9] of integer;
i,l,n:integer;
vm_hWnd :TMessage;
begin
l:=0;
for I := 0 to 9 do
dh[i] := 0;
n:=0;
l:= SNAPI_Init(Form1.Handle,dh,n);
end;
end.
access violation at address 10004f61 in module 'snapi.dll'. write of address 000000

