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 [...]
Archive for the ‘Source’ Category
Log Process Exceptions: Filters and Email Notification
Posted: 8th October 2012 by Roman in ATL, Source, Utilities, WTLTags: debug, exception, log, troubleshooting
Continuous realloc()
Posted: 29th September 2012 by Roman in Source, UncategorizedTags: C++, CRT, heap, memory, Source, Windows API
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, UtilitiesTags: code, COM, DirectShow, error, hresult, media foundation
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 [...]
Three ways to implement VBScript (VB6, VBA) callback from C++/ATL class
Posted: 11th August 2012 by Roman in ATL, SourceTags: ATL, automation, C++, COM, scripting, vb, vba, vbs
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 [...]
Double right angle bracket kills Visual C++ source code outlining in IDE versions 2008, 2010, 2012
Posted: 11th August 2012 by Roman in SourceTags: amusing, C++, IDE, Source, visual studio
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.
Enumerating Media Foundation Transforms (MFTs)
Posted: 5th August 2012 by Roman in ATL, SourceTags: DMO, media foundation, mft, Source, transform, Windows API
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. [...]
Using Vista Video Resizer DSP in DirectShow, via DMO Wrapper Filter
Posted: 4th August 2012 by Roman in ATL, SourceTags: DirectShow, DMO, dsp, resizer, Video
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 [...]
