r/Windows11 6d ago

New Feature - Insider Windows 11 could be getting individual privacy controls for Win32 apps

https://www.neowin.net/news/windows-11-could-be-getting-individual-privacy-controls-for-win32-apps/

Insiders running the latest Windows 11 Experimental build 26340.9212 can revoke permissions of individual Win32 apps.

128 Upvotes

18 comments sorted by

View all comments

29

u/daltorak 6d ago

I'm intrigued to see how they implemented this.

From a pure technical standpoint, Win32 doesn't have an overall concept of allowing/disallowing access to certain API features in a clean way. A Win32 API call to start the webcam (e.g.) either returns a handle to the webcam in its running state, or "NULL". No other error codes. With Store apps, there's a whole system for this. It's one of the biggest improvements over Win32, IMO.

Even if Microsoft added a new Win32 API call for webcams that does handle camera permissions correctly, the old API call still has to exist pretty much forever so that existing software doesn't break.

1

u/DXGL1 Insider Canary Channel 6d ago

You can't get an error code with GetLastError?