Category Archives: Windows

Everything which related to Windows OS

WoW. 16-bit application on 32-bit Windows.

There was time when PC used 16-bit microprocessors such as 8086 and 80286. The first 32-bit Windows NT operating system had NTVDM (NT Vistual DOS Machine) component that allowed execution of 16-bit Windows and 16-bit / 32-bit DOS applications. The latest 32-bit Windows operating systems does not support NTVDM by default, it should be enabled.… Read More »

Kill Process Programmatically by PID

If your computer is slow it could be that some of the running processes is frozen state. So it is time to terminate them. In Windows you can do it thought Task Manager in Mac using Activity Monitor. Similarly the process may be stopped in Windows command prompt by TaskKill command or in Mac/Linux terminal… Read More »

NSIS

NSIS stands for Nullsoft Scriptable Install System. It is a professional script-driven open source system to create installers for Microsoft Windows and an alternative to commercial products like InstallShield. Here I present step by step how to create simple Windows installer for my project usb-cubby which saves passwords and personal information in encrypted way. First… Read More »

C++ Calling Convention with naked functions

Calling conventions are a standardized methods for c++ compilers how to pass parameters to called function. MS Visual Studio gives possibility to use four of them: cdecl, fastcall, stdcall and vectorcall. The specific of every calling convention is hidden in function prolog and not visible for high level language programmer. This article makes an attempt… Read More »

How to Increase CPU Usage

The title of this post looks ridiculous, usually high CPU usage is a problem that slows down your computer and people are fighting to reduce CPU usage. However in my particular case I was working on CPU monitoring code and I need some tool that makes CPU consumption higher. So I created simple C# console… Read More »

Custom Protocol Handler (CPH)

Microsoft Windows supports registered custom protocols additionally to the common ones such as http, https, ftp, mailto and so on. To register an application to handle a particular URI scheme, new key, along with the appropriate subkeys and values should be added to the Windows registry. The new key The may be added to HKEY_LOCAL_MACHINE\Software\Classes… Read More »

Empty desktop and explorer crash

Suddenly my desktop became empty. Start menu plus the toolbar with pinned icons, stating time date and etc had gone! However pressing on ALT-TAB keys it is possible to see that applications were still running and switching between them also works. On my desktop computer Windows explorer started to crash every two or three days.… Read More »

How To Find Parent Process in Windows

Everything has been started by someone. It is related also to any application executed in operating system, except system itself. If you start notepad from command prompt the parent process of notepad process is command prompt. Currently most of the people find parent process using WMI query. For example: C:\projects>wmic process get processid,parentprocessid,name | findstr… Read More »

Processing Output Debug String Event

In previous article “Writing Windows Debugger in C#” the whole debugger architecture for Windows OS was discuss. This post describe how to process output debug string event sent by debugged process. On debugger side output debug string event is triggered by OutputDebugString function call, which has 2 versions: ASCII version OutputDebugStringA and Unicode version OutputDebugStringW.… Read More »

Writing Windows Debugger in C#

Actually C# is not the best language to call Windows Debugging functions. Several pinvokes and debugging structures definitions are required. They may be taken for winbase.h include file. In attached projects these pinvoke and structures definitions are located in PInvokes.cs file. Debugger is a program to debug another process. The debugger may start new process… Read More »