Archive for the ‘C/C++’ Category

Avoid unsafe functions with Microsoft’s ‘banned.h’

March 27, 2014 Leave a comment

banned.h is an import header file to include in your Windows C++ projects to help avoid introducing security flaws into your application.

The banned.h header file is a sanitizing resource that is designed to help developers avoid using and help identify and remove banned functions from code that may lead to vulnerabilities. Banned functions are those calls in code that have been deemed dangerous by making it relatively easy to introduce vulnerabilities into code during development.  For example, if a developer decided to use the strcpy function in his/her code, using banned.h in the same application will generate error(s) when its recompiled telling the developer that strcpy has been deprecated.  When the developer investigates why the error is being generated, they will likely figure out that strcpy has been replaced with a more secure version called strcpy_s, that makes it more difficult to make mistakes that lead to simple buffer overflows.


Categories: C/C++, Programming, Tech

Windows 7 UAC bypass

September 11, 2013 Leave a comment
Categories: C/C++, Windows

OSR Driver Loader

April 29, 2013 Leave a comment

If you do any Windows driver development or testing, the OSR Driver Loader is essential…and free.

New and Improved V3.0! Installing and starting NT kernel mode drivers can be a hassle. This is especially true during the development stage of a project, before you’ve built an attractive gui-based custom installation program. Now, OSRLOADER eliminates your trouble.

This GUI-based tool will make all the appropriate registry entries for your driver, and even allow you to start your driver without rebooting. It’s even got a help file, for goodness sakes! If you write drivers, this is another one of those utilities that’s a must have for your tool chest. x86 architecture.


Categories: C/C++, Programming, Tech, Windows

Delphi to C++ types mapping

April 17, 2013 Leave a comment

Below is a list of Delphi data types and the corresponding C++ data types:

Delphi type

Corresponding C++ type

Boolean (Delphi)

bool (C++)

ShortInt (Delphi)

ShortInt, signed char (C++)

SmallInt (Delphi)

short (C++)

Integer (Delphi)

int (C++)

Byte (Delphi)

Byte (C++)

Word (Delphi)

Word (C++)

Cardinal (Delphi)

unsigned (C++)

Int64 (Delphi)

__int64 (C++)

UInt64 (Delphi)

unisgned __int64 (C++)

NativeInt (Delphi)

int (C++)

NativeUInt (Delphi)

unsigned (C++)

Single (Delphi)

float (C++)

Double (Delphi)

double (C++)

Extended (Delphi)

Extended (C++)

Currency (Delphi)

Currency, CurrencyBase (C++)

Comp (Delphi)

Comp, CompBase (C++)

Real (Delphi)

double (C++)

ShortString (Delphi)

ShortString, ShortStringBase (C++)

OpenString (Delphi)

OpenString (C++)

File (Delphi)

file (C++)

Text (Delphi)

TextFile (C++)

ByteBool (Delphi)

ByteBool (C++)

WordBool (Delphi)

WordBool (C++)

LongBool (Delphi)

BOOL (C++)

Real48 (Delphi)

not supported in C++

Pointer (Delphi)

void* (C++)

PWideChar (Delphi)

WideChar* (C++)

PAnsiChar (Delphi)

char* (C++)

Variant (Delphi)

defined in sysvari.h (C++)

OleVariant (Delphi)

defined in sysvari.h (C++)

LongInt (Delphi)

int (C++)

LongWord (Delphi)

unsigned (C++)

TextFile (Delphi)

TextFile (C++)


Categories: C/C++, Delphi, Programming

Compiling WDK (Windows Development Kit) sample projects

June 20, 2011 Leave a comment

If you’ve installed the Windows Development Kit, you may have wondered how to compile the included sample projects considering there are no project files to easily open with Visual Studio. This is primarily because the WDK uses a separate toolchain.

In order to compile all samples, click on Start > Programs > “Windows Driver Kits” > “WDK xxxxxxx” > Build Environments > Windows 7 (or other platform) > x86 Checked Build Free Environment


You can select a different platform or operating system from the menu structure if you wish. Once the command prompt opens, type:

build -cZ

That’s it. Sit back and wait for the compilation to complete. It will take quite some time.

Categories: C/C++, Programming, Tech, Windows

Free Refactoring Tools for C++, C#, VB.NET, and ASP.NET

November 30, 2010 Leave a comment

Free CodeRush xPress, which is a refactoring add-on for Visual Studio These are pretty useful actually and have some nice features that make developing with Visual Studio easier. Note that these won’t work with VS Express, you must have VS Standard or better.

C# / VB (Visual Studio 2008 and 2010 only):


C++ ( Visual Studio 2005, 2008, and 2010):

Categories: C/C++, Programming, Tech, Windows

Learn to Program for Windows in C++

September 23, 2010 Leave a comment

Microsoft teaches you to program in C++ for Windows.

Welcome to the series Learn to Program for Windows in C++. The aim of this series is to teach you how to write a Windows program in C++.

In the first module, you’ll learn step-by-step how to create and show a window. Later modules will introduce the Component Object Model (COM), graphics and text, and user input.

For this series, it is assumed that you have a good working knowledge of C++ programming. No previous experience with Windows programming is assumed. (If you are new to C++, you can find learning material at the Visual C++ Developer Center.)

Categories: C/C++, Programming, Windows

Intel Multicore Programming Challenge

August 18, 2010 Leave a comment

In an effort to promote their Thread Building Blocks programming library for C++, Intel has released source code implementing common threading tasks that use their library.


This is also an excellent resource for information on threading, in general.

Categories: C/C++, Programming, Tech

Learn C Programming basics from a blog

August 12, 2010 2 comments

Purpose: “This website will provide you with lessons and quality material to learn basics of C language programming in just a few days. All you have to do is visit it here and then and read trough my lessons. You will notice I’m putting new lessons every day or two. It would be practical if you had Visual Studio installed on your computer and used it parallel to this lessons, but again it isn’t neccessary… just follow and read these C/C++ programming lessons and examples, and you’ll be on your way! Let’s not waste time, here we go…”

Categories: C/C++, Programming, Tech

The Programmer Competency Matrix

June 13, 2010 Leave a comment

A good reminder that you don’t actually know anything about programming ;-)

The Programmer Competency Matrix

In all seriousness, I ran across this and think it’s an excellent way to test yourself on your understanding and knowledge of not only a programming language, but operating systems and writing software as a discipline.

Categories: C/C++, Delphi, Perl, Programming, Tech