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…
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 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"…
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>(); …
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…
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; …
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…
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++…
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…
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() { …
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
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…
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"…
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
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…
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…
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": …
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…
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?
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…