2,511 questions with Windows API - Win32 tags

Sort by: Updated
1 answer

[win10] The title bar still appears even though I have handled WM_NCCALCSIZE

I am attempting to create an application with a custom-drawn title bar, similar to Chrome. Therefore, I need to handle WM_NCCALCSIZE. However, I found that the title bar still appears under certain conditions: let dpi = unsafe { GetDpiForWindow(handle)…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,135 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,511 questions
asked 2024-07-12T07:44:21.48+00:00
峻魁 张 20 Reputation points
commented 2024-07-17T05:54:04.1466667+00:00
Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
0 answers

How to change the active partition using SetTapePosition function ?

i am using SetTapePosition function to change the active partition of a LTO tape drive but unable to do so it compiled without any error but didn't change the partition as well, On the other hand i and able to set the dwOffsetLow and it is working…

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,511 questions
asked 2024-07-10T09:17:19.8366667+00:00
Sher Pal 0 Reputation points
commented 2024-07-17T02:55:29.2366667+00:00
Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
0 answers

Why does the interface get stuck for 5-10 minutes when using MF to retrieve camera video streams and calling IMFActivate:: Activated Object to retrieve IMFMediaSource * object?

On Windows 11, when using Media Foundation to capture video streams and frequently inserting a camera, calling the IMFActivate:: Activated Object function to retrieve the IMFMediaSource * object occasionally causes it to freeze for 5-10 minutes. This…

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,511 questions
asked 2024-07-16T08:06:30.7433333+00:00
Pengchao PC13 Wang 0 Reputation points
commented 2024-07-17T01:56:38.28+00:00
Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
1 answer

Not able to reach even wWinMain in Windows Server Core Machine 2022

Hi, I am trying to run a C++ Win32 application with XAML Island as UI Library. I am able to run on normal desktop machines such as Windows 11 but when I try to run the same application on Windows Server core machine it failed and didn't even reach our…

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,511 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,626 questions
asked 2024-07-16T10:52:59.8866667+00:00
Shyam Butani 165 Reputation points
edited an answer 2024-07-16T14:38:43.69+00:00
Darran Rowe 561 Reputation points
0 answers

Apply changes made in registry regarding window metrics

I want to set specific values for: Computer\HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics Is there a way to apply registry changes without the need of logging off and on? Perhaps some service needs restarting? I've tried to restart explorer.exe…

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,511 questions
asked 2024-04-23T13:05:40.3633333+00:00
Lukas 0 Reputation points
commented 2024-07-16T13:40:15.0866667+00:00
Bikram Sandhu 5 Reputation points
3 answers

Win32 API. The FtpGetFileW function does not work with non-English letters.

What should a programmer do to extract a file from the Internet using FTP that has non-English letters in its name? Are there any Win32 API functions (maybe Socket functions) that can be used instead of FtpGetFileW? I am interested in low-level…

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,511 questions
asked 2024-07-14T12:31:17.7766667+00:00
Participant 41 Reputation points
commented 2024-07-16T11:25:25.7033333+00:00
Participant 41 Reputation points
0 answers

lAudioClient::Initialize returned 0x8890017

When testing the linphone sip phone software on windows, after hundreds of calls, it fails to intialize the audio interface. The error code is 0x8890017, sometimes 0x8007000e. The initializing code is like this: result =…

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,511 questions
asked 2024-07-16T03:54:09.9566667+00:00
zhangtie 0 Reputation points
commented 2024-07-16T06:25:39.6166667+00:00
Viorel 114.4K Reputation points
2 answers

Logging the parameters of WMI Methods using WMI-Activity Trace logs

When logging WMI calls and queries via WMI-Activity Trace logs, I can see all the method invocations being logged, but not the method's parameters. As I'm looking to work around certain hardware/driver issues with my laptop, I absolutely must know what…

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,576 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,511 questions
Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,311 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,894 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,449 questions
asked 2024-07-10T16:38:56.85+00:00
kassie 0 Reputation points
commented 2024-07-16T05:56:59.6666667+00:00
Roy Li - MSFT 32,731 Reputation points Microsoft Vendor
0 answers

does FWPM_CONDITION_IP_DESTINATION_ADDRESS_TYPE have a wrong description?

i see that FWPM_CONDITION_IP_DESTINATION_ADDRESS_TYPE represents "the destination IP address type for forwarded packets." this condition is supported for the following layers FWPM_LAYER_IPFORWARD FWPM_LAYER_OUTBOUND_TRANSPORT …

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,511 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.
703 questions
Windows Driver Kit (WDK)
Windows Driver Kit (WDK)
A set of Microsoft tools that are used to develop, test, and deploy Windows drivers.
52 questions
asked 2024-07-15T12:26:44.65+00:00
Or Eliyahu 0 Reputation points
edited the question 2024-07-15T13:28:11.3366667+00:00
Or Eliyahu 0 Reputation points
1 answer One of the answers was accepted by the question author.

SetNamedSecurityInfo() returns : Error: (1307)

Hi, I'm curently trying to buid a chown.exe using Win32API SetNamedSecurityInfo() to change file ownership. When running this .exe in elevated mode or if the new owner is the same as the current owner, it works file. But when targetting an other user as…

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,511 questions
asked 2024-07-03T08:25:49.16+00:00
Jean-Pierre Ribeauville 40 Reputation points
accepted 2024-07-15T09:28:07.1566667+00:00
Jean-Pierre Ribeauville 40 Reputation points
1 answer One of the answers was accepted by the question author.

Help needed to retrieve the LogonType using Win32LogonSession class in C++

Hello, I am trying to use Win32LogonSession to retrieve the LogonType in my C++ code. However, I'm encountering several errors and I am unsure if I'm writing the correct code. Can anyone provide assistance? Thank you.

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,511 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,626 questions
asked 2024-07-12T06:19:11.6866667+00:00
Rohan Pande 420 Reputation points
commented 2024-07-15T09:18:10.4633333+00:00
Rohan Pande 420 Reputation points
1 answer

How do I save ID2D1Bitmap as a file?

Bitmap and text were output to DIALOG using Direct2D. I tried to make this rendered screen into a bitmap and save it as a file. But, I get D2DERR_WRONG_RESOURCE_DOMAIN. Is there a way to transform ID2D1Bitmap to IWICBitmap? My goal is to use GDI+…

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,511 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,626 questions
asked 2024-07-08T05:39:14.6833333+00:00
채문석(jim) 41 Reputation points
commented 2024-07-15T06:21:47.5333333+00:00
Xiaopo Yang - MSFT 12,226 Reputation points Microsoft Vendor
2 answers

shut off monitor will flash display,by use SendMessage command.

SendMessage function Win32 API Windows and Messages Similar problems monitor-will-flash-before-shut-off-or-monitor-will.html screen recording onedrive using System; using System.Runtime.InteropServices; namespace ConsoleApp { …

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,511 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.
10,609 questions
asked 2022-06-20T07:16:44.397+00:00
microsoft 1 Reputation point
edited a comment 2024-07-11T15:38:09.1233333+00:00
Alan T 0 Reputation points
1 answer One of the answers was accepted by the question author.

Changing Taskbar (Shell_TrayWnd) Color to Transparent

0 I found a way to change color to fully transparent, by researching structure of DesktopWindowXamlSource of Taskbar (Shell_TrayWnd). I'm curious is it possible to somehow change BackgroundFill in DesktopWindowXamlSource to Windows.UI.Xaml.Media.Brush…

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,050 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,511 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.
10,609 questions
asked 2024-07-09T09:51:43.66+00:00
Jacob Mordon 65 Reputation points
accepted 2024-07-11T11:32:45.5+00:00
Jacob Mordon 65 Reputation points
2 answers One of the answers was accepted by the question author.

How can I know if started by WER, the OS is running in a GUI environment?

Hi, I am building a Win32 application using WinUI2 as GUI. Before displaying a window to the user, we are checking our Desktop capabilities from the Operating System has shown below. bool CheckDesktop () noexcept { HDESK thread_desktop; …

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,511 questions
asked 2024-07-04T07:48:35.1333333+00:00
Rohan Pande 420 Reputation points
accepted 2024-07-11T01:52:49.19+00:00
Rohan Pande 420 Reputation points
0 answers

Does URLDownloadToFile still work on a Windows 11 computer without Internet Explorer on it?

I have written a windows console program that uses the win32 URLDownloadToFile function. This then ran for a long time without any problems on a windows 11 machine. However, 2 months ago this PC was reinstalled and since then the program no longer works…

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,511 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,626 questions
asked 2024-07-04T07:03:02.5766667+00:00
valentin anderegg 0 Reputation points
commented 2024-07-10T07:57:03.77+00:00
Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
1 answer

Minimize App when all you have is AppUserModelId

I get all the apps from AppsFolder: `ShellObject appsFolder = (ShellObject)KnownFolderHelper.FromKnownFolderId(AppEntry.AppsKnownFolderId);` ```which I enumerate and display each app in a list (name and icon from the shell object). The user selects an…

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,511 questions
asked 2024-07-05T21:35:14.5066667+00:00
ScottSharp 0 Reputation points
edited the question 2024-07-10T06:19:06.3833333+00:00
Roy Li - MSFT 32,731 Reputation points Microsoft Vendor
1 answer

Where to find correct version information using in C on Windows

I'm looking to programmatically find the correct version information for Windows using the "C" programming language. I've searched online with no luck. Does anyone know where I can find resources to help me achieve this goal?

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,050 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,511 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,626 questions
asked 2024-06-22T22:13:39.2533333+00:00
Thad T 26 Reputation points
commented 2024-07-09T13:50:28.56+00:00
RLWA32 43,041 Reputation points
0 answers

WinHttp cannot open SSL connection as Network Service -> 12185

I try to make a WinHttp from my service. This service runs in a restricted account (why? well, everyone tells me, that we should do this, because it is safer... but, it is also enormously complicated to find out how the f... to get access to what we need…

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,511 questions
asked 2024-07-08T16:15:56.2166667+00:00
Rudolf Meier 291 Reputation points
commented 2024-07-09T02:07:03.2766667+00:00
Xiaopo Yang - MSFT 12,226 Reputation points Microsoft Vendor
1 answer

Program crash when creating MagnificationAPI window in Windows 11

While executing the following statement, programs on the target computer crash without warning and without a runtime error pop-up box. hwndMag = CreateWindow(WC_MAGNIFIER, TEXT("IdtScreenMagnifierMag"), WS_CHILD | MS_CLIPAROUNDCURSOR |…

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,511 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,626 questions
asked 2024-07-05T04:07:40.6+00:00
RL Chen 230 Reputation points
answered 2024-07-08T03:15:39.3333333+00:00
RL Chen 230 Reputation points