- If you are searching for software or an utility:
- Software: check NTFS Links, DHCP Server pages
- WordPress Plugins: check Google Talk Sidebar Widget pages
- Utilities: check Utilities category and check subcategories on the sidebar
- If you are interested in C++ development, ATL and WTL:
- If you are interested in C++ DirectShow/Media Foundation development, check DirectShow and DMO tags;
Important: if you have a DirectShow question which is not directly related to posted material, please rather post it at DirectShow Development MSDN Forum (you might want to prefer another DirectShow forum if you speak Russian), especially instead of asking me in the website chat - Check Technology category, ATL and WTL subcategories, you might also be interested in Source Code; additionally source code is available via Assembla’s Trac
- If you are interested in C++ DirectShow/Media Foundation development, check DirectShow and DMO tags;
- Many downloads are hosted on Assembla, who changed download links a few times as a part of their maintenance. Should any download link be broken, please (a) post a comment and (b) check if you can modify it manually to the form of http://www.assembla.com/code/roatl-utilities/subversion/nodes/trunk/… to have it fixed fix it.
- Note that due to an incident with a web hosting service, screenshots and images for older posts are no longer available. Sorry for inconvenience.
Sticky: Blog Navigation
This is a sticky post! continue reading?
Endangered species – Debugging Tools for Windows
A standalone redistributable installation before, Debugging Tools for Windows was finally absorbed into Windows SDK. MSDN quote from Download and Install Debugging Tools for Windows:
Install Debugging Tools for Windows as a Standalone Component
If you do not want an entire kit (WDK or SDK), you can install the Debugging Tools as a standalone component from the Windows SDK.
TO INTSTALL JUST DEBUGGING TOOLS: In the SDK installation wizard, select Debugging Tools, and clear other components that you don’t want. Note that .NET Framework 4.0 also will be installed.
- Install Debugging Tools for Windows as a Standalone Component
Install Debugging Tools for Windows without Installing .NET Framework
If you do NOT want to install the .NET Framework, there are additional steps needed.
Start the install process on a different computer where it is okay to install the .NET Framework. The installer requires .NET Framework 4.0 or higher, and will install .NET if it is not already installed.
Install the Debugging Tools as a standalone component from the Windows SDK. In the installation wizard, select Debugging Tools, and clear other components that you don’t want.
After installation is complete, go to the program files directory and look for (%Program Files%)\Windows Kits\8.0\Debuggers\Redist.
Copy and run the applicable MSIs on the computer that cannot have .NET.
Also, Windows SDK for Windows 8 Consumer Preview is not available as ISO download. So you have to use web downloader, install the gear, and having gone through this, the .MSI of interest are finally there.
You gotta be kidding me, though still thanks for not removing those completely.
Enumerating Binary Resource Languages
The small application is a goos sample and useful tool in the same time. It enumerates PE binary resources and counts languages used. Why? Normally you want single language of resources, however Visual Studio IDE does not show you languages in a convenient way and it is so easy to make a language mess which does not bite you immediately but might bring you troubles later. Apart from this there was a suspicion that language mess might cause runtime bugs on UpdateResource API.
The application gets you a summary of languages used and returns with exit code (checkable using e.g. errorlevel) indicating number of languages.
Output is TSV: LANGID, Language Name, Resource Count:
C:\>ListResourceLanguages.exe C:\Windows\syswow64\shell32.dll 1049 Russian 545 1033 English 3318
Download links:
- Visual C++ .NET 2010 source code: Trac, Subversion
Resource Tools: Custom Resource Types
This update for Resource Tools adds an option to access custom resource types, such as FILE, TYPELIB, REGISTRY etc. It lets enumerate the resource, and load/save them. The COM interafce adds new Items property; the code snippet below accesses type library of image2.dll and saves it into external tyle library file image2.tlb:
image = new ActiveXObject("AlaxInfo.ResourceTools.Image"); image.Initialize("C:\\Windows\\syswow64\\imapi2.dll"); image.Items("TYPELIB").Item(1).SaveToFile(null, "imapi2.tlb");
Additionally, image.EndUpdate(false) call makes the object close all references to the underlying file so that it can be available for other operations (e.g. overwrite), and the COM object might be further re-initialized and reused.
Download links:
- Title: Alax.Info Resource Tools
- Version: 1.0.7
- Download (32-bit, Win32): ResourceToolsSetup.msi
- Download (64-bit, x64): ResourceToolsSetup-x64.msi
- License: This software is free to use
LogProcessExceptions: Log Service Process Exceptions
One of the nasty issues with LogProcessExceptions utility was that it was unable to attach to service processes and track them to catch their exceptions.
The actual problem was that the processes were not listed in first place, so there was nothing to attach to. Access and security requirements necessary for a process to debug another process are listed in MSDN DebugActiveProcess article:
The debugger must have appropriate access to the target process, and it must be able to open the process for
PROCESS_ALL_ACCESS.DebugActiveProcesscan fail if the target process is created with a security descriptor that grants the debugger anything less than full access. If the debugging process has theSE_DEBUG_NAMEprivilege granted and enabled, it can debug any process.
The utility did enable the SE_DEBUG_NAME privilege, however it was doing it prior to starting debugging session and after the process of interest was already pointed to by user.
This was insufficient because EnumProcesses only lists service processes (not actually exactly services, but processes running in different security context) in case debug privilege is already enable by the time of the API call. The utility now enabled the privilege well in advance and list the services, so can be effectively applied to those.

Download links:
- Partial Visual C++ .NET 2010 source code: Trac, Subversion
- Binaries: Win32 – LogProcessExceptions.exe, x64 – LogProcessExceptions.exe
American Kestrel Partnership — The Peregrine Fund
As a part of American Kestrel Partnership project, Peregrine Fund put live cameras online to broadcast interior and exterior views of American Kestrel nest boxes in their campus in Boise, Idaho.
One of the nestboxes is not only populated, four eggs have been laid recently and hatching is expected soon. The live picture is made possible by putting IP cameras and connecting them with to Ustream.tv broadcasting service through Adobe FMLE software through my IP Video Source DirectShow driver for IP cameras (the IP camera video feed is streamed 24/7 through a virtual video device picked up by FMLE and re-encoded into uploadable stream forwarded to Ustream online service for further distribution).
For more information, see:
- American Kestrel Website
- News Release: The Peregrine Fund launches new project, website to conserve American Kestrels
- NPR news story about the project
- American Kestrel Partnership Project
- American Kestrel on Wikipedia
- The Peregrine Fund on Ustream.tv
Watch the pet on live cameras below:
North Nestbox – Outside
North Nestbox – Inside
Enabling ATLTRACE output in Release configuration builds
The original intent is pretty clear, as MSDN states:
In release builds, ATLTRACE2 compiles to (void) 0.
As simple as this, but once in a while you are in a situation where release build fails to work for unknown reason and you need additional information for troubleshooting, and then you remember that you had debug tracing code still nicely available in the source, it is just being stripped out by definition of ATLTRACE/ATLTRACE2 macros for release builds.
To avoid reinvention of the wheel and putting new tracing, it might make sense to just re-enable existing tracing (certainly, if putting debug build binary is out of question, which might be the case in production environment and/or to avoid the hassle of installing additional runtime).
The macros need to be #undef’ined and redefined appropriately with or without limiting scope by push_macro/pop_macro #pragma’s. The trick with macro has to reach two goals, to pick file name, line and current symbol name using __FILE__ and friend macros, and also accept variable number of arguments.
The trick ATL does and we can use too is to define a helper class, with constructor taking file name, line and symbol name values, and cast operator () taking actual tracing parameters and arguments. Internally the output can be mapped to OutputDebugString API so that output could be seen using external tool such as DebugView.
When everything is well set, new the macros in question can be defined as follows:
#pragma push_macro("ATLTRACE") #pragma push_macro("ATLTRACE2") #undef ATLTRACE #undef ATLTRACE2 #define ATLTRACE2 CAtlTrace(__FILE__, __LINE__, __FUNCTION__) #define ATLTRACE ATLTRACE2 int _tmain(int argc, _TCHAR* argv[]) { ATLTRACE("First: %d\n", __LINE__); ATLTRACE(L"Second: %d\n", __LINE__); ATLTRACE2(atlTraceGeneral, 2, "Third: %d\n", __LINE__); ATLTRACE2(atlTraceGeneral, 2, L"Fourth: %d\n", __LINE__); return 0; } #pragma pop_macro("ATLTRACE2") #pragma pop_macro("ATLTRACE")
And the Release configuration output will be:

Visual C++ .NET 2010 source code is available from SVN; in particular CAtlTrace class is here.
Bonus reading:

Recent Comments