VXDCALL.H
上传用户:lx1888888
上传日期:2007-01-04
资源大小:136k
文件大小:1k
源码类别:

驱动编程

开发平台:

Visual C++

  1. /* vxdcall.h
  2.  * Copyright (c) 1996 Vireo Software, Inc.
  3.  * Vireo Software offers VtoolsD, the professional toolkit
  4.  *                for VxD development in C and C++.
  5.  * Vireo Software
  6.  *      21 Half Moon Hill
  7.  *      Acton, MA  01720
  8.  *      voice: (508) 264-9200
  9.  *      fax:   (508) 264-9205
  10.  *      http:  //world.std.com/~vireo
  11.  *      email: Vireo@vireo.com
  12.  *
  13.  *  This code may be freely used and distributed, as long as
  14.  *  this copyright and permission notice is not removed or modified.
  15.  */
  16. /*  
  17.  *  Please note that the argument to VxDCall or VxDJmp must be specified
  18.  *  with leading underscores as defined in the service table.
  19.  *
  20.  *  You may refer to the appropriate header file, or to VTOOLSD/INCLUDE/VXDSVC.H
  21.  *  to determine whether a leading underscore is required.  If the symbol
  22.  *  LOCK_service_name is defined, no leading underscore is required.  If
  23.  *  the symbol LOCK__service_name is defined, a leading underscore IS needed.
  24.  *  For example:
  25.  *
  26.  *      BOOL __stdcall LOCK_Test_Debug_Installed (void) ;
  27.  *      MEMHANDLE __cdecl LOCK__GetNulPageHandle (void) ;
  28.  *
  29.  *  Correct usage:
  30.  *      VxDCall(Test_Debug_Installed);
  31.  *      VxDCall(_GetNulPageHandle);
  32.  *
  33.  */
  34. // The following is applied if using MSVC 4.1 (4.0 = 1000, 4.1 = 1010)
  35. #if _MSC_VER == 1010
  36. #undef VxDCall
  37. #undef VxDJmp
  38. extern VOID __stdcall __vxdcallorjmp__(DWORD svcid);
  39. #define VxDCall(n) __vxdcallorjmp__(__##n);
  40. #define VxDJmp(n) __vxdcallorjmp__(__##n + 0x8000);
  41. #endif