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

5
votes
1answer
69 views

Windows Batch Tech Tool

I made this to help new techs be more proficient while they are learning. I know most of it is common knowledge around here. I would also like to point out that I don't really know batch but I am ...
3
votes
0answers
30 views

Recycling Internet Explorer

Is there anything I can do to this code to optimize it to use less resources? ...
2
votes
2answers
69 views

Refactorings on a Win32 Screenshot saving program

Earlier this academic year I had an assignment to take a project I had written outside the context of University and apply a number of refactorings to it. I chose a program I had written a while ago ...
0
votes
1answer
46 views

Program to create list of all English Wikipedia articles

This program will scrape Wikipedia to create a list of all English Wikipedia articles. How can I improve this program as it currently performs very badly performance-wise? On my Internet connection ...
3
votes
1answer
54 views

Virtual Slots Implementation

What I can do to make this code more efficient? It is supposed to be like one of those slot machines where you gamble on it and stuff (like at a casino). ...
3
votes
3answers
207 views

Reading and printing sudoku input

I have seen programs to solve sudoku puzzles but to be honest.. They were badly written. First of all, readability of the program itself was horrible and the code was really long and confusing. So I ...
6
votes
3answers
75 views

Two implementations of file-reading

I work quite a lot with file reading and writing in C/Win32 and I started wondering if my code is completely ugly and how I can improve it. I wrote two simple examples of reading a file, and I wonder ...
1
vote
2answers
56 views

Launching links to a chat room - Invitation Program

This is a program you can compile on Windows. The program is an invitation of a chat system for programmers. Once you press enter, you will open the link with your default Internet browser. You can ...
7
votes
3answers
499 views

“Silly program” for moving the mouse and doing other things

I've made a simple program that moves the mouse and do other silly stuff. I want you to look at it and tell me what can I do better/less space and also what can I add. I want to prank my friends. ...
5
votes
1answer
54 views

Using a TSV text file and map for a Q&A program

The program outputs a menu asking for a new question or to ask a question. If you ask a question, it will search a .tsv text file for the question and return the answer. It will then check a map that ...
6
votes
3answers
616 views

Lemonade stand menu program

This is an assignment given in my C++ programming class. I have one main menu with four other menus branching out from it. I would like to make my code as clutter-free as I can, so please review ...
3
votes
1answer
100 views

Creation of a temp file on Windows

I implemented a test that reads data from temp file on Windows. I originally had an issue that I solved with the help of this answer ...
5
votes
3answers
413 views

“Jolly Jumper” challenge

I'm a C#/Java full-time developer who is trying to pick up C++ purely for educational reasons. I've tried to solve a pretty simple ACM ICPC problem and would love to hear all kinds of criticisms on ...
6
votes
1answer
65 views

File validator configured using XML

I am making an application to check for any files that does not follow a specific pattern defined in a XML file. The application works well, but the source code is not the greatest, and memory ...
7
votes
2answers
176 views

Movie-making script

The purpose of making this code is to copy/paste and run it (and it should run). I'm open to all feedback. ...
2
votes
1answer
113 views

Usage of Interlocked.CompareExchange for deciding whether a property has been changed by another thread

I'm developing a Windows Service that receives data from somewhere and saves it to DB one time per 5 minutes. The Service is multithreaded and I actually got problems when several threads saved data ...
4
votes
1answer
75 views

Recursively searching the Windows Registry

This function is part of a the Registry class that can be found on Google Drive. The class was originally written by Steve McMahon for VB6, but I ported it to VBA ...
3
votes
3answers
277 views

Getting computer info

I was trying to get my computer information and I came up with this code. It is working but I need opinions on how I am doing it. It is my first time to using ...
7
votes
2answers
571 views

How random is this password-generating algorithm?

This code's sole purpose is to create a very random password, using letters and numbers. I think that it fulfills its purpose, but I wonder, could it be done better? I'm not talking about ...
4
votes
1answer
581 views

Calling a function from a dynamically loaded DLL (version 2)

Please, have a look at the previous (bad) implementation and the review here. After reading the suggested article at HowTo: Export C++ classes from a DLL, I have decided to use a plain C function ...
4
votes
1answer
123 views

Calling a function from a dynamically loaded DLL

I need to implement some functionality of the otherwise monolithic application via DLL that is loaded at runtime. (Think about a customized DLL -- different for each customer.) The Visual C++ from ...
1
vote
1answer
92 views

Writing a small script to extract MS Exchange audit logs in .csv format

Background I'm using MS Exchange 2013 in my environment, and have a separate siem box which analyze logs produced by different systems (i.e exchange). The logs for Exchange are internally stored and ...
5
votes
1answer
68 views

Fastest Windows script to move files from one did to a network dir

I wrote a script that moves files older than two days over to a network share (via scheduled task). Windows Task Scheduler doesn't seem to like the script so much, but it works well by itself. Is ...
5
votes
2answers
2k views

Windows keylogger in C

I have had this keylogger code for a while now (a few years*), and I figured I would put it up for review. Here is what I would like reviewed (in order): Portability - right now, this program can ...
1
vote
1answer
49 views

DataService data storage

I have a DataService, which should talk to the server and store vars (for complicated calls, for example). Last time, I ended up with this approach (for the ...
14
votes
1answer
295 views

First socket class

I want my socket class to be reviewed, including recommendations and optimizations. Sokect.hpp ...
1
vote
2answers
124 views

What are practical issues using this code with common JavaScript libraries?

I'm not a JavaScript programmer. I have next to no idea about "what's out there" of libraries and so on. Therefore it's not unlikely that the referred to Windows HTML Application (HTA) code here, ...
5
votes
2answers
202 views

Socket class for use in web server

I've created this socket class to use in my web server application. I have two classes: one for the socket and the other for the webserver. ...
10
votes
3answers
214 views

Windows socket class

I need some advice to see if my simple Windows socket class is good enough to be used in a simple chat application. ...
7
votes
4answers
560 views

Socket wrapper class

I've created this thin wrapper class for a socket project that I'm working on. Can someone review my class and give me some points on if I'm on right track? ...
2
votes
1answer
401 views

User-defined color implementation in windows console

I have implemented an user defined colors enumerator, and if is possible I appreciate if I will get a code review. I want to know if my implementation is correctly or must improve it. If there exist a ...
2
votes
1answer
44 views

Loop filling a set with logging

After watching Raymond Hettingers talk Transforming Code into Beautiful, Idiomatic Python I got back to a function I wrote. I'm not quite sure how to make it more pythonic but I think this might be a ...
4
votes
0answers
415 views

Aysnc call back to UI Thread

My main DLL is a .Net one that has an async running method and fires an event when it's done: ...
5
votes
1answer
79 views

Script which migrates files to secondary storage and symlinks them

I wrote this code to clean up some of the space on our file server. We've got 15 years of legacy data that nobody accesses or changes or cares about that we have to keep regardless. I'd rather have it ...
5
votes
2answers
340 views

Optimize disk enumeration and file listing

I am writing C++ code to enumerate whole HDD and drive listing. However, it takes more than 15 minutes to complete the disk enumeration of all drives (HDD capacity 500GB) and compile the response in ...
5
votes
2answers
4k views

Simple thread pool in C++

I wrote a simple thread pool, which works pretty well. I would like to see your review of it. One important feature that I needed in the pool is the ability to wait until all the tasks that I sent to ...
2
votes
0answers
150 views

Am I getting the right information about installed SQL Server Instances?

I'm building an installer package for our software using Inno Setup. As a part of this, I'm also building a few different DLL's in Delphi XE2 to accommodate for some of the common tasks required by ...
2
votes
3answers
399 views

Python script to touch files of a particular pattern in all folders of a given name

The intent of this script is to hunt down all "*/testResults/*.xml" files and touch them, so that our build system doesn't issue errors that the files are too old ...
4
votes
1answer
97 views

Printing some metrics from a Windows machine

New to Ruby here. I just made a script that print some metrics from a Windows machine about its disk. The script works fine and as I wanted it to. Now, since I'm new to the ruby and programming world, ...
2
votes
1answer
469 views

Looking for a clean way to use ::CreateToolhelp32Snapshot

I have a process, let's call it it Proc1. It is installed in two different directories and one instance of each is running. C:\DirA\Proc1.exe C:\DirB\Proc1.exe When iterating through all ...
3
votes
1answer
267 views

Daemonize a process under Microsoft Windows

I wrote a simple tool to allow to daemonize any process under Microsoft Windows. The goal is to push any process into the background with no questions asked. That includes GUI applications, which ...
1
vote
1answer
138 views

Getting limited user input, with echo

I've written a code snippet that will get a (max.) 14 character string from the user input, and while the user is typing, simultaneously echo it out to the screen. It seems a bit long and ugly, so I ...
2
votes
1answer
246 views

Exception Handling Design

I am trying to design an exception hierarchy for logging errors. These logs will be used only by developers and not by users. This is a base class that I came up with. ...
5
votes
1answer
239 views

A simple NAT library

I've created a simple NAT library, with four essential functions: Find the UNPN device (the router in my case). Get the external IP address. Add a port forwarding entry. Delete a port forwarding ...
2
votes
1answer
192 views

RAII-Style Lockable Objects

TL;DR: Without the phrases "use Boost" and "use C++11", does the posted code for RAII-style locking of a resource look correct and safe, or is there something I've missed. Long Version: I am working ...
2
votes
1answer
129 views

Visualization of bubble sort in progress

I've written a program showing the process of bubble sort arithmetic in C. I need some suggestions on improving it. ...
3
votes
0answers
162 views

custom win32_file_streambuf

I am looking for a review regarding C++ streams behaviour conformance. I have made this win32_file_streambuf so that I can use it in log4cplus project. I basically ...
7
votes
2answers
215 views

Create CSV file of domain groups and their users

I'm fairly new to scripting in Python. I'm looking for suggestions on improving any of the following in the below script: my coding style, performance, readability, commenting, or anything else. ...
4
votes
1answer
501 views

Recursive Windows Directory listing

I wrote a PowerShell script for a superuser question: list of all files and directories under a path recursively, without recursing into junction points or links I have a strong feeling that my ...
11
votes
1answer
512 views

Capture with User32.dll or hook?

I am trying to capture screenshots as fast as possible from when it's displayed, meaning that I want the latency to be minimal. Currently, I am using user32.dll to capture a window. So, if I have a ...