koby meir
koby meir

Reputation: 437

Programmatically getting "Operating System Context" in C++

How can in retrieve the Operating system context for my application programmatically?

enter image description here

Upvotes: 9

Views: 646

Answers (1)

metaomniliquant
metaomniliquant

Reputation: 145

As others have posted this site answers the question: http://msdn.microsoft.com/en-us/library/windows/desktop/dn424972(v=vs.85).aspx

Use the Version Helper API

To know whether this will actually suit your needs though -Why- you want to do this needs to be examined. If this is related to feature support testing, then you may want to read the suggestions here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx. The article discusses some various ways to perform feature detection such as:

  1. A combination of LoadLibrary and GetProcAddress
  2. GetSystemMetrics e.g. GetSystemMetrics(SM_CMONITORS)

Of course, this is more relevant if you are directly coding outside of the .NET world.

Upvotes: 1

Related Questions