2,575 questions with Windows API - Win32 tags

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

How to record/output other programs messages from a hooked DLL in Win32?

I have a Win32 GUI app where a thread starts upon pressing a button like so: switch (wmId) { case int(BTN::Test) : CreateThread(NULL, 0, dllTest, &hWnd, 0, NULL); ... HHOOK hhookSysMsg = nullptr; HINSTANCE…

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,575 questions
asked 2021-01-08T06:45:49.607+00:00
user42 121 Reputation points
accepted 2021-01-12T13:12:13.617+00:00
user42 121 Reputation points
1 answer

Computer %ComputerName%

I am trying to create a registry group policy to Show desktop icons in Windows 10. I want the Computer and Users Files to show on the desktop. I have accomplished the Computer and Users Files through a global group policy but the "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,575 questions
asked 2021-01-08T16:08:22.39+00:00
Cindy P 1 Reputation point
answered 2021-01-11T02:32:53.503+00:00
Strive Sun-MSFT 426 Reputation points
2 answers

Windows Server 2016 Datacenter - User mode crash dumps are created when 'run as administrator' - permissions settings?

I have a test C++ application that I've used for years that will create a crash dump on memory access violation. When I run it as a user that is supposed to have elevated privileges, there's no crash dump file created and I get a "popup"…

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,575 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,681 questions
asked 2020-12-22T19:08:08.353+00:00
jeffrey 1 Reputation point
commented 2021-01-08T03:41:36.633+00:00
Drake Wu - MSFT 991 Reputation points
1 answer One of the answers was accepted by the question author.

C# How to eject the mobile hard disk

Mobile hard disk is USB interface。 The following function can only eject the U disk, not the mobile hard disk。 public static List<string> GetMoveDisk() { List<string> lstDisk = new List<string>(); …

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,575 questions
asked 2021-01-04T09:41:45.39+00:00
Afon.zhang 396 Reputation points
commented 2021-01-08T03:04:47.92+00:00
Afon.zhang 396 Reputation points
0 answers

Can WMI be used to listen the event of formating volume?

I want to perform some action once I receive the event of fomating a specific volume, can I use WMI to achieve my goal? I can use WMI to detect the volume is Arrival or Removal by registering Win32_VolumeChangeEvent class. Below is the example how to…

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,575 questions
asked 2021-01-07T07:19:02.367+00:00
Pei Yao-Chang 1 Reputation point
commented 2021-01-08T02:58:04.67+00:00
Rita Han - MSFT 2,161 Reputation points
0 answers

CreateProcessAsUser redirect the output of command execution to file but output file contains chinese characters are written as “?”

I have used CreateProcessAsUser and redirected command execution result to file, but in output file Chinese characters are written as "?". Command: net user Here is the code snippet SetConsoleOutputCP( CP_UTF8 ); PROCESS_INFORMATION pinfo; …

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,575 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,681 questions
asked 2021-01-06T14:14:17.22+00:00
Sriram Muralidharan 21 Reputation points
commented 2021-01-08T02:28:27.087+00:00
Song Zhu - MSFT 906 Reputation points
1 answer One of the answers was accepted by the question author.

Trying to create D3D11 device with reference driver fails with error code 0x887a0004

Hello. I hope this is the right place to ask about this. I'm very new to Direct3D, and I'm trying to create a D3D11 device with a reference driver for software rendering. Now, I don't really need a reference driver, but I'd still like to understand…

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,575 questions
asked 2021-01-05T14:24:35.973+00:00
Alexandre Miguel 21 Reputation points
accepted 2021-01-07T16:32:54.563+00:00
Alexandre Miguel 21 Reputation points
1 answer One of the answers was accepted by the question author.

How to register audio controls (next to volume controls) for application using WinAPI

I'm trying to make an audio player, and I'm wondering how to make it so that the application exposes its audio controls (play/pause, prev, next) in the little widget that appears next to the floating volume control (when adjusting volume). I'm using C++…

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,575 questions
asked 2021-01-04T04:21:38.597+00:00
Frank 21 Reputation points
accepted 2021-01-06T17:39:28.193+00:00
Frank 21 Reputation points
1 answer One of the answers was accepted by the question author.

Batch task can't use Excel library

Hi, I have a pool, which has a node, which is Windows with Office 365, and Office 365 is already activated. I have a command invoking a C++ library, in which the Excel instance is created by code: new QAxObject("Excel.Application") then…

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,575 questions
asked 2021-01-05T10:35:57.827+00:00
Fang Ji 21 Reputation points
commented 2021-01-06T02:56:52.697+00:00
Fang Ji 21 Reputation points
2 answers One of the answers was accepted by the question author.

Enumerate all file type associations

Hello! I want to list all the file type associations app names. My code: #include <windows.h> #include <shlwapi.h> #include <ShlObj.h> #include <iostream> #pragma comment(lib, "shlwapi.lib") int main() { …

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,575 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,681 questions
asked 2020-11-22T16:32:46.927+00:00
Ruslan Sydorovych 86 Reputation points
commented 2021-01-06T01:56:42.277+00:00
Drake Wu - MSFT 991 Reputation points
4 answers One of the answers was accepted by the question author.

Is it feasble for users to run batch scripts that perform commands for download and run apps by default?

Another step in the process. Is it possible for users to automatically run apps by default, and then automatically assign their User ID and Product ID along with them immediately after downloaded status? Regards, JohnCTX

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,575 questions
asked 2021-01-04T15:01:32.88+00:00
JohnCTX 636 Reputation points
accepted 2021-01-05T20:59:01.623+00:00
JohnCTX 636 Reputation points
2 answers

Application don't have lpszName when HCBT_CREATEWND

Is there any other way to get title of window before it create or active? I've tried with "SendMessageW(hWnd, WM_GETTEXT, length, (WPARAM)buffer)" and GetWindowTextW(hWnd, buffer, length) when HCBT_ACTIVATE fired. Only works with the first…

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,575 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,681 questions
asked 2021-01-02T14:22:26.603+00:00
Mai Co Zo Xop 21 Reputation points
answered 2021-01-05T12:08:19.37+00:00
RLWA32 44,926 Reputation points
3 answers

IMAPI record disk fails on windows 10 with error: IMAPI_E_GENERIC

hi, I'm trying to run old code that used to burn local disks on windows 10, the burn keeps failing (same exe use to work on older version of windows) looking at the code, the function that fails is "RecordDisk"…

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,575 questions
asked 2021-01-03T14:24:49.137+00:00
gilt 1 Reputation point
commented 2021-01-05T09:11:02.72+00:00
Drake Wu - MSFT 991 Reputation points
0 answers

win32: Cache invalidate

Hello, I have to invalidate cache in a specified region.  I suspect that new data coming via DMA to RAM is not updated because the data is in cache.  If there a win32 code for this purpose ? Thank you, Zvika 

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,575 questions
asked 2021-01-05T04:30:08.893+00:00
MAORVERED MAORVERED 21 Reputation points
commented 2021-01-05T09:03:21.503+00:00
Viorel 116.5K Reputation points
1 answer

How to hide context menu item by using IExplorerCommand

I am inherit IExplorerCommand, IInitializeCommand, IObjectWithSite, IObjectWithSelection interface to show context menu item. I want to hide registered context menu item by using GetState return ECS_HIDDEN, but it does not work?? IFACEMETHODIMP…

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,575 questions
asked 2020-12-14T01:40:09.217+00:00
Jojo Tang 86 Reputation points
commented 2021-01-05T08:40:13.713+00:00
Jojo Tang 86 Reputation points
1 answer

directx 12 CreateGraphicsPipelineState(&pipelineStateDesc, IID_PPV_ARGS(&pipeline) is always returning E_FAIL

CreateGraphicsPipelineState(&pipelineStateDesc, IID_PPV_ARGS(&pipeline) is always returning E_FAIL the documentation says "Attempted to create a device with the debug layer enabled and the layer is not installed." but I have 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,575 questions
asked 2021-01-03T10:11:51.413+00:00
luke shore 1 Reputation point
commented 2021-01-05T05:58:51.093+00:00
Rita Han - MSFT 2,161 Reputation points
2 answers

Remote Desktop Services - Disable RPC calls from another machine

Hi, Is it possible to disable Remote Desktop Services RPC calls from remote machines? I'm referring to the "Terminal Services Terminal Server Runtime Interface Protocol": …

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,891 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,575 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,495 questions
asked 2020-11-21T21:52:05.63+00:00
gabriel sztejnworcel 31 Reputation points
answered 2021-01-05T05:02:33.503+00:00
Obaid Farooqi MSFT 591 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

Get Window Border Metric Corresponding to Current Theme

Hello, In my case, I call the SetWindowTheme function to disable window theming(last two params are empty string), doing so, I have a XP-styled window like this. As you can see, the window now has thicker edges. I use the GetSystemMetrics…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,883 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,575 questions
asked 2021-01-03T18:35:08.107+00:00
semih artan 41 Reputation points
accepted 2021-01-04T10:32:19.073+00:00
semih artan 41 Reputation points
4 answers One of the answers was accepted by the question author.

Why is the SetWindowLong function made in two versions: A and W?

Why is the SetWindowLong function made in two versions: A and W? This function does not use text, why is the version made for the A and for the W?

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,575 questions
asked 2021-01-03T14:02:52.113+00:00
Participant 41 Reputation points
accepted 2021-01-03T17:03:59.003+00:00
Participant 41 Reputation points
2 answers One of the answers was accepted by the question author.

How do System, System32, and SysWOW64 folders function?

The three Windows Operating System folders: System, System32, and SysWOW64 may have one thing in common. They are critical for its functionality of how they interact with Users within the shell and the graphical user interface. When dealing with…

Universal Windows Platform (UWP)
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,575 questions
asked 2021-01-02T01:47:35.283+00:00
JohnCTX 636 Reputation points
accepted 2021-01-02T15:35:40.787+00:00
JohnCTX 636 Reputation points