Login

 

Site Menu

How to make RegEnumValue vector friendly

I often get some fun challenges from coders looking for help in the #winapi channel I frequent on freenode. The coder today was looking for a way to get the output from RegEnumValue and values of type REG_SZ into a vector. Start by creating a Win32 project. In your stdafx.h here's what we need to include:

Add a comment

Read more ...

How to use EndTask

Recently someone in the #winapi channel I frequent ask about EndTask. It doesn't seem to be declared in windows.h. Well, it was a late comer to the API after Windows XP and it doesn't even seem to be in windows.h for Visual Studio 2012's included SDK either.

Add a comment

Read more ...

If not condition woes

Recently I've been doing a lot of python scripting. It's a bit of an alien language to me as I'm used to strong types, but maybe not quite as alien as F#! Today I ran into an impossible to find bug. All my return values were as expected, nothing was out of place; yet the test continued to sometimes fail. After borrowing the brain of one of my coworkers I realized what was wrong and I feel very dumb.

Add a comment

Read more ...

Subcategories

  • C / C++

    C++ is usually my choice language. If I'm writing a reusable API or low level tool it's going to be in C++. I'm not a heavy STL or template user; though I do use many parts of SDL when I find it most useful. When I originally learned C++ it was ANSI C++ many years ago so my code my not often utilize the latest and greatest, but every once in awhile I give in to my old ways and use something new. That means that sometimes my code is only going to be compatible with C++11, but most of the time it's not. I'm a simplistic person and I prefer readability, especially when posting here.

    C is another language I enjoy. I especially like to use it when making the most basic of command-line tools or teaching others how to do something. It's often easier to see what's going on in C than in C++ and that's just my opinion.

    Article Count:
    8
  • Python
    Article Count:
    1