getsystemmetrics

Input Values for Nativemethods.GetSystemMetrics Function in .Net

This function appears to be a way to access all sorts of system values. For example nativemethods.GetSystemMetrics(4096) returns whether a session is remote or local. All I can find on the web are specific examples--does anyone know where I could find a complete list of input parameter values/what they return? Seems that it could be v...

GetSystemMetrics returning incorrect results

I'm calling the GetSystemMetrics API call from C# using the following DllImport signature: [DllImport("user32.dll", SetLastError = true)] internal static extern int GetSystemMetrics(SystemMetric smIndex); The SystemMetric enum is (for the most part) taken from pinvoke.net. For my needs, I am calling GetSystemMetrics twice, on...

How to resolve linking error for GetSystemMetrics()?

I'm attempting to use the following to get the height & width of the main display: #include <winuser.h> size_t width = (size_t)GetSystemMetrics(SM_CXBORDER); size_t height = (size_t)GetSystemMetrics(SM_CYBORDER); However, it's failing on an unresolved externals link error (LNK1120). I've tried linking to user32.lib (as documented here...

Why do ASP.NET applications appear to be running in a terminal server session?

Running the following ASPX page (IIS 6, Server 2003 R2) <%@ Page Language="vb" AutoEventWireup="false" %> <% Response.Write("Am I running in a terminal server session: " & _ System.Windows.Forms.SystemInformation.TerminalServerSession) %> yields the following output: Am I running in a terminal server session: True Why?...