home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / msysjour / vol07 / 08 / sendkey / sendkeys.h < prev    next >
C/C++ Source or Header  |  1992-12-01  |  1KB  |  36 lines

  1. /****************************************************************************
  2. Module name  : SendKeys.H
  3. Description  : Include File for SendKeys utility functions.
  4. *****************************************************************************/
  5.  
  6. #ifndef _INC_SENDKEYS
  7. #define _INC_SENDKEYS        /* #defined if SendKeys.h has been included */
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {            /* Assume C declarations for C++ */
  11. #endif    /* __cplusplus */
  12.  
  13. #define ARRAY_LEN(Array)            (sizeof(Array) / sizeof(Array[0]))
  14. #define INRANGE(low, val, high) ((low <= val) && (val <= high))
  15. #define TOUPPER(Char)        ((BYTE) (DWORD) AnsiUpper((LPSTR) MAKEINTRESOURCE(Char)))
  16.  
  17.  
  18.  
  19. // ************************ Function Prototypes ******************************
  20. typedef enum {
  21.     SK_NOERROR, SK_MISSINGCLOSEBRACE, SK_INVALIDKEY,
  22.     SK_MISSINGCLOSEPAREN, SK_INVALIDCOUNT, SK_STRINGTOOLONG,
  23.     SK_CANTINSTALLHOOK
  24. } SENDKEYSERR;
  25.  
  26. SENDKEYSERR WINAPI SendKeys (LPCSTR szKeys);
  27. SENDKEYSERR WINAPI VMSendKeys (LPCSTR szKeys);
  28. void WINAPI PostVirtualKeyEvent (BYTE bVirtKey, BOOL fUp);
  29.  
  30. #ifdef __cplusplus
  31. }                       /* End of extern "C" { */
  32. #endif    /* __cplusplus */
  33. #endif  /* _INC_SENDKEYS */
  34.  
  35.  
  36.