897 questions with Windows development | Windows API - Win32 tags

Sort by: Updated
1 answer One of the answers was accepted by the question author.

ManagementObject fastest route

Hi experts, Is my usage efficient? I only need some properties like Manufacturer, Name, Description etc... If I limit the properties to return by the ManagementObject it will run faster? If so, what's the fastest way? Dim Search As New…

Windows development | Windows API - Win32
asked 2025-06-28T07:59:24.9566667+00:00
StewartBW 1,830 Reputation points
accepted 2025-06-29T01:02:13.9966667+00:00
StewartBW 1,830 Reputation points
1 answer One of the answers was accepted by the question author.

SystemInformation Class

Hi, Anyone knows the difference between Application.RenderWithVisualStyles vs SystemInformation.UIEffectsEnabled? I wanna know if visual styles are enabled system-wide and my app does not have admin rights when running, so which one fits best? Also,…

Windows development | Windows API - Win32
asked 2025-06-28T03:52:57.74+00:00
StewartBW 1,830 Reputation points
accepted 2025-06-28T14:45:42.49+00:00
StewartBW 1,830 Reputation points
1 answer One of the answers was accepted by the question author.

Where can I find the Windows Sockets 2 (or other Win32) documentation that was designed for C?

I am reading Network Programming with Windows Sockets by Pat Bonner. fpt://fpt.microsoft.com/bussys/winsock/winsock2 was the link the book provided for finding winsock2 documentation. I have already tried Internet Archive with no luck. I am specifically…

Windows development | Windows API - Win32
asked 2025-06-27T05:25:43.28+00:00
George Carter 20 Reputation points
accepted 2025-06-27T07:27:49.9066667+00:00
George Carter 20 Reputation points
1 answer One of the answers was accepted by the question author.

can not copyResource

I want to copy texture (format DXGI_B8G8R8A8) to swapChain there is error: CopyResource: First parameter does not match device. [ MISCELLANEOUS CORRUPTION #13: CORRUPTED_PARAMETER1] ctx->CopyResource(x_buffer, texture1); x_buffer is the buffer that…

Windows development | Windows API - Win32
asked 2025-06-21T03:55:49.5066667+00:00
mc 5,511 Reputation points
accepted 2025-06-24T03:25:50.47+00:00
mc 5,511 Reputation points
1 answer One of the answers was accepted by the question author.

CPU and disk usage values which we get from windows API (Using PDH) is not same as the value we see in task manager

I am currently using the PDH (Performance Data Helper) API to log CPU and Disk utilization data in a CSV file. Below is a snippet of the code I am using: #include <windows.h> #include <pdh.h> #include <stdio.h> #include…

Windows development | Windows API - Win32
Windows for business | Windows Client for IT Pros | Devices and deployment | Other
Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | C++
asked 2024-12-05T15:51:07.8166667+00:00
Chandan M S 20 Reputation points
accepted 2025-06-20T17:58:37.22+00:00
Chandan M S 20 Reputation points
2 answers One of the answers was accepted by the question author.

Why does IPsecSaContextSetSpi0 from the WFP API seem to only accept even SPI values?

When creating an IPsec SA using the WFP API, IpsecSaContextSetSpi0() doesn't seem to accept an odd SPI value. Why is this the case? RFC 4303 Section 2.1 and RFC 4302 Section 2.4 talk about valid SPI values for an IPsec SA. It makes no mention of odd…

Windows development | Windows API - Win32
asked 2025-02-13T19:39:45.3633333+00:00
Nathan 25 Reputation points
edited a comment 2025-06-11T23:26:57.6533333+00:00
Nathan 25 Reputation points
3 answers One of the answers was accepted by the question author.

Recommended Way to log to stderr in a wWinMain GUI app launched from a terminal, for diagnostics when GUI fails or app runs in background?

For int main() apps, writing to stderr works fine with shell redirection, but with wWinMain, the file is created but stays empty (tried to use 2> stderr_log.txt). I’d like to know if there’s any supported way to make stderr functional (e.g.,…

Windows development | Windows API - Win32
asked 2025-06-04T10:29:49.41+00:00
Varun Dixit 20 Reputation points
accepted 2025-06-06T09:51:04.8133333+00:00
Varun Dixit 20 Reputation points
1 answer One of the answers was accepted by the question author.

Can encrypted folders or files be prevented from reuploading?

How could users encrypt folders or files, so that it can be prevented from uploading? Would it take a console command line library in Windows shell? I am certain that there are many options for users who want to their future products from…

Windows development | Windows API - Win32
Windows for business | Windows Server | User experience | Other
asked 2020-12-25T09:22:15.687+00:00
JohnCTX 636 Reputation points
edited the question 2025-05-29T21:59:04.6633333+00:00
DillanSimmons 6 Reputation points Admin
1 answer One of the answers was accepted by the question author.

what is the function in direct2d

there is function addline in pcl visualizer what is the same that in direct2d? I have many slices I want to use it in direct2d the slices is pcl::PointXYZ and how to use it in direct2d?

Windows development | Windows API - Win32
asked 2025-05-11T22:51:21.3733333+00:00
mc 5,511 Reputation points
accepted 2025-05-17T11:11:34.9933333+00:00
mc 5,511 Reputation points
1 answer One of the answers was accepted by the question author.

how to draw 3d in direct3d?

I want to draw 3d using some values. can I do it? what 's more can I compare two 3d 's difference and get new 3d?

Windows development | Windows API - Win32
asked 2025-05-02T11:55:42.8333333+00:00
mc 5,511 Reputation points
commented 2025-05-11T01:21:46.3+00:00
mc 5,511 Reputation points
4 answers One of the answers was accepted by the question author.

Change Accent Color for Taskbar on Windows 11 via Registry

Hi, I would like to know, how to change registry Accent Color value for Taskbar. This color of Taskbar appears, when I change HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize\ColorPrevalence to 1

Windows development | Windows API - Win32
Windows for business | Windows Client for IT Pros | User experience | Other
asked 2024-09-09T10:51:55.53+00:00
Jacob Mordon 225 Reputation points
answered 2025-05-07T12:21:57.42+00:00
Pavel yannara Mirochnitchenko 13,336 Reputation points MVP
2 answers One of the answers was accepted by the question author.

what is the difference between RenderTarget.DrawTextW and DWrite?

there is DrawTextW in d2d1 and DWrite can also draw text. what is the difference?

Windows development | Windows API - Win32
asked 2025-05-02T11:40:37.33+00:00
mc 5,511 Reputation points
accepted 2025-05-03T03:28:12.0233333+00:00
mc 5,511 Reputation points
2 answers One of the answers was accepted by the question author.

How to programatically get NPU utilization using C/C++/C#

如果一台PC有NPU,那么在Windows 11任务管理器中,“性能”页面就会显示NPU的信息(包括使用率),一般来说,这个页面显示的信息从“性能计数器(PDH)”中获取,但是我并没有找到对应的计数器。有谁知道这个NPU使用率从哪儿获取吗? If a PC has an NPU, then in the Windows 11 Task Manager, the "Performance" page will display the information of the NPU…

Windows development | Windows API - Win32
Windows development | Windows Performance Toolkit
asked 2024-06-06T08:39:18.8033333+00:00
comor 50 Reputation points
accepted 2025-04-30T10:49:47.7733333+00:00
comor 50 Reputation points
1 answer One of the answers was accepted by the question author.

Behavior of 64-bit Application Creating Registry Key Directly Under WOW6432Node

Hi, I have a question regarding registry behavior on a 64-bit Windows system. If a 64-bit application explicitly creates a registry key under: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\... Will the key be created successfully, or is this action restricted…

Windows development | Windows API - Win32
asked 2025-04-24T05:44:56.9933333+00:00
Amal Krishna Jk 25 Reputation points
commented 2025-04-28T04:53:48.28+00:00
Amal Krishna Jk 25 Reputation points
1 answer One of the answers was accepted by the question author.

How to get a notice when a up aroow key is pressed in C language

Hi, I like to move a picture on the screen by clicking up, down, right, left arrow on the key board. Is there a way to get a notice in my software when “up arrow key” in keyboard is pressed, as an example. I tried bres=IsInputKey(0); How do I find out…

Windows development | Windows API - Win32
Developer technologies | C++
asked 2021-02-24T22:29:33.553+00:00
Chang Chi 61 Reputation points
accepted 2025-04-17T18:26:32.7366667+00:00
Chang Chi 61 Reputation points
1 answer One of the answers was accepted by the question author.

Restrict ciphers in WinINet during HTTP call

I have an application and I am using WinINet to make HTTP requests with TLS 1.2. However, I have noticed that WinINet is selecting weak cipher suites, specifically ECDHE-RSA-AES128-SHA256 and ECDHE-RSA-AES128-SHA, for secure connections. Since WinINet…

Windows development | Windows API - Win32
asked 2025-03-17T16:44:32.43+00:00
Preethi Ravi 80 Reputation points
accepted 2025-03-24T07:22:27.3733333+00:00
Preethi Ravi 80 Reputation points
3 answers One of the answers was accepted by the question author.

If a child control covers the parent window's client area completely, why they both receive the WM_PAINT message?

Today I found that If a child window covers its parent window completely, then swipe (slide) the main window to the one side of the screen (cut by the edge of the screen), then swipe back, they both receive a WM_PAINT message. Since the child window…

Windows development | Windows API - Win32
asked 2022-04-22T09:28:21.233+00:00
燕鹏 李 301 Reputation points
answered 2025-03-17T05:57:02.4066667+00:00
Cooks Simple Painting Inc 0 Reputation points
1 answer One of the answers was accepted by the question author.

Documentation for Earliest Versions of Direct3D

I am wondering if the original documentation for the earliest versions of Direct3D are available anywhere on the Internet? I already have the https://learn.microsoft.com/en-us/windows/win32/classic-directx-graphics link which provides documentation as…

Windows development | Windows API - Win32
asked 2025-03-13T20:42:16.23+00:00
Matthew Armshaw 81 Reputation points
accepted 2025-03-14T23:15:14.8366667+00:00
Matthew Armshaw 81 Reputation points
1 answer One of the answers was accepted by the question author.

How to improve image quality when painting images with Gdiplus::TextureBrush

I am currently having a problem with broken image drawing when I use Gdiplus::TextureBrush. I know that when drawing images with Graphics::DrawImage, the image still maintains the image quality. But I need to draw images with Gdiplus::TextureBrush…

Windows development | Windows API - Win32
asked 2025-03-03T08:06:39.73+00:00
Chau Dang Ba 50 Reputation points
accepted 2025-03-13T07:45:44.6166667+00:00
Chau Dang Ba 50 Reputation points
1 answer One of the answers was accepted by the question author.

createfilemapping size constraints

What is the maximum size that can be used with CreateFileMapping with INVALID_HANDLE_VALUE and SEC_RESERVE, for a virtual paged memory backed file, on windows 11 with 32 gb physical memory I can specify for example 64 gb but on windows 2016 it seems…

Windows development | Windows API - Win32
asked 2025-03-04T02:09:26.1233333+00:00
GF 21 Reputation points
accepted 2025-03-08T15:59:29.42+00:00
GF 21 Reputation points