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,portnumber,username,password);
 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?;


ubernewbAsked:
Who is Participating?
 
aikimarkConnect With a Mentor Commented:
how about the 'server' versus 'servername' difference?

how are your variables declared?
0
 
aikimarkCommented:
you have two differently named variables:

port := 11977;
portnumber
0
 
ubernewbAuthor Commented:
Sorry - That line should read:

islogin := globo.Login(servername,port,username,password);

Is a sysint variable like an integer?
0
 
aikimarkCommented:
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;
0
 
ubernewbAuthor Commented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.