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.

learn more… | top users | synonyms

9
votes
2answers
910 views

2D Collision Detection

I wrote this a while ago but wanted to see if I went about it the right way and if my brain is working correctly. I was thinking about these two projects the other day and I recently released the ...
3
votes
1answer
32 views

Automated batch and python skeleton script file creation

The code below uses a single command line 'filename' argument to create a batch and python skeleton script file in the cwd. The python file is then automatically opened in IDLE for convenience. As a ...
3
votes
1answer
47 views

Selecting folders based on last modified date

I am attempting to find folders based on their last modified dates. ...
3
votes
1answer
147 views

Multithreaded bottom up merge sort

Before I tried this, my impression was that (bottom up) merge sort would be memory (actual RAM) bound, and not affected much by multithreading, but a 4 thread sort is about 3.0 times as fast as a ...
3
votes
1answer
63 views

Win32/C: Notepad wrapper that automatically converts Unix line endings to Windows line endings

At my work we're dealing with a lot of PHP files written by a third-party company and sometimes we want to "quickly look at" these files in Notepad rather than having to open up a full IDE. The ...
3
votes
0answers
24 views

msysGit to Unix sockets

I wrote this small script to help porting msysGit sockets to WSL ("Bash for Windows"). I'm not a big Python programmer so any feedback would be well appreciated. By the way, I made it a public Gist ...
2
votes
1answer
37 views

Backup files at the end of the day

This is my first attempt at writing code that moves files at the end of the day, from my local work folder to an network archive. The program works but, any tips, tricks, or ideas to make this code ...
8
votes
3answers
249 views

Removing multiple slashes from path

I have been trying to write a sample code block to remove multiple backward or forward slashes from a path (e.g. //a//b should be ...
2
votes
1answer
49 views

Extension methods to save and load form size, position, and state

I wrote these extension methods to provide a generic/re-usable method for saving a form's size, position, and window state. What I would primarily like to know is if there is a better way to handle ...
4
votes
1answer
43 views

Walk file system checking that backup files are present

Everyday I manually check that that my systems were backed up. I use the windows file system through the Explorer gui and check that the backup files were modified on the previous day or later. This ...
2
votes
1answer
106 views

Automatically remove O365 license from AD user when using powershell

As you can see I have been using multiple conditions such as if, elseif, else, but it takes ...
2
votes
2answers
71 views

Hello Triangle in Win32 and OpenGL

At the moment, I'm trying to get some experience writing C++, Win32 and OpenGL, so I decided to implement a "Hello World" of sorts. However, instead of printing ...
2
votes
1answer
124 views

Escape the Trolls console game

I wrote a simple console game, with the idea taken from a Reddit post. The basic Idea is: Player, controlled via arrow keys, has to escape the maze (reach the ...
4
votes
2answers
259 views

Copying directories in Windows 10

I wrote a program to copy directories in Windows 10. I have tested copying a directory (696MB) in 3 different ways: xcopy: time taken - 52 seconds ctrl+c: time taken - 78 seconds My program: time ...
2
votes
1answer
65 views

Filesystem search class in C#

Anyone can tell how to make this code faster? This search takes too much time... 700 000 files for 15 minutes... I will be grateful for each micro optimization! Search Class: ...
4
votes
2answers
94 views

Getting NTFS permissions of all shared folders on the local machine

How can I improve the speed of the script? ...
3
votes
0answers
37 views

Settings JAVA_HOME with batch

At my work, I need to use multiple versions of Java, depending on which project I work on. I've made a batch script to take care of this. There are several different actions that you can perform with ...
10
votes
2answers
223 views

Batch file to backup and update SQL Server DBs

This is my first windows batch file. The script basically goes through this basic flow of tasks, in order to update some specific SQL Server DBs to a new DB version: Backup all SQL server DBs that ...
7
votes
1answer
176 views

Find installed and available Windows Updates

I have a function that uses Windows Update Agent (WUA) API through COM using the win32com.client module, part of pywin32 package for retrieving the installed and the available (not yet installed) ...
5
votes
1answer
42 views

Turn a vsscanf call into a sscanf call

I am reviewing some C code (see extract below) that uses inline asm. I believe there are 4 spec violations, 1 inefficiency and 1 honking big design flaw in this code. While some of the problems I'm ...
3
votes
1answer
129 views

TCP client library using Winsock WSAEventSelect in C++

One way to write a client which uses a specific protocol, eg http like in this case, is to create a base class with the basic socket handling functionality with virtual functions which can be ...
2
votes
0answers
43 views

GROM – Generalized Release Order Management

Inspired by the StackOverflow question Auto-increment release version Jenkins I developed the following generalized solution. Is there anything that can be done better, shorter, more elegant, more ...
6
votes
1answer
348 views

UWP scan for music files

I am implementing a music player for Windows 10, and I am in a bit of a pickle at the library phase. I am scanning for all the files in a music library (plus optional folders the user selects) and I ...
4
votes
1answer
51 views

Monitor and video mode querying

I am working on a large project that requires information about the monitor(s). Please don't be confused by the organization of the following structs. The design intent is to be cross-platform, so ...
0
votes
0answers
38 views

Populates and prints a crystal report using three command line parameters in c#

Let me start by saying that this is the first c# program I have ever written. I'm more of a c/c++ novice programmer, and still relatively new to object oriented programming. This code works and does ...
4
votes
1answer
587 views

Snake game in C++ for Windows console

To give you a simple background, I've been programming in C++ for about a week and decided I wanted to build a simple snake game. I made one over the course of a day and this is the end result. What ...
0
votes
0answers
87 views

Fast ReadProcessMemory, save guest names that is in memory in hum text file

My code is very slow. How do I get it fast? I would also like to put a scanner on if you have a name in memory to save it in a text file. ...
6
votes
3answers
114 views

Simple file renamer in C

It's been some time since I wrote something in C. I am looking for some advices related to my code in terms of coding style, bad/wrong logic, optimization (performance) and good practices. The code ...
1
vote
0answers
392 views

OpenCV-based wrapper for Windows screen capture

I have written a ScreenVideoCapture class that implements an interface for capturing frames from a specified monitor connected to the PC. It uses OpenCV structures (...
2
votes
1answer
547 views

C# console roulette game

I made a C# console roulette game. Check it out and give opinions on how to improve or ideas for some other features? It's not finished yet so it has lots of room for improvement. I am very new so ...
10
votes
2answers
246 views

Python Keylogger With Built In Security Measures

The program I have developed is currently used for detecting and recording keystrokes. I have added some built in security measures that can easily(somewhat) be modified to suit individual user needs! ...
2
votes
1answer
325 views

Create share folder, AD security group, add descriptions, and apply security to new folder

My goal for this script was to: Create new folder Create AD group FS-TESTSHARE-R Create AD group FS-TESTSHARE-RW Apply both groups to the new share folder Set full read permissions to FS-TESTSHARE-R ...
4
votes
1answer
94 views

Create share folder and AD security group and apply security to new folder

I think I'm finally done with my code and was hoping for some pointers. My goal for this script was to: Create new folder Create AD group FS-TESTSHARE-R Create AD group FS-TESTSHARE-RW Apply both ...
1
vote
1answer
267 views

Resize image from StorageFile

I have created a function that will take as a parameter a StorageFile and return a WriteableBitmap. I use this data type so that ...
3
votes
1answer
76 views

Attempt at solution for Dining Philosopher algorithm

I know there are a lot of different solutions to solve the "Dining Philosophers" problem, but I wanted to get some feedback on a solution that I have so far. My motivation for working on this is to ...
2
votes
1answer
1k views

Windows filepath and filename validation

I have a Windows program that prompts the user to input a file path, and file name. I then check that the file exists with Directory.Exists. Then the user inputs a filename. I check it using this ...
4
votes
1answer
193 views

Saving User Settings in Univeral App for Windows 10

I am a self-taught programmer, so please be gently. Please give as much feedback as possible for my code. I want to make sure I am doing things the right way and efficient way. What is the proper ...
5
votes
2answers
79 views

LifeSaver: Hides and manipulates windows

[ This app is now on github !! ] This is a small program I wrote to hide/show different windows on my Windows PC. This is named LifeSaver because it did save my ...
2
votes
1answer
58 views

DocsGatherer - gathering and organizing fragmented documents

This script is used for gathering fragmented documents from your computer, and organizing them by extensions. Here is the main things my algorithm does: Search through path(s) Stores documents' ...
2
votes
1answer
359 views

getProcID and getProcessHandle functions

I made two functions: one to get process id and the other to get a handle with all access to that process using the process id. I'm looking for help with making these easy to use on all types of ...
2
votes
1answer
172 views

Using GetTempFileName api function to check write access to a directory

On windows, to find out if I have write access to a directory, I found that it is easiest to just create a file in that directory. In order to do so, I found ...
10
votes
3answers
878 views

Date of latest GitHub project release

I needed a clean, simple and robust piece of code to retrieve the date of publication of the latest release of a given GitHub Project. My constraints were that it needed to be written in the C++11 ...
6
votes
0answers
88 views

Chatty AI that saves .txt files to remember

This is a basic AI that I created. It has a teach function that creates a .txt file with user inputed info for future use. If you type teachme you have the option to type in something that you have ...
3
votes
2answers
2k views

Find a serial port device through WMI (windows management instrumentation)

The idea here is to be able to find a USB serial port device connected during runtime, thus not knowing its port number, and use it in the application to retrieve information from the device. ...
3
votes
0answers
120 views

Delphi: convenience wrapper for GetSystemTimePreciseAsFileTime()

For some purposes it can be highly desirable to use GetSystemTimePreciseAsFileTime() whenever it is available (i.e. Windows 8+) because the accuracy of ...
1
vote
1answer
775 views

Accessing Wi-Fi network interface details from Java using netsh

I am developing a Java program on Windows. I want to access Wi-Fi interface details such as SSID, IP, subnet, enabled or not, connected or not and so on. I am currently trying with using netsh and ...
6
votes
1answer
104 views

A C function for returning the address of the calling function

Suppose you are given two functions, foo and bar, and neither of them are inlined. Now, if ...
3
votes
0answers
338 views

Asking Windows for real-time priority

This code snippet is about asking Windows for the highest possible execution priority. Basically, we have to ask for real-time priority class for the entire process, after which each thread has to ask ...
4
votes
3answers
1k views
1
vote
1answer
787 views

Get OS name in C++

This is the function I coded, obviously used to get the system name: ...