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

6
votes
3answers
530 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
66 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
345 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
52 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
149 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
94 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
60 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
264 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
547 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
185 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
85 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
49 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
54 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
656 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 ...
0
votes
0answers
17 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 approach (for example, I'm ...
13
votes
1answer
265 views

First socket class

I want my socket class to be reviewed, including recommendations and optimizations. Sokect.hpp ...
1
vote
2answers
105 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
169 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
162 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
518 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
220 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
41 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 ...
3
votes
0answers
309 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
72 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 ...
0
votes
0answers
439 views

Wix configuration to auto-update Windows service using MajorUpgrade tag

I'm new to Wix Toolset, I'm using Wix 3.8 and Visual Studio 2012. I'm trying to create a Product.wxs that Upgrade my Windows service, but it can't lose user account information when update. It has ...
5
votes
2answers
243 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
2k 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
129 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
297 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
84 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
351 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
184 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
118 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
195 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
176 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
162 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
113 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
138 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
203 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
202 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 ...
10
votes
1answer
433 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 ...
10
votes
2answers
208 views

x64 assembly clearmem / zeromem

I've just started learning assembly yesterday, and the first useful thing I've written is a clearmem function. I'm looking for general feedback regarding my coding ...
2
votes
1answer
430 views

std::string/std::wstring template wrapper for Win32 API

I have not completed this but want to make my own template library for wrapping the Win32 API to make it compatible with std::string/std::wstring... Here's a sample of what I've worked with so far. ...
0
votes
2answers
383 views

Speed up SVN backup

The following batch script runs on a Scheduled Task on Windows 7 with a quad core 2.5GHz and 16GB of DDR3. It makes the svn server unavailable for about 10 minutes, so it can produce a 500MB file, ...
1
vote
2answers
114 views

Improving my game code

I made this simple game code. Can you please give me some advice about how can I improve it ? I thought about making the screen blue and the letters yellow can someone explain me how to do that ? ...
3
votes
1answer
56 views

Aid in making a clock code more modular

Can someone help in making this clock code more modular so I will be able to use it in other bigger projects for example: turn into a c function. Here is the code: ...
2
votes
1answer
86 views

Would this code cause memoryleaks?

My question is really simple. Does this code cause memoryleaks? If so, where/how/why? ...
0
votes
1answer
62 views

Batch script to customize cmd.exe color and prompt [closed]

Write a batch script which configures this list of commands : Put the name of the window "Cmd configuration" Put the color of the text in green. Put the prompt character "$" Show the message "Cmd ...
0
votes
2answers
524 views

Correct way of using HBRUSHes..?

If I create a brush like so HBRUSH hBrush = CreateSolidBrush(RGB(33, 33, 33)); and then later on, I want to change the color of the brush, how would I do this? I ...
3
votes
2answers
500 views

C++ code to launch a Windows 8 app

This is my first C++ in many years. It's based on some stuff I found on the internet, including a Microsoft article on a similar topic. But I'm sure there are C++ idioms that might make this better or ...