@Station - User Locks (OpenInsight 32-Bit)
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 validusercntlock f.sysprocs, cntr thenlocked=cntrenduntil lockednext cntrend
if locked then
station=@station:lockedend else
invalid - log user offend
Return