2,737 questions with Windows API - Win32 tags

Sort by: Updated
0 answers

What are different error cases in Win32 APIs

Hi, I'm working on Win32 desktop application in CPP. I'm trying to find all the error cases where a Win32 API can fail. But the documentation does not give us a clear information when can a particular API fail. It just tells to get the error status with…

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,737 questions
asked 2025-02-06T07:59:17.4633333+00:00
Harshithraj1871 1,581 Reputation points
commented 2025-02-06T09:20:55.0366667+00:00
RLWA32 47,231 Reputation points
3 answers

How to communicate with the SIM card in the external SIM card slot of the surface pro9 device?

I want to use the surface pro9 device to access the SIM card in the external SIM card slot. After inserting the card, the device can log in to the 5G network. In my application, I can list Microsoft UICC ISO card readers. Resetting can return the correct…

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,737 questions
asked 2023-10-25T03:14:19.5433333+00:00
junzilan 0 Reputation points
answered 2025-02-05T13:55:40.12+00:00
John Hire 0 Reputation points
0 answers

why uiautomation findFirst is slow and can i correct it?

Hello, I want to find some ui elements in windows apps but when i find it using uiautomation findAll or findFirst it slows down programs. I undertand that there are many elements in ui and it requires going throug many elements but for example in…

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,806 questions
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,737 questions
asked 2025-01-25T14:19:43.4133333+00:00
Артур Абубакиров 0 Reputation points
commented 2025-02-05T05:50:40.53+00:00
Jeanine Zhang-MSFT 10,536 Reputation points Microsoft Vendor
0 answers

shader model 6.7+ failure

Nvidia RTX 3090 documentation states that it supports HLSL shader model 6.7 but it fails in VS22(GDK PUBLIC) with the latest game ready driver. I shouldn't need to enable dev mode in windows should I? I get this during debug: ERROR: Shader Model 6.7 is…

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,737 questions
asked 2025-02-05T01:40:57.2533333+00:00
MeshingAround 0 Reputation points
commented 2025-02-05T02:56:14.58+00:00
Jeanine Zhang-MSFT 10,536 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Win32 context menu items issues

Hello everyone, could you please tell me what can go wrong with getting context menu items via win32? First of all, do I understand correctly that the ampersand in the name is normal? But at the same time, some elements have a localized dwTypeData, some…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,070 questions
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
823 questions
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,737 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,302 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,761 questions
asked 2025-01-28T15:52:31.3966667+00:00
123244 140 Reputation points
accepted 2025-02-04T15:41:13+00:00
123244 140 Reputation points
0 answers

How customdrawed content could make treeitems draw rectangle to fit them

I tried to reproduce in assembly one of MS official examples related to custom draw technology. from page About Custom Draw from sample SAMPLE: CustDTv Illustrates Custom Draw in a TreeView (Q248496) for now aloowed at github so here is code(language:…

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,737 questions
asked 2025-02-02T18:55:42.9833333+00:00
ProMiNick 40 Reputation points
commented 2025-02-04T10:15:47.8866667+00:00
ProMiNick 40 Reputation points
1 answer

SetSystemCursor not honoring cursor size

I'm currently trying to set the system cursor to loading cursor while I'm processing certain information on my software then restoring the default cursor. But I'm facing an issue when my computer accessibility configuration has the size of mouse computer…

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,737 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,856 questions
asked 2025-01-23T20:07:56.85+00:00
Julian Castillo 0 Reputation points
commented 2025-02-04T09:21:47.51+00:00
Jeanine Zhang-MSFT 10,536 Reputation points Microsoft Vendor
1 answer

How to enable the accent border instead of the title bar when enabling mica effect?

I have enabled the "Display accent color on the title bar and window borders" option in Windows settings. I applied the Mica effect to my Python program using the Win32API. The window display effect, the window Style viewed with Spy++, and the…

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,737 questions
asked 2025-01-18T06:07:24.2933333+00:00
XiaoYouChR 0 Reputation points
commented 2025-02-04T08:45:41.7333333+00:00
Roy Li - MSFT 33,931 Reputation points Microsoft Vendor
1 answer

How to run the Windows Function Example Codes independently?

I am not able to test and run the sample exemplary code of IP adapter address or for that reason any other exemplary sample codes of Windows functions. How can I independently test and check if this code helps me to get all the required information which…

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,737 questions
asked 2025-01-23T05:41:06.8066667+00:00
Prem Jha 95 Reputation points
edited the question 2025-02-04T08:37:17.7+00:00
Roy Li - MSFT 33,931 Reputation points Microsoft Vendor
0 answers

Disabling or detecting the use of Desktop Duplication API

We provide software that locks down devices in order to ensure the user remains within our application, and that they don't have access to any outside resources. One class of software that we block is remote desktop clients. We block this through several…

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,737 questions
asked 2025-01-15T12:21:37.38+00:00
HFU-8017 0 Reputation points
commented 2025-02-04T08:36:27.8266667+00:00
Roy Li - MSFT 33,931 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

How to fix graphic artefacts in this example

Theory: In this example present implementation of adding linenumbers subclass of standard EDIT control. linenumbers are sent to NC area of control, creation of NC area reached with handling WM_NCCALCSIZE message and adding 40 to left field of first RECT…

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,737 questions
asked 2023-04-06T08:21:28.6233333+00:00
ProMiNick 40 Reputation points
commented 2025-02-02T23:00:25.26+00:00
ProMiNick 40 Reputation points
1 answer One of the answers was accepted by the question author.

Using C++, I want to remove (not deny) Write permission alone from a user trustee with Full Control permission in Windows NTFS Folder.

I want to implement a C++ program that removes the "Write" permission alone for a user trustee with "Full Control" permission over a folder on a Windows NTFS drive. I tried to use the SetEntriesInAcl() function from the aclapi.h…

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,806 questions
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,737 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,856 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
3,003 questions
asked 2025-01-31T07:07:53.5766667+00:00
Praveenkumar S 20 Reputation points
accepted 2025-02-01T11:43:28.15+00:00
Praveenkumar S 20 Reputation points
0 answers

How to register your app in the Notifications and Actions Center of Windows 11

I am developing an app (it's a normal GUI app written in DART and C++). It is NOT a packaged UWP app. I am able to show the app's item/entry in the Windows 11 Notifications and Actions center by writing this .iss innosetup script: [Registry] Root: HKCU;…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,070 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,806 questions
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,737 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,761 questions
asked 2025-01-25T14:19:39.0966667+00:00
Ashish Rana 0 Reputation points
commented 2025-01-31T16:20:22.3933333+00:00
Ashish Rana 0 Reputation points
0 answers

Refresh rate control on IDXGISwapChain1

I play video on my application on xbox with 120Hz, but it seems to be played with 60Hz. Interval between time samples is ~16ms instead of 8ms. I checked few different videos with different fps and the result is the same (I thought that the problem is…

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,737 questions
asked 2025-01-09T15:01:37.3+00:00
Marek 0 Reputation points
commented 2025-01-24T06:54:16.56+00:00
Jeanine Zhang-MSFT 10,536 Reputation points Microsoft Vendor
2 answers

Where are the Samples for TAPI in the SDK as referred to in Learn. Code for C & VB etc.

Hi, Have installed the SDK, every single option ticked. I think had most before as was using Visual Studio before. As below, looking for TAPI Programs as mentioned on https://learn.microsoft.com/en-us/windows/win32/tapi/tapi-quick-start Specifically VB…

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,737 questions
asked 2025-01-21T12:12:36.48+00:00
Gregory Reed 0 Reputation points
commented 2025-01-22T10:52:50.6533333+00:00
RLWA32 47,231 Reputation points
1 answer One of the answers was accepted by the question author.

I want to disable/enable usb and HDMI port whenever my c# wpf (.net Framework 4.7.2) app runs.

Online resources are not present for above queries. I want solution for both admin/non-admin user account. Please help to provide me the solution.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,107 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,826 questions
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,737 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,302 questions
asked 2025-01-15T12:29:34.7333333+00:00
Vishal2 Bansal 225 Reputation points
accepted 2025-01-22T05:07:30.16+00:00
Vishal2 Bansal 225 Reputation points
0 answers

Why GetBestInterfaceEx doesn't consider routes added via command line?

Consider the case where there are two network interfaces connected to the system (Ethernet and WiFi). Both will add 0.0.0.0/0 route in the routing table but, one of the interface will have a lower metric (say Ethernet gets the lower metric).…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,070 questions
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,737 questions
Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
827 questions
asked 2024-06-19T09:27:31.26+00:00
Deepan Negi 0 Reputation points
commented 2025-01-21T06:45:02.6833333+00:00
Deepan Negi 0 Reputation points
1 answer One of the answers was accepted by the question author.

SetSystemTimeAdjustment disable clock adjust rather than changing the RTC clock rate

I need to override w32tm to adjust the DateTime clock-rate in C#. When I call the kernel32 API: SetSystemTimeAdjustment(ref dwTimeAdjustment, ref bTimeAdjustmentDisabled); I get a return of true, indicating it worked, but when I read back the…

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,737 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,302 questions
asked 2025-01-20T03:59:44.49+00:00
Tom Stoltz 20 Reputation points
commented 2025-01-20T17:32:05.6533333+00:00
Tom Stoltz 20 Reputation points
0 answers

OpenEventLog returns RPC_S_SERVER_UNAVAILABLE on Windows 24H2

We have a tool that parse data from the eventlog. However this has stopped working to access remote servers when run Windows 24H2 machines, with either of the following errors: RPC_S_SERVER_UNAVAILABLE RPC_X_BAD_STUB_DATA The following application…

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,737 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,856 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,761 questions
asked 2024-11-13T12:07:58.58+00:00
Ljungberg, Ted 5 Reputation points
commented 2025-01-20T15:30:48.2466667+00:00
Kevin Stanush 0 Reputation points
3 answers

IUpdate2::CopyToCache method Windows 11

It seems that this method no longer works on Windows 11: https://learn.microsoft.com/en-us/windows/win32/api/wuapi/nf-wuapi-iupdate2-copytocache Interface not registered Do you have an idea?

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,737 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,761 questions
asked 2024-12-12T12:09:00.7133333+00:00
Simon Fonteneau 55 Reputation points
answered 2025-01-20T13:24:36.4066667+00:00
Simon Fonteneau 55 Reputation points