tcdll.tclockでのフックのインストールとサブクラス化までの流れを紹介します。 フックのインストール tcdll.tclockには、tclock.exeから呼び出すための3つのAPI関数があります。HookStart、HookEnd、GetTClockVersionです(dll/main.c)。 HookStartは、フックをインストールすることで、tcdlll.tclockをexplorer.exeのプロセスにロードさせます。手順は次のとおり。 API FindWindow、FindWindowExでタスクバーとタスクバー上の時計のウィンドウハンドルを得る。 API GetWindowThreadProcessIdでタスクバーのスレッドIDを得る。 API SetWindowsHookExにタスクバーのスレッドIDを指定してフックをインストール。フックの種類はWH_CALLWND