Skip to main content

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.

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 ...
coderodde's user avatar
  • 32k
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 ...
coderodde's user avatar
  • 32k
3 votes
2 answers
126 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? ...
vansergh's user avatar
  • 313
5 votes
1 answer
388 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, ...
Thomas Weller's user avatar
6 votes
2 answers
218 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 ...
Giannis Tsakas's user avatar
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. ...
Madagascar's user avatar
  • 10.1k
3 votes
1 answer
125 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++ ...
coderodde's user avatar
  • 32k
2 votes
1 answer
203 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. ...
Kevin's user avatar
  • 105
0 votes
1 answer
101 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: <...
coderodde's user avatar
  • 32k
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 ...
coderodde's user avatar
  • 32k
2 votes
1 answer
525 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: ...
Y K's user avatar
  • 83
2 votes
2 answers
233 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: ...
coderodde's user avatar
  • 32k
4 votes
1 answer
236 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 ...
coderodde's user avatar
  • 32k
1 vote
1 answer
149 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: ...
Govind Parmar's user avatar
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: ...
Y K's user avatar
  • 83

15 30 50 per page
1
2 3 4 5
9