DOCERR: KeyboardProc() Not Required in DLL for Task Hook

Last reviewed: July 17, 1997
Article ID: Q102943
7.00 1.00 1.50 WINDOWS kbprg kbdocerr

The information in this article applies to:

  • Microsoft C/C++ for Windows, version 7.0
  • Microsoft Visual C++ for Windows, versions 1.0 and 1.5

The online help for Microsoft C/C++ version 7.0 and for Visual C++ versions 1.0 and 1.5 all say the following about KeyboardProc():

  • The KeyboardProc function is a library-defined callback function that the system calls whenever the application calls the GetMessage or PeekMessage function and there is a WM_KEYUP or WM_KEYDOWN keyboard message to process.

Under Windows version 3.1 [using the SetWindowsHookEx() function instead of SetWindowsHook()], it is not necessary for the KeyboardProc() function to be placed in a dynamic-linked library (DLL) if it is being used as a task-specific hook.

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q83233
   TITLE     : Sample Code Uses Keyboard Hook to Access Help


Additional reference words: Visual 3.10 1.00 1.50 7.00
KBCategory: kbprg kbdocerr
KBSubcategory: VCGenIss
Keywords : kb16bitonly


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: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.