getsystemmetrics (user32)
Last changed: -24.226.54.84

.
Summary

C# Signature:

[DllImport("user32.dll")]
static extern int GetSystemMetrics(int nIndex);

User-Defined Types:

SystemMetric

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

  private int SM_REMOTESESSION = 0x1000;

  [DllImport("user32.dll")]
  static extern int GetSystemMetrics(int nIndex);

  public bool IsRemoteSession()
  {
      return Convert.ToBoolean(GetSystemMetrics( SM_REMOTESESSION ));
  }

Alternative Managed API:

Do you know one? Please contribute it!

Documentation