Skip to main content

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
3 votes
1 answer
75 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 ...
Pietro Pianigiani's user avatar
3 votes
1 answer
97 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. : ...
SebMa's user avatar
  • 131
3 votes
1 answer
54 views

Powershell script that directly executes python script

Wrote this script after having some problems with clients on Win10 and consequent necessity to ship ultra-bloated .exe file of Python project over the Web to them. This is my first try to write ...
Max Azatian's user avatar
2 votes
1 answer
58 views

Reading a date from the start of a text webpage from github to determine if the program is fully updated

...
my_stack_exchange_account's user avatar
1 vote
1 answer
85 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
  • 28.3k
2 votes
2 answers
119 views

A print function which works with /NODEFAULTLIB

...
my_stack_exchange_account's user avatar
2 votes
1 answer
90 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
  • 147
2 votes
2 answers
187 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
129 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
80 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
  • 28.3k
3 votes
0 answers
97 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
78 views

Windows Kernel `vector` class

...
anoncr's user avatar
  • 21
2 votes
1 answer
63 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
  • 28.3k
5 votes
1 answer
204 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
231 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
  • 28.3k
2 votes
0 answers
600 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
2 votes
1 answer
907 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
  • 88
1 vote
1 answer
122 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
144 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
124 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
716 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
194 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
93 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
106 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
136 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
2k 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
139 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
82 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
60 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
4 votes
1 answer
200 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
  • 203
2 votes
1 answer
130 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
278 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
117 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
553 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
289 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
363 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
323 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
419 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
  • 28.3k
3 votes
0 answers
487 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
259 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
5 votes
0 answers
482 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
132 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
624 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
578 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
115 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

1
2 3 4 5
8