Experts Exchange connects you with the people and services you need so you can get back to work.
Improve company productivity with a Business Account.Sign Up
Open in new window
Public Declare Auto Function GetSystemMetrics Lib "user32.dll" (ByVal smIndex As Integer) As Integer
Public Class RemoteSessionChecker
''' Checks whether the current user is is logged in through a remote session
Public Shared Function Check() As Boolean
Dim IsRemoteSession As Boolean = False
'Constant used to check for remote sessions
Const SM_REMOTESESSION As Integer = &H2001
'This function will return 0 if the session is local
Dim Value As Integer = GetSystemMetrics(SM_REMOTESESSION)
IsRemoteSession = (Value <> 0)
<DllImport("user32.dll", EntryPoint := ("GetSystemMetrics"))> _
Private Shared Function GetSystemMetrics(nIndex As Integer) As Integer
'Service provided by Telerik (www.telerik.com)
'Conversion powered by NRefactory.
Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.