ubernewb
asked on
passing sysint variable to API
I am trying to pass some variables into an api using delphi 6.
function Login(const Server: WideString; Port: sysint;
const Username: WideString; const Password: WideString): WideString
procedure TForm1.Button1Click(Sender : TObject);
var
islogin : widestring;
begin
server := 'testserver';
username := 'user1';
password := 'password';
port := 11977;
islogin := globo.Login(servername,por tnumber,us ername,pas sword);
showmessage(islogin);
end;
I get an access violation - am I not passing the correct variable for a sysint / can you provide examples of a sysint variable?;
function Login(const Server: WideString; Port: sysint;
const Username: WideString; const Password: WideString): WideString
procedure TForm1.Button1Click(Sender
var
islogin : widestring;
begin
server := 'testserver';
username := 'user1';
password := 'password';
port := 11977;
islogin := globo.Login(servername,por
showmessage(islogin);
end;
I get an access violation - am I not passing the correct variable for a sysint / can you provide examples of a sysint variable?;
ASKER
Sorry - That line should read:
islogin := globo.Login(servername,por t,username ,password) ;
Is a sysint variable like an integer?
islogin := globo.Login(servername,por
Is a sysint variable like an integer?
yes. it's basically an INT.
http://docs.codegear.com/docs/radstudio/radstudio2007/RS2007_helpupdates/HUpdate3/EN/html/devwin32/wtlvalidtypes_xml.html
============
btw...do you have ?
uses activex;
http://docs.codegear.com/docs/radstudio/radstudio2007/RS2007_helpupdates/HUpdate3/EN/html/devwin32/wtlvalidtypes_xml.html
============
btw...do you have ?
uses activex;
ASKER
Thanks for posting again,
I have activex under my uses clause....., perhaps the access violation is nothing to do with the parameters I am passing to it.
I have activex under my uses clause....., perhaps the access violation is nothing to do with the parameters I am passing to it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
port := 11977;
portnumber