The IdUserSession property returns the current user session ID, in case the port was not created by VSP AX Control. If a port is already created by VSP AX Control, the property returns the user session ID in which the virtual port was created. If a port is created globally, the parameter is equal to an empty string.

BSTR IdUserSession;