SAMPLE: DLL Installs an ISR That Can Signal an Application

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

In the Microsoft Windows environment, an interrupt service routine (ISR) can communicate with an application. n ISR must be in a fixed code segment in a dynamic-link library (DLL) to ensure that the code is always in memory and available to service the interrupt. In Windows 3.1, an ISR that supports hardware should be in an installable device driver to enable Windows to disable the hardware when it switches between MS-DOS tasks.

HANDLER is a set of sample programs that demonstrate how to install an ISR, and have the ISR communicate with an application. The HANDLER DLL installs an ISR, which in turn uses the PostMessage function to notify the DEMO application (included with HANDLER) that an event has occurred. The ISR is chained to the keyboard interrupt vector, and the DEMO application maintains and displays a count of keyboard interrupts.

This sample program illustrates how an application can detect a hardware interrupt. This may be useful to a programmer trying to support a hardware device in the Windows environment.

HANDLER is one of the advanced samples provided with version 3.1 of the Microsoft Windows SDK. HANDLER can also be found in the Software Library.

Download HANDLER.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 HANDLER.EXE (size: 24014 bytes) 
    
  • Internet (anonymous FTP)

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

The Microsoft C Compiler and Microsoft Macro Assembler (MASM) are required to build the files in HANDLER.


Additional reference words: 3.00 3.10 softlib HANDLER.EXE
KBCategory: kbprg kbfile
KBSubcategory: KrIsrDll


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.