How to get number of Virtual Desktops

Harshithraj1871 1,581 Reputation points
2025-02-03T06:24:25.3666667+00:00

Im working on a WinUI3 desktop application in cpp. I want to get the total number of Virtual desktops currently available. I didn't find any reference online for this.

Is there any Win32/COM/WinrRT API that returns the total number of Virtual desktops?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,729 questions
{count} vote

Accepted answer
  1. RLWA32 46,941 Reputation points
    2025-02-03T08:19:17.5466667+00:00

    Is there any Win32/COM/WinrRT API that returns the total number of Virtual desktops?

    Microsoft has never documented any publicly available functions/interfaces for programmatically interrogating/managing virtual desktops. The design philosophy has always been that virtual desktops are a UI feature that should be controlled by the user, not applications. Some have experimented with undocumented interfaces but these have been a moving target through the years. Of course, that's not unusual for undocumented stuff.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Thulani Manini 0 Reputation points
    2025-02-06T13:39:47.9733333+00:00

    Yes I also see it ,where it's state system information and operating system is

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.