Questions tagged [winapi]
The Win32 API is the core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. This tag is for questions about developing native Windows applications using the Win32 API.
123 questions
5
votes
2
answers
1k
views
An improved sample C++/WinAPI malware program for Windows (includes the program that uninstalls it completely)
(See the GitHub repository for a Visual Studio (2022) solution/projects.)
Description
This malware does nothing more than install/uninstall ...
7
votes
4
answers
2k
views
A sample malware program for Windows (includes the program that uninstalls it completely)
Intro
This time I was in the mood for the low level stuff. The entire repository is in GitHub. It includes the installer, the actual malware program, and the uninstaller that removes it completely ...
3
votes
2
answers
132
views
Simple WinAPI Event manager implementation
Trying to learn windows internals and made my first work with Events and Threads. What do you think about my code? Any advice?
...
5
votes
1
answer
407
views
Converting a char string to wchar_t string based on a given toWideStr() starting point
I'm working on a legacy code base and I came across a method in which I wanted to remove the chance of swallowing an exception. In the following I want to walk you through the refacoring process, ...
6
votes
2
answers
226
views
Python script to change monitor refresh rate
I recently overclocked my monitor and I am trying to create a script to just click and do the work for me so whenever I want to change my refresh rate I dont have to open windows settings.
I think ...
9
votes
3
answers
2k
views
Executing a shell command OS-independently
The goal of the code is to convert a Graphviz DOT file to an SVG file, and it achieves this by creating a child process and executing the "dot" command.
...
3
votes
1
answer
126
views
A Windows localhost key logger in C++ with WinAPI
Now I have this repository. It's a key logger logging all the keyboard events possible. Note that some programs do not "leak" the keyboard events outside of their GUI. For example, Notepad++ ...
2
votes
1
answer
221
views
ReadDirectoryChangesW Improvements
I'm currently using the ReadDirectoryChangesW Function from the Windows API to build a Directory Watcher. The Watcher should monitor a folder for newly added files.
...
0
votes
1
answer
103
views
wtpdmt - Windows thread preemption duration measurement tool (C++)
I have this repository. The idea is that the user may measure for how long the thread is preempted with given priority class/thread priority.
CommandLineParser.h:
<...
2
votes
1
answer
86
views
Windows: Programmatically uninstall the NumberPad from ASUS ZenBook
Now I have this funny program. I bought an ASUS ZenBook which includes NumberPad. The downside of it is that it turns on with a slightest touch on its upper right corner so that I start write numeric ...
2
votes
1
answer
529
views
Sending and receiving files in C win32 using a socket
I have a piece of code to send and receive files on Windows with C. Is this the right way to do it? And am I guaranteed that the full file will be sent and received?
Receiving function:
...
2
votes
2
answers
236
views
A C++ WinAPI program for changing the process priority classes via PIDs - take 2
After improving the previous post, I came up with the following program:
...
4
votes
1
answer
239
views
A C++ WinAPI program for changing the process priority classes via PIDs
(See the next iteration .)
I have this program (call it, for example, prioset.exe), that asks for two command line arguments: (1) the target process PID, (2) a ...
1
vote
1
answer
153
views
Code for setting all child controls to the default message font on Windows
If you aren't aware, if you hand-code a GUI with the Windows API you will find your controls look quite ugly by default due to their font. Running this code:
...
6
votes
1
answer
2k
views
Proper way to send and receive buffer in Winsock
I have a piece of code to send and receive buffers. Is this the right way to do it? And am I guaranteed that the full buffer will be sent and received?
receiving function:
...