Posts Tagged ‘ATL’

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 [...]

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 [...]

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 [...]

So you got a memory corruption issue with a piece of software. It comes in a unique scenario along the line of having a huge pile of weird code running well most of the time and then, right out of the blue, a corruption takes place followed by unexpected code execution and unstable software state [...]

This adds a small update to the recently published GPS Location/Coordinate Converter utility: Seconds in Degrees, Minutes & Seconds notation are shown and are accepted as floating point numbers More shortcuts to popular online map services (note that only Google Maps and Yandex Maps are still accepted as input via clipboard): Bing Maps Yahoo Maps [...]

ATLENSURE_SUCCEEDED double failure

Posted: 19th July 2011 by Roman in ATL, Source
Tags: , , , , ,

A colleague pointed out that code snippet in previous post is misusing ATL’s ATLENSURE_SUCCEEDED macro making it [possibly] evaluate its argument twice in case of failure, that is evaluating into failure HRESULT code. As it is defined like this: #define ATLENSURE_SUCCEEDED(hr) ATLENSURE_THROW(SUCCEEDED(hr), hr) It does things in a straightforward way, for a code line ATLENSURE_SUCCEEDED(pFilterGraph.CoCreateInstance(CLSID_FilterGraph)); [...]

An updated version of LogProcessExceptions utility is given an additional option to create minidump .DMP files for debugged process on user request. This is in particular useful in conjunction with flag choices (on the previous page of the wizard). Download links: Partial Visual C++ .NET 2010 source code: Trac, Subversion Binaries: Win32 – LogProcessExceptions.exe, x64 [...]