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.

Filter by
Sorted by
Tagged with
2 votes
1 answer
47 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
  • 145
2 votes
2 answers
135 views

Python script to categorize download folder based on files

My Download habit is notorious and my download folder end up piled up with random downloads, I created a python script to maintain my download folder in windows upon running the script it moves files ...
SHANTNU CHAUBEY's user avatar
2 votes
1 answer
102 views

Tic-tac-toe game for Windows console

I am doing C++ for over a year and this is my game I tried making tic-tac-toe. And it's also my first program that uses multiple source files. main.cpp ...
NikolaTeslaPaga's user avatar
0 votes
1 answer
72 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
  • 27k
3 votes
0 answers
88 views

Modern OpenGL Context that doesn't rely on CRT

I'm working on a personal OpenGL project. I want my project to not rely on any libraries including CRT. I have absolutely no experience in shipping software and I want to prepare my code for release. ...
Cherestes Radu's user avatar
2 votes
0 answers
74 views

Windows Kernel `vector` class

...
anoncr's user avatar
  • 21
2 votes
1 answer
60 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
  • 27k
5 votes
1 answer
131 views

uint24_t implementation ported to Windows

I coded stuff for an embedded device where int is 24bits. I wanted to port uint24_t and ...
Vortex 2728182818's user avatar
2 votes
1 answer
2k views

part of a c++ program which mods a game using code injection

https://github.com/speedrun-program/amnesia_load_screen_tool/blob/main/code_injection.cpp https://github.com/speedrun-program/amnesia_load_screen_tool/blob/main/file_helper.h ...
my_stack_exchange_account's user avatar
6 votes
2 answers
226 views

ds - A directory switcher via tags in Windows command line

I have this repository. The idea is that there is a file tags sitting in the users home directory, and which contains the tag declarations of the format ...
coderodde's user avatar
  • 27k
2 votes
0 answers
462 views

A Windows hook that detects the foreground window change

I tried to implement a windows hook to grab foreground window event. This code is probably bad because I didnt understand much. Can you tell me if that is better than a simple while loop that checks ...
user268535's user avatar
3 votes
2 answers
1k views

Code lines counter

It is a Windows command line utility for counting lines of code in a source code directory. It will count loc and sloc. I read from a file character by character using fgetc in the CountLines(...) ...
mmj's user avatar
  • 31
10 votes
3 answers
2k views

Battleships console game - my first code in c++ using classes

Below my first code in c++. Its running fine. I feel I could improve a few things in my code. Please feel free to comment ...
menope8762's user avatar
-2 votes
2 answers
106 views

Optimizing Netwide Assembler codes in Microsoft Windows

I am a novice in assembler programing, I will will appreciate if someone could review these NASM assembler code for me. Is about encoder decoder. The encoder performs the following: pads the ...
Ben kubi's user avatar
1 vote
1 answer
686 views

"Hello world" in x64 assembly for Windows - Shadow space / Stack alignment

I`m currently trying to delve into x64 assembly under windows using NASM, and created a minimalistic "Hello World" application. It is mainly meant as an educational resource for me and ...
RaphM's user avatar
  • 78
1 vote
1 answer
117 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
1 vote
1 answer
128 views

Simple networking framework in C++

Question: What do you think about this design and the implementation? This is a simple networking framework for IPv4, IPv6 TCP client and TCP server for Linux and MS-Windows in C++14. It uses a single-...
Andre Adrian's user avatar
3 votes
1 answer
116 views

Simple networking framework in C

Question: What do you think about this design and the implementation? This is a simple networking framework for IPv4, IPv6 TCP client and TCP server for Linux and MS-Windows in C. It uses a single-...
Andre Adrian's user avatar
5 votes
0 answers
539 views

A POSIX getdelim() and getline() implementation for MSVC

Tired of always having problems in reading arbitrary length lines from file under Windows, I tried to write a POSIX getdelim() and ...
Costantino Grana's user avatar
1 vote
1 answer
173 views

ASCII game in console [closed]

Overall, I want to make a game in console, something Pokemon-like but with typical rpg scenery - swords, magic and all that. I want to make player able to move around the map, find dungeons, fight ...
supermaciu's user avatar
1 vote
1 answer
72 views

Synchronization \ backup of directories and files (Python)

stackexchange members. I'm just learning to write. I set myself a task a few days ago and today I completed its implementation. The task was to create a "backupper" (I was inspired just by ...
vinter_man's user avatar
0 votes
1 answer
99 views

Creating a new WinForm each time pressing a button in a main WinForm

I have WinForm C# application that every time you press on the green button: It opens a new WinForm window. This is the code after pressing the green button: ...
E235's user avatar
  • 237
2 votes
0 answers
112 views

C++ logger for Windows

I have written a simple logger in C++ on Windows that I want to use to log info and errors from multiple threads to DbgView: ...
Andy's user avatar
  • 255
5 votes
1 answer
1k views

Python module to print in printer

I made a code that simplifies the job of sending anything to print with the Windows API. The module has a Document object which stores a reference to the actual device context within it. You can ...
Dante S.'s user avatar
  • 153
4 votes
2 answers
138 views

All In One Stock, Program for My business

I built my first program to solve an issue occurring at my self-owned business.. This program I made after learning a bit of C. It took about a month to make and what it performs is various functions ...
Helper Shoes's user avatar
1 vote
1 answer
67 views

Reliably setting keys in Windows Registry for a VBA addin

We have a PowerPoint VBA addin which is installed using an MSI installer written with WIX (Windows Installer XML). For the addin to be picked up (for all users) by PowerPoint, name-value pairs need to ...
neilt17's user avatar
  • 205
1 vote
1 answer
58 views

Dividing shared resources for homogeneous multithread processing

I'm trying to implement a homogeneous multithreading example that multiple threads process portion of a huge task. In order to achieve this, I thought of clustering data/resource and multiple threads ...
YoonSeok OH's user avatar
3 votes
1 answer
161 views

C++ Determine if a file is older than int hours

I have an MFC application where I need to determine if a file's last write time is older than n hours. I thought there was a method to get total seconds from either system or file time, but I ended up ...
netcat's user avatar
  • 193
2 votes
1 answer
105 views

Windows 10 wallpaper-scroller script with Gif support

Intro: Hello, I'm a python beginner. I haven't had anyone use my code or anything. I want to improve and become a "professional python developer". I thank you for taking the time to help me ...
Valthalin's user avatar
  • 121
2 votes
1 answer
244 views

Generating a random ipaddress in C

I was looking to receive some feedback on the function I wrote to generate a random ip address. The code is pretty messy and just wanted some feedback regarding optimizations, memory leaks and best ...
snowwindmir's user avatar
7 votes
2 answers
104 views

Network utility tool

I wrote a little program in C based on some requirements: Ping every IP from a file and check the result Show, by network adapter, ONLY the IP, subnet, default gateway and DNS Check the speed between ...
Norhther's user avatar
  • 269
1 vote
0 answers
470 views

In a search of perfect batch script for editing the hosts file

I want to edit Windows hosts file in the best way for the end user, using a batch-only solution. I ended up with this script, which works fine, but since I don't have enough knowledge, the syntax is ...
NSp's user avatar
  • 11
3 votes
1 answer
262 views

Delphi function to canonicalize the capitalization in a file path

I'm building a small Delphi application where a user can input a file or directory manually by typing it or by selecting it from a dialog . Since it can be input manually, I want to ensure that I save ...
AlexV's user avatar
  • 141
0 votes
1 answer
287 views

powershell script for creating a Domain Controller

I don't have a lot of experience creating/managing an active directory environment. This will be more of a lab environment where a solution could be tested. It will not have lots of regular users etc, ...
whoami's user avatar
  • 175
5 votes
3 answers
295 views

My little C++ library for comfortable programming

I've tried to make a little library in C++, to gather all useful and necessary functions. I wrote the code(in one file, to make it more portable). Unfortunately, it works on Windows only. ...
Jenia's user avatar
  • 197
2 votes
1 answer
371 views

Win32 Snake game

I made a trival snake game below to practice my C++ and Win32 programming skills. ...
Jimmy Yang's user avatar
1 vote
1 answer
37 views

A simple C WinAPI program for terminating processes via process image names - follow-up 4

(See the previous version here.) What's new get_last_err_msg renamed to MyGetLastErrorMessage The caller to ...
coderodde's user avatar
  • 27k
3 votes
0 answers
388 views

Batch file for Wget downloads

I've just written this to facilitate my Wget downloads and I was wondering if anyone can review it for me. ...
Pi Hard's user avatar
  • 31
3 votes
2 answers
243 views

Custom Error Handler Library in C++

Is this code clean and optimized? When taking memory snapshots, it seems a bit high. Anything I have done wrong or can do to optimize it? ...
Liam James's user avatar
0 votes
0 answers
111 views

convert ID3DXMatrixStack to DirectXMath

Is it right it convert ID3DXMatrixStack to DirectXMath like that: ...
Greck's user avatar
  • 23
5 votes
0 answers
399 views

Process Injector using ctypes and the Windows API

To get some practice with the Windows API and ctypes, I decided to write a program capable of injecting and running shellcode inside of another specified process. ...
Carcigenicate's user avatar
2 votes
1 answer
131 views

Enemy damaging with regen system

Small project i made to practice my c++, im a beginner and want to know all about optimizing code. Enemy starts off with 10 HP and we can damage them for 1 HP by pressing F1, If their HP is below ...
drlight's user avatar
  • 21
2 votes
1 answer
532 views

Getting hard-drive serial number on Windows

The point is to get the serial number of one of the hard drives on Windows. My code is based on an example from MSDN. I tried to make it an exception-safe, self-contained function. It works, to the ...
Aykhan Hagverdili's user avatar
3 votes
1 answer
443 views

Windows high resolution timing class

I'm attempting to implement a high resolution class used to time the execution time of functions in Windows. After using this documentation, I have come up with the following: ...
George Tian's user avatar
2 votes
1 answer
114 views

Dialog that controls external USB device that tests the latency of gaming computers - SysLat Cleanup #4

I have several static variables in my dialog class that I'm declaring in the header and then defining immediately in the cpp file. They are being used in an application with 2 threads, and these ...
Skewjo's user avatar
  • 185
3 votes
0 answers
63 views

USB implementation of device that tests system latency on gaming computers - SysLat Cleanup #3

Here's my open source project: https://github.com/Skewjo/SysLat_Software. The hardware controlled by this software can be found at https://syslat.com/. This is the 3rd question in a series of ...
Skewjo's user avatar
  • 185
2 votes
1 answer
53 views

Detect discontinuities in Windows clock in Java

Please review the code below, which detects discontinuities in Windows system clock in long-running programs. ...
Dale's user avatar
  • 121
5 votes
3 answers
2k views

Simple Tetris game

I made this simple Tetris game where I only have 2 blocks, the square and the line. Also the game ends after 20 blocks are created and the player wins. I was wondering how I can make it better overall....
Haku's user avatar
  • 51
3 votes
0 answers
56 views

Creating a simple windows instance capable of rendering Direct3D graphics

I've just started to learn recently about Direct3D, when I've learned to create a simple window I started wondering if I could automate this process, so whenever I would need to create a window I ...
Rafael Ferreira's user avatar
3 votes
2 answers
143 views

Implementing dynamic array without STL

For my game engine that I'm trying to write without using STL I implemented dynamic array class(some kind of std::vector). I would like to know whether this code suits best practices. I'm also not ...
Poseydon's user avatar

1
2 3 4 5
8