xSession.masterSessionId Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the master session ID for the session that the xSession object covers.
public:
virtual int masterSessionId();
public virtual int masterSessionId ();
abstract member masterSessionId : unit -> int
override this.masterSessionId : unit -> int
Public Overridable Function masterSessionId () As Integer
Returns
An integer that represents the session ID.
Remarks
Some sessions have a master session ID, such as a COM session or a worker thread session.
The following example creates an xSession object by using the normal session ID (or the master session ID, if there is one).
static xSession getThisSession()
{
xSession xSession = new xSession(sessionid());
if (xSession.masterSessionId())
{
xSession = new xSession(xSession.masterSessionId());
}
return xSession;
}