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
1answer
45 views

Win32 Snake game

I made a trival snake game below to practice my C++ and Win32 programming skills. ...
1
vote
1answer
27 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 ...
1
vote
0answers
33 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. ...
3
votes
2answers
73 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? ...
0
votes
0answers
38 views

convert ID3DXMatrixStack to DirectXMath

Is it right it convert ID3DXMatrixStack to DirectXMath like that: ...
4
votes
0answers
25 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. ...
1
vote
1answer
67 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 ...
1
vote
1answer
43 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 ...
3
votes
1answer
42 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: ...
2
votes
1answer
90 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 ...
2
votes
0answers
32 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 ...
2
votes
1answer
40 views

Detect discontinuities in Windows clock in Java

Please review the code below, which detects discontinuities in Windows system clock in long-running programs. ...
5
votes
3answers
756 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....
3
votes
0answers
35 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 ...
0
votes
0answers
42 views

Basic process management in Windows kernel

I'm in the process of learning Windows kernel programming and I'm focusing on writting clean C code that handles and propagates errors correctly. The following piece of code is quite simple, but I'd ...
4
votes
2answers
86 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 ...
1
vote
0answers
386 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 ...
1
vote
0answers
92 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 ...
3
votes
1answer
66 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,...
2
votes
1answer
39 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: ...
5
votes
1answer
165 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: ...
1
vote
2answers
122 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. ...
2
votes
1answer
57 views

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

(See the previous (i.e. first) version of this tool.) (See the next follow-up.) After taking into consideration all the advice by Martin R, I ended up with the following tool for terminating all the ...
5
votes
1answer
78 views

A simple C WinAPI program for terminating processes via process image names

(Also, see the next iteration.) I have this small program for terminating processes via their respective process image names (.exe files): ...
3
votes
1answer
167 views

Simple Windows implementation of the cat command

On Linux there is the cat command which outputs files concatenated but on Windows there exists no such command. As a result I decided to attempt to recreate a ...
4
votes
0answers
76 views

Basic snake game in C

I wanted to learn C and Win32 so I thought the best way to start would be to create a simple game to get familiar with the language, so I made Snake. The games works perfectly except for sometimes ...
5
votes
0answers
296 views

safexl - A Python / pywin32 Excel Application wrapper

Thanks in advance for your interest in my first PyPI project. While there happen to be a number of projects out there to help with creating & consuming Excel workbooks, I was unable to find one ...
4
votes
2answers
99 views

Lowering the CPU usage when capturing and dividing screenshots into blocks using GDI+

I am trying to capture the screen content of each monitor I have and divide each captured bitmap into small blocks (wxh=128x128). I managed to do this using the GDI+ API, but my implementation (on ...
3
votes
2answers
342 views

Random alphanumeric string generator function (C, Windows, bcrypt.h)

The function uses the Windows "Cryptography API: Next Generation" (bcrypt.h)'s BCryptGenRandom function to generate ...
1
vote
0answers
25 views

Wrapper function that returns cached value from WinAPI call [closed]

I am writing myself a little wrapper and I decided to cache values that shouldn't change (often or at all) for returning to the user, I'm coming from the premise that the WinAPI call is more expensive ...
7
votes
1answer
321 views

x64 NASM Assembler: Binary Search

While quarantine I decided to look into the assembly language, as it's quite interesting to see how code works on the lower levels. To challenge myself I made a binary search algorithm. The OS is ...
7
votes
1answer
128 views

Powershell script to verify Linux-generated md5sum file

I'm moving some files from a Linux machine to a Windows machine over a low-speed, possibly buggy experimental communications channel that I want to test. One of the tests is to transfer large numbers ...
1
vote
1answer
76 views

Internally Safe Filesystem

win_xept.hpp - a basic windows api exception ...
2
votes
0answers
368 views

C# class to dump the memory of a process in several formats

I made this because I couldn't find any good C# classes/libraries that allow you to dump the contents of a process' memory into a file or a byte array. I haven't tested this on 32 bit systems but it ...
1
vote
0answers
44 views

Simple header-only thread and mutex for both windows and linux in C

I wanted to get some thread support on windows with very simple headers for a library that I'm working on but it had to work on both Windows and Linux. Since C11 threads are not widely supported, this ...
4
votes
0answers
66 views

C program to sort files based on information within

I have written a C program to sort files (on Windows) into dynamically created subfolders based on information found in their data headers. I am a newb at C, especially memory management. The code ...
-4
votes
2answers
57 views

Returning employee balances

Here is the code for balance retrieval from EMPLOYEES record. Please simplify and improve it accordingly. It is working fine and I have no problem with it but I believe that's not the correct way to ...
5
votes
1answer
82 views

Windows autoclicker with a console interface

I have recently started coding in c++ and have made a simple console application. When executed the program asks the user to position their cursor wherever they want continuous repeating clicks, after ...
4
votes
0answers
98 views

downloading a list of urls

I wrote this quick (lots of googling) and dirty (I hope not too dirty) script to download a URL list with a win32 wget port and save them as files with the url as the name to use as a "poor man's url ...
2
votes
1answer
114 views

Create Word Document in C++

I am new to COM programming in C++ and while this code works welcome suggestions to improve readability/reliability. This creates a blank word document and adds the text Hello, World. ...
1
vote
0answers
42 views

Batch file that executes multiple .msi files

I am attempting to create a batch file that will execute multiple msi files in a particular location on our network. My intention is not to have any user interactions until they are prompted to do a ...
3
votes
0answers
74 views

Instant to-and-from Roman Numeral Conversion

Ⅰ Roman numerals are composed of digits taken from a small set of uppercase characters. Lowercase characters were first used in the Middle Ages. $$I,V,X,L,C,D,M$$ With these digits we can represent ...
2
votes
1answer
80 views

Flash Light Effect Windows Forms Edited

I am having performence issues with image processing task (flash light effect). I used c#, and used couple references (LockBits Method, Extension). The program has bad frame rates. Edited the code, ...
3
votes
1answer
45 views

Key-scanning macro in NASM Win16 against DOSBOX (Intel 8086)

Supports backspacing, but not wrapped backspacing. ...
6
votes
1answer
163 views

Multitasking in NASM Win16 Assembly

Requirements (Installed using Scoop) scoop install nasm dosbox Build (Using NASM) nasm -g tasks.asm -o tasks.com ...
3
votes
0answers
32 views

Retrieving Registry nodes for HKLM

I am using the below code to retrieve nodes and values. It is taking 20 mins to retrieve the nodes and values of HKLM. I'm expecting to reduce the retrieving time ...
4
votes
1answer
383 views

Printing a string in NASM Win16 Assembly

A small script that simply prints a given string. It's an improved snippet that combines some recommendations given in my post on string helper functions. ...
2
votes
1answer
53 views

Retrieving HKLM nodes of Windows10 Registry

I have used below code, code is working fine, also retrieved the data, but there are performance issues. Retrieving the HKLM registry nodes is taking around 6 mins time. Please suggest any solution. <...
6
votes
2answers
320 views

String helper functions in NASM Win16 Assembly

Environment NASM is required to build this program, and DosBox is required to run it. I'd recommend installing these using the Scoop Package Manager. Feel free to ignore install statements for any ...
6
votes
1answer
188 views

Changing the ACL on a folder through Wscript.Shell within VBA

I have working VBA code in excel that changes a network folders permissions. The code uses Wscript.Shell to run icacls commands but there are multiple instances of this command and each time it runs, ...

1
2 3 4 5
7