Jump to Real's How-to Main page

Get the client username and IP address

[local function declaration]
FUNCTION long JagGetUserName &
  (ref string uname, long unamelength, ref long returnlenght) &
   LIBRARY "libjdispatch.dll"
FUNCTION long JagGetPeerAddress &
  (ref string ip, long iplength, ref long returnlenght) &
  LIBRARY "libjdispatch.dll"

[powerscript]

string ls_user, ls_ip
long  ll_temp

ls_user = space(256)
JagGetUserName(ls_user , 256, ll_temp)
ls_ip = space(256)
JagGetPeerAddress(ls_ip , 256, ll_temp)

In java
com.sybase.jaguar.server.Jaguar.getPeerAddress()

If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]