Application Verifier

Cool app…help me find a random crash in Thread Pool caused by invalid handle when calling


<Microsoft Application Verifier is a runtime verification tool for unmanaged code. It assists developers in quickly finding subtle programming errors that can be extremely difficult to identify with normal application testing. Application Verifier makes it easier to create reliable applications by monitoring an application’s interaction with the Microsoft Windows operating system, profiling its use of kernel objects, the registry, the file system, and Microsoft Win32 APIs (heap, handles, locks, and more).>

How to generate UUID string in MFC

CString GenerateUuidString()
    CString strKey;
    UUID uuid;
    if (UuidCreate(&uuid) == RPC_S_OK)
        PUCHAR szUuid;
        if (UuidToString(&uuid, &szUuid) == RPC_S_OK)
            strKey = szUuid;
    return strKey;

VC++ Directories vs. Additional Include Directories

Project->Properties->Configuration Properties->VC++ Directories:
– the setting in Options is used for all VS.
– Also can be found in VS->Tools->Options->Projects and Solutions->VC++ Directories which is added by default to all projects.
– The Include Directories corresponds to the environment variable INCLUDE.

C/C++->General->Additional Include Directories:
– the setting in Properties is used only for this project

Property Manager & Property Pages in VS2010/2012

VS->Menu->View->Property Manager/Property Pages

property sheet at the bottom is applied first.

Property Pages->VC++ Directories
– “Executable directories” → PATH
– “Include directories” → INCLUDE
– “Reference directories” → LIBPATH (for #using)
– “Library directories” → LIB