Questions tagged [windows]
Microsoft's well-known operating system. Use this tag for code reviews where the code is targeted specifically for this platform, when no other more specific tags exist.
362 questions
9
votes
5
answers
3k
views
Console-based Casino Game in C++
I made a casino game that runs in the console for my grade 10 final project, and I received a 93% as my grade. I'm looking for feedback in areas such as syntax, user experience and efficiency. I would ...
1
vote
0
answers
107
views
MemoryGraveyardDriver.sys - a kernel mode device driver managing a kilobyte of RAM for random reading/writing: Take II
(See the previous and initial iteration.)
This time I have incorporated some improvement points made by G. Sliepen:
driver.cpp:
...
8
votes
1
answer
550
views
MemoryGraveyardDriver.sys - a kernel mode device driver managing a kilobyte of RAM for random reading/writing
(See the second and next iteration.)
Intro
I have this GitHub repository. Basically, it does not do anything fancy: it has a byte buffer of 1Kb size, and it intercepts ...
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 ...
2
votes
1
answer
237
views
CoLib - A C++ Coroutine Library in a Single Header
I've developed a coroutine library for C++ that is contained within a single header file. It is compatible with both Windows and Linux platforms. This library is not multi-threaded; instead, it is ...
4
votes
1
answer
659
views
Opening URL in the Windows default Browser using C
I wrote this code for opening URLs using C.
Is using enum for function result a good practice?
I also thought about sanitizing the URL, but it didn't seem easy and is. Probably, not a part of this ...
0
votes
1
answer
489
views
PowerShell script for automated Windows health check and repair
I've been experiencing frequent issues with my Windows operating system, requiring me to manually run various system health and repair commands (such as DISM, ...
6
votes
2
answers
145
views
Simple tile navigation system
I haven't done any programming in quite a bit of time, and I tried to make a program where a player navigates up, down, left and right on a grid. I haven't used a tutorial for that, and I'm not ...
5
votes
2
answers
257
views
Hand-written IUnknown::Release in Assembly Language - Code injection
I've written the following code in assembly, which I then convert to machine opcodes and inject into a process with VirtualAlloc at runtime. This allows me to ...
1
vote
1
answer
148
views
Clear the temp folder with Python script
I am addicted to cleaning the %temp% folder, so I went ahead and tried with pyautogui at first by making it click ...
3
votes
2
answers
116
views
Finding the Size of a File in a Portable Manner (revision 2)
This is a follow up to Find the Size of a File in a Portable Manner (revision).
Changes made:
The return value of fseek() and ...
4
votes
1
answer
257
views
Find the Size of a File in a Portable Manner
There's no function in the Standard C Library to determine the size of a file. The POSIX Standard has stat()/fstat() which are ...
3
votes
1
answer
130
views
Multithread execution times are slow on Ubuntu and fast on Windows
I'm working on a project accelerating the execution of a Genetic Algorithm both on multiple cores and on a GPU. The algorithm is specifically suited for the solution of the Traveling Salesman Problem ...
3
votes
1
answer
161
views
Listing first 50 big files in directory and print relative paths and sizes
I use this Powershell command to recursively list first 50 big files in current directory and print relative paths and sizes in MiB. :
...