SAMPLE: Windows Journal Hooks Sample Source Code

Last reviewed: February 15, 1996
Article ID: Q37138
The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) for Windows versions 3.0 and 3.1

SUMMARY

JOURNAL is a file in the Software Library that contains sample code to demonstrate the use of the journal hooks WH_JOURNALRECORD and WH_JOURNALPLAYBACK. The JOURNAL archive file contains the source to APP.EXE; WNDPROC.C is one of the source files.

The APP.EXE application serves only one purpose; it illustrates how to call the dynamic-link library (DLL) that performs all of the journaling work. The WNDPROC.C application module contains calls to the DLL to record and play back messages. One of the source modules for the DLL, JOURNAL.C, contains all the code required to create DIARY.BIN, a file of messages. The messages in DIARY.BIN can be played back at a later time. The DIARY.BIN file is overwritten each time the user chooses Record On from the menu.

The JOURNAL code can serve as the basis of a "hands off" application demonstration. The application demonstrating itself can call the high- level functions in the DLL to play each event.

The DIARY.BIN file is also included in the JOURNAL archive to demonstrate using journal hooks. To demonstrate playing the contents of a DIARY.BIN file, select Play from the menu.

Download JOURNAL.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:

  • Microsoft Download Service (MSDL)

          Dial (206) 936-6735 to connect to MSDL
          Download JOURNAL.EXE (size: 29711 bytes) 
    
  • Internet (anonymous FTP)

          ftp ftp.microsoft.com
          Change to the \SOFTLIB\MSLFILES directory
          Get JOURNAL.EXE (size: 29711 bytes) 
    


Additional reference words: 3.00 SetWindowsHook 3.10 softlib JOURNAL.EXE
KBCategory: kbprg kbfile
KBSubcategory: UsrHks


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 15, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.