Hi, I have to use an existing dll, but got a problem with it.
Here's how I try to use it:
unit u_main;
...
implementation
procedure getUserData(var User, Pass: string); stdcall; external 'Common5.dll';
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
u, p: string;
begin
getUserData(u,p);
end;
...
end.
When I press the button the get the userData, I get an EInvalidPointer exception. The dll is registerd and in some other projects it's in use and work. any ideas?
EDIT: The DLL was created in Delphi7 and is now used in a Delphi 2009 project. Maybe there's a problem with unicode strings or something like that?