Category Archives: Windows

Everything which related to Windows OS

Get all windows

Long time ago I mean begining of nineties of the last century I started GUI Windows programming. The first application was based on message loop with 3 main players: GetMessage, TranslateMessage, DispatchMessage. Later higher level graphical interface API such as MFC did not require to write the code of Windows message loop, but application can… Read More »

MSDOS debugger

If you are not familiar how to enable old legacy MSDOS application capabilities on modern Windows OS, it is good to start with “WoW. 16-bit supplication on 32-bit Windows” article. The MS-DOS debugger is portable command line-oriented debugger in operating systems such as MS-DOS and OS/2, Windows (16-bit/32-bit versions only). It is started by DEBUG… Read More »

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 »