Search Results for: list

How to Check Access Rights

Given that everyone is always pushing for better security mechanisms, I’m always surprised at how incredibly difficult the simple tasks can be in the Win32 security model. At work, we have an application that wants to do the right thing … Continue reading →

Posted in Win32 | Tagged , | 17 Comments

The comma

As C and C++ programmers, we’ve probably seen and used the comma countless times in our applications, without thinking too much about it. However, there are some very interesting points to this piece of punctuation that are worth discussing. The … Continue reading →

Posted in C/C++ | Tagged , | 4 Comments

Opaque Data Pointers

Most of the frameworks that I work on need to be usable from multiple programming languages (typically, C++, C# and Objective-C, but sometimes more). This means I must target the lowest common denominator in terms of the function prototypes, so … Continue reading →

Posted in Framework Design | Tagged , | 8 Comments

Warning: Don’t Ignore Warnings!

How many times have you run across code that looks fine, works fine, but still generates a message like “Signed/unsigned mismatch” when we compile it? How many times have you thought to yourself, “that’s stupid, I know this code is … Continue reading →

Posted in C/C++ | Tagged , , | Comments Off on Warning: Don’t Ignore Warnings!

Reconstructing a Corrupted Stack Crawl

For my day job, I frequently look at reports that come out of WinQual from Microsoft. These reports contain crash dumps that I can use to determine what’s going wrong with the software I’ve been working on. All in all, … Continue reading →

Posted in Win32 | Tagged , , | 4 Comments

Remote Thread Injection on Windows

I happened to have a legitimate case where I needed to inject a thread into another process, and in the process of solving this problem I realized there’s very little accurate information on the topic of remote thread injection available … Continue reading →

Posted in Win32 | Tagged , | 2 Comments

Function Pointer Basics

At their core, functions are nothing more than a location in memory with some special semantics attached to them. The assumption is that the location in memory is the start of some machine code to be executed, and that there … Continue reading →

Posted in C/C++ | Tagged | Comments Off on Function Pointer Basics

Delegating Constructors

Delegating constructors are one of those minor language features that don’t get a lot of headlines, but make a programmer’s life much easier. It’s not likely something you’ll use on a daily basis, but it is something you will run … Continue reading →

Posted in C/C++ | Tagged , | Comments Off on Delegating Constructors

Lambdas

What is likely to be considered the biggest, sexiest feature of the new C++0x specification goes by many names. Some folks call them “function objects”, others call them “closures”, and still others call them “lambda functions.” Regardless of what you … Continue reading →

Posted in C/C++ | Tagged , , , | 2 Comments

Semantic Whitespace

No, this isn’t a blog posting about Python and its use of whitespace to denote statement blocks. This is actually a post about when whitespace matters in C++. It doesn’t happen particularly often, but whitespace can be important.

Posted in C/C++ | Tagged | Comments Off on Semantic Whitespace