Show/Hide Toolbars

Inventu Viewer+ .NET Programmer's Reference

Navigation: HostConnection Class > Methods

SetSessionUser Method (static)

Scroll Prev Top Next More

Set the HostConnection.owner property.  This method avoids the need to connect a session in order to set the active owner.  Use the GetSessionUser method to retrieve the active user name and host.

 

Boolean HostConnection.SetSessionUser(String sessionKey, String userName);

 

Arguments

 

HostConnection

Required. HostConnection class Reference (this is a static method, no HostConnection object need be created prior to calling this method

 

sessionKey

Required. The session key for the active session to query.  If the session key is not valid, no value is set and false is returned;

 

userName

Required. Will set the user name (owner) for the session, if the session key is valid.

 

Remarks

 

Returns false if the sessionkey is invalid, true if the sessionkey is valid.  If userName exceeds the available length for the HostConnection owner (99 characters), it will be truncated.

 

The following sample sets the user, returning the result of the HostConnection method.

 

 bool SetSessionUser(string sessionKey, string userName)

 {

         return HostConnection.SetSessionUser(sessionKey, userName);

 }

 

See Also

 

GetSessionUser

 

Applies To: HostConnection object

 


© 2022 Inventu Corporation