Enums in start counting from zero, they are passed ByVal as Integer. Start with the first one - it's zero, the next one in the enum is 1, next 2, etc.
Here is the enum:
Pick one of the values, eg.:Code:typedef enum _WTS_INFO_CLASS { WTSInitialProgram, 0 WTSApplicationName, 1 WTSWorkingDirectory, 2 ,etc. WTSOEMId, WTSSessionId, WTSUserName, WTSWinStationName, WTSDomainName, WTSConnectState, WTSClientBuildNumber, WTSClientName, WTSClientDirectory, WTSClientProductId, WTSClientHardwareId, WTSClientAddress, WTSClientDisplay, WTSClientProtocolType } WTS_INFO_CLASS;
Const WTSWorkingDirectory = 2
and pass it as a constant ByVal.




Reply With Quote