Skip to content

The Roger Blog - Notes of a software developer

Development Diary 2012 - June

My Development Diary 2012 Read more »

Crash in CDHtmlDialog's OnInitDialog method

In the code listed above, m_wndBrowser.GetControlUnknown() returns NULL and is assigned to the lpUnk variable, and later on a call to lpUnk->QueryInterface is done. There we have an access violation exception. Read more »

Porting Native API calls to Windows 7

I'm currently porting FreeFixer for the Windows 7 platform. Luckily the different flavors of Windows does not differ that much from one release to another, so most of the unit tests worked without any changes to the existing code. There's one piece of code that needed an update though, and it's the rootkit detection plugin, which in its current state detects hidden processes. This plugin uses the Windows Native API. The Native API is incompletely documented and used internally by the Windows NT operating systems (NT, XP, 2000, Vista, Win7, etc). FreeFixer calls the Native API by putting the system calls index in the eax register, and then using sysenter or int 2Eh depending on the platform. By using this procedure, FreeFixer can bypass some of the rootkit hooking techniques that hide running processes. Read more »

OpenProcess and Audiodg.exe

On Windows XP I had previously obtained the SeDebugPrivilege privilege (defined as SE_DEBUG_NAME) and then opened all processes with the OpenProcess system call and passing PROCESS_QUERY_INFORMATION | PROCESS_VM_READ as the requested access. However, on Windows Vista OpenProcess failed on Audiodg.exe, with the ACCESS_DENIED error code. Windows Vista introduced a new type of process, the protected process. Protected processes are there to 'enhance support for digital rights management functionality in Windows Vista'. Read more »

How to toggle tab size in Visual Studio using a macro

How to toggle tab size in Visual Studio using a macro Read more »

How to get the HMODULE in an ATL DLL project

In ATL 7.0, which comes with Visual Studio 2003 and Visual Studio 2005, _Module has been replaced and you can use the m_hInst member in _AtlBaseModule Read more »

enum, bit fields and Visual Studio

Visual Studio's 8.0 compiler can represent bit fields of enum types with a signed type. Read more »

How to enable syntax highlighting in Visual Studio

The article shows how to enable syntax highlighting in Visual Studio. Read more »