Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 02 AUG 2005 01:08:16AM Leigh Tingle wrote:

When operating a network through Terminal Server, all @Station IDs are the same. We have created a program that runs out of Field 32 of the SYSENV record which attempts to change @Station to the username we retrieved using DLL_ADVAPI32 (modified to obtain - GetUserName). This fails to succeed.

Does anyone have another solution?


At 02 AUG 2005 08:57PM Sandra D'Angelo wrote:

Instead of the username you could try using lock record on the SYSPROCS file until you get a valid lock. This would give you a unique counter number for each user and the lock would be released when the user logs out. For example,

Subroutine Set_station(flag,station)

locked=0

validusercnt=250

open 'SYSPROCS' to f.sysprocs then

for cntr=1 to validusercnt
  lock f.sysprocs, cntr then
    locked=cntr
  end
until locked
next cntr

end

if locked then

station=@station:locked

end else

  • invalid - log user off

end

Return

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/844bbefe30b96f9285257051001c3956.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1