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
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
218 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
  • 26.7k
2 votes
0 answers
239 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
995 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
99 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
356 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
109 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
109 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
100 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
0 votes
0 answers
65 views

Create a shortcut with admin rights for the current vbscript or any other application with arguments using an array

I made a subroutine in order to create a shortcut for the current vbscript or any other application with arguments using an array that can be called as follow : Create a shortcut to the current ...
Hackoo's user avatar
  • 206
5 votes
0 answers
361 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
155 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
61 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
85 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
0 votes
0 answers
36 views

A C WinAPI program for showing the color of the screen pixel pointed to by mouse cursor with clipboard support - follow up 2

Now it seems that I was able to make some progress with my program. See what I have: ...
coderodde's user avatar
  • 26.7k
2 votes
0 answers
97 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
591 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
  • 151
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
52 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
57 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
99 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
83 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
208 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
98 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
310 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
211 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
230 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
276 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
315 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
  • 26.7k
3 votes
0 answers
244 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
213 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
102 views

convert ID3DXMatrixStack to DirectXMath

Is it right it convert ID3DXMatrixStack to DirectXMath like that: ...
Greck's user avatar
  • 23
5 votes
0 answers
283 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
130 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
371 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 ...
Ayxan Haqverdili's user avatar
3 votes
1 answer
276 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
112 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
55 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
48 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
1k 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
46 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
122 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
6 votes
0 answers
914 views

Make Flutter app on Windows a drop target to accept files

My aim was to provide functionality for a Flutter app on Windows to accept drag-and-dropped files. Flutter apps are written in Dart and compiled to native code, but since this is a cross-platform ...
technolion's user avatar
1 vote
0 answers
468 views

Exporting Shellbags, Jump Lists, and LNK files with PowerShell

I'm new to PowerShell (started yesterday) and was wondering if there is a way of exporting Shell bags, Jump lists, and LNK files from the Reg to a local computer's desktop using PowerShell? I have ...
albatrossJohnson's user avatar
3 votes
1 answer
76 views

program that fully documents every file on drive

I have a program which goes through your drive and does two things: For every file extension it creates a file "file of extension_name" and whenever it encounters a file with that extension,...
fartgeek's user avatar
  • 257
2 votes
1 answer
50 views

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

(See the next follow-up here.) This is the 4th version of the program killer tool: ...
coderodde's user avatar
  • 26.7k
5 votes
1 answer
227 views

A simple C WinAPI program for terminating processes via process image names - folllow-up 2

(See also the previous follow-up.) Now, I seem to improve my program partially via the answer in my previous follow-up. It goes like this: ...
coderodde's user avatar
  • 26.7k
1 vote
2 answers
181 views

a simple implementation of unix2dos for windows

On linux there is the utility called unix2dos which converts UNIX EOLs(\n) to DOS EOLs(\r\n). However on windows there is no such tool so as a result I decided to make one. ...
nullptr's user avatar
  • 659

1
2 3 4 5
7