2,509 questions with Windows API - Win32 tags

Sort by: Updated
4 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,509 questions
asked 2024-07-14T12:31:17.7766667+00:00
Participant 41 Reputation points
answered 2024-07-16T00:43:00.6866667+00:00
Darran Rowe 561 Reputation points
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,509 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
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,509 questions
asked 2024-07-10T09:17:19.8366667+00:00
Sher Pal 0 Reputation points
commented 2024-07-15T09:41:54.21+00:00
Viorel 114.4K Reputation points
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,125 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,509 questions
asked 2024-07-12T07:44:21.48+00:00
峻魁 张 20 Reputation points
commented 2024-07-15T09:28:18.53+00:00
Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
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,509 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,509 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,625 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,509 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,625 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,509 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,603 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,044 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,509 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,603 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

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,573 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,509 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,310 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,884 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,448 questions
asked 2024-07-10T16:38:56.85+00:00
kassie 0 Reputation points
answered 2024-07-11T02:39:01.9833333+00:00
Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
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,509 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,509 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,625 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,509 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,044 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,509 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,625 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,509 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

how to resize swapchain?

I am using Direct2D D3D11CreateDevice ` hr = d2dFactory->CreateDevice(dxgiDevice, &device); hr = device->CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &ctx);` DXGI_SWAP_CHAIN_DESC1 swapChainDesc = { 0 }; swapChainDesc.Width =…

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,509 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,625 questions
asked 2024-07-07T08:32:10.0766667+00:00
mc 4,086 Reputation points
commented 2024-07-08T16:56:34.5266667+00:00
Darran Rowe 561 Reputation points
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,509 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,625 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
2 answers

How Can I track the Last DPI which is sent by WM_DPICHANGED in WPF?

I want to scale my WPF application according to available screen DPI. I know there Per Monitor DPI aware available but that are completely different what I want to achieve. I want to disable scaling for my WPF application even if windows has some scale…

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,709 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,509 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,603 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,625 questions
asked 2024-06-23T21:10:17.6933333+00:00
MERUN KUMAR MAITY 531 Reputation points
commented 2024-07-08T02:00:19.47+00:00
Hongrui Yu-MSFT 945 Reputation points Microsoft Vendor
1 answer

Some doubt in Exception Handling

I am trying to learn about the exception handling provided by Windows operating system. Now there are two different types of exception handling: One we probably know where we know that this call could fail -- we could use Structured Exception…

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,509 questions
asked 2024-03-29T11:51:46.94+00:00
Rohan Pande 420 Reputation points
commented 2024-07-06T22:18:47.6266667+00:00
Darran Rowe 561 Reputation points
2 answers One of the answers was accepted by the question author.

How to record the mouse drag event and simulate it ?

I'm a newbie of Rust, and try to write a windows desktop app. I read the documents then I found SetWindowsHookExA(WH_MOUSE_LL,...) can record the mouse event, but I only record the mouse down, move and up. no drag event produced. I try to simulate them…

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,509 questions
asked 2024-07-04T15:41:08.25+00:00
泽东 钱 20 Reputation points
commented 2024-07-06T08:40:41.4766667+00:00
泽东 钱 20 Reputation points