Share via


xSession.masterSessionId Method

Retrieves the master session ID for the session that the xSession object covers.

Syntax

public int masterSessionId()

Run On

Called

Return Value

Type: int
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.

Examples

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; 
}

See Also

xSession Class

xSession.sessionId Method