Local External Functions:
Function Boolean WTSQuerySessionInformationA( uLong hServer, uLong
SessionId, uLong WTSInfoClass, Ref String ppBuffer, Ref uLong
pBytesReturned) Library "Wtsapi32.dll"
Script:
Boolean Success
Integer RetVal = 0
uLong ll_BuffLen = 256
//First we must initialize the string to 256 characters for API
compatability.
is_HostName = Space(256)
Success = WTSQuerySessionInformationA(WTS_CURRENT_SERVER_HANDLE,
WTS_CURRENT_SESSION, WTSClientName, is_HostName,ll_BuffLen)
MessageBox('Debug','HostName: ' + is_HostName + '~nSuccess: ' +
String(Success) + '~nBuffer Size: ' + String(ll_BuffLen))
Instance Variable Declarations:
String is_HostName
Private Constant uLong WTS_CURRENT_SERVER_HANDLE = 0
Private Constant uLong WTS_CURRENT_SESSION = -1
Private Constant uLong WTSInitialProgram = 0
Private Constant uLong WTSApplicationName = 1
Private Constant uLong WTSWorkingDirectory = 2
Private Constant uLong WTSOEMId = 3
Private Constant uLong WTSSessionId = 4
Private Constant uLong WTSUserName = 5
Private Constant uLong WTSWinStationName = 6
Private Constant uLong WTSDomainName = 7
Private Constant uLong WTSConnectState = 8
Private Constant uLong WTSClientBuildNumber = 9
Private Constant uLong WTSClientName = 10
Private Constant uLong WTSClientDirectory = 11
Private Constant uLong WTSClientProductId = 12
Private Constant uLong WTSClientHardwareId = 13
Private Constant uLong WTSClientAddress = 14
Private Constant uLong WTSClientDisplay = 15
Private Constant uLong WTSClientProtocolType = 16
TIA,
Steve
Where ul_Source gets the value from ppBuffer and ul_Size gets the value from
pBytesReturned.
I hope this helps someone!
Steve
"Stephen Seltzer" <ssel...@dsicdi.com> wrote in message
news:%23UsMHdaFDHA.222@forums-2-dub...
string(ll_pointer, "address")
It's used to make a string out of a powerobject pointer in message.longparm.
I wonder if this would have worked for you, too?
Generally, I feel the less external calls you make, the better. Wonder if this
could have worked for such a case?
"woz" <ab...@msn.com> wrote in message news:3F15A0A7...@msn.com...