Archive for the ‘Source’ Category

Moving on with LogProcessExceptions tool which externally monitors (debugs, to be more specific) an application of interest and captures its exceptions writing minidump files for further analysis. This updates adds two features: Ability to filter out the exceptions of interest An email notification on exception, with or without minidump file Filter A new property page [...]

Continuous realloc()

Posted: 29th September 2012 by Roman in Source, Uncategorized
Tags: , , , , ,

A colleague raised a question that realloc does better than free + malloc because allocated memory block is never being actually shrunk and reallocations to smaller size following by reallocations to larger (but still not larger than one of the previous) do not lead to heap locks and actual underlying heap memory block reallocations. While [...]

Reading HRESULT codes

Posted: 18th August 2012 by Roman in ATL, Source, Utilities
Tags: , , , , ,

Although HRESULT codes are so common and structure is simple and well known, and even Visual Studio helps decoding the values nowadays, looking up for code takes some effort: hexadecimal value, searching through SDK headers or online, overlapped regions of codes in FACILITY_ITF etc. MSDN describes the codes in the following sections: Structure of COM [...]

Suppose you have an automation object that needs to implement a callback into caller Visual Basic environment, which can be Scripting Host, Visual Basic for Applications, ASP etc. With all the late binding in VB scripting and so much different C++ code – how to put everything together? There are great choices, let us have [...]

An amusing bug which seems to be affecting three of the versions of Visual Studio in a row: 2012, 2010, 2008: a double right angle bracket closing (or just present) the declaration of templated base class is breaking Visual Studio outlining capability (code scout? Intellisense? whatever). Have a space there and you are fine.

Matthew van Eerde already made a similar wrapper over MFTEnumEx in How to enumerate Media Foundation transforms on your system, and this one extends it with enumeration of attributes, also listing them in human friendly way. This sort of code should perhaps have been in Media Foundation SDK Samples, however we have what we have. [...]

Windows Vista introduced helpful video and audio Digital Signal Processors (DSPs) in DMO form-factor, which however do not work smoothly with DMO Wrapper Filter and thus cannot be directly used in DirectShow. There perhaps was no intent in first place to extend DirectShow functionality with these new components, and no effort was put into providing [...]