2,505 questions with Windows API - Win32 tags

Sort by: Updated
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,505 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,596 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,027 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,505 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,596 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
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,505 questions
asked 2024-07-10T09:17:19.8366667+00:00
Sher Pal 0 Reputation points
edited a comment 2024-07-11T09:15:58.69+00:00
Sher Pal 0 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,557 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,505 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,307 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,853 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,505 questions
asked 2024-07-04T07:48:35.1333333+00:00
Rohan Pande 400 Reputation points
accepted 2024-07-11T01:52:49.19+00:00
Rohan Pande 400 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,505 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,620 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,505 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,027 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,505 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,620 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 42,711 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,505 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,505 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,620 questions
asked 2024-07-07T08:32:10.0766667+00:00
mc 4,046 Reputation points
commented 2024-07-08T16:56:34.5266667+00:00
Darran Rowe 561 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,505 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,620 questions
asked 2024-07-08T05:39:14.6833333+00:00
채문석(jim) 41 Reputation points
answered 2024-07-08T07:07:42.08+00:00
Castorix31 82,946 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,505 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,620 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,708 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,505 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,596 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,620 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 790 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,505 questions
asked 2024-03-29T11:51:46.94+00:00
Rohan Pande 400 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,505 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
1 answer One of the answers was accepted by the question author.

How to get the text from the label by the handle with specific coordinates on any part of the desktop screen

I want to extract the text inside the label by giving certain coordinates from the screen, if the type of the coordinates is from the label, then extract the part of the obtained part.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,869 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,505 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,650 questions
asked 2024-06-06T07:48:09.8966667+00:00
Mansour_Dalir 1,716 Reputation points
accepted 2024-07-06T04:04:39.1133333+00:00
Mansour_Dalir 1,716 Reputation points
2 answers One of the answers was accepted by the question author.

Launching Windows Applications using Voice Assistants

Is there an alternative to Cortana on Windows that I can use to launch my applications using a voice command like "Open Abc App"? I have come across an application named "Voice Access," but I can't find any documentation on how to use…

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.
748 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,505 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,620 questions
asked 2024-04-24T06:38:51.75+00:00
Rohan Pande 400 Reputation points
edited an answer 2024-07-04T14:43:43.1966667+00:00
Caozhi Li 0 Reputation points Student Ambassador
0 answers

CreateFile() takes a long time (~5 seconds) to fail on COM ports already exclusively locked/opened by another program

Good day, I'm writing a program ( well, have written, and it's working fine ), and part of the startup is to scan the available COM ports to see which one our device is connected to. It all works fine except that on some devices there can be a…

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,505 questions
asked 2024-07-03T13:10:07.55+00:00
Paul Daniels 5 Reputation points
commented 2024-07-04T11:07:12.0233333+00:00
Paul Daniels 5 Reputation points
1 answer

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,505 questions
asked 2024-07-03T08:25:49.16+00:00
Jean-Pierre Ribeauville 20 Reputation points
commented 2024-07-03T12:44:05.2266667+00:00
RLWA32 42,711 Reputation points
3 answers

How to change drive letters (was: Can I use Visual C to program system tools)

I need to be able to write a tool that can change the drive letter in my application. When I insert a usb hard drive the program recognises the volume it should be with the drive letter in [] brackets in the label. When I insert the usb drive sometimes…

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,505 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,853 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,283 questions
asked 2024-07-01T22:19:00.44+00:00
Terry Foster 0 Reputation points
commented 2024-07-03T11:24:28.1+00:00
Terry Foster 0 Reputation points