Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.6 KiB

  1. /******************************************************************************
  2. Copyright (c) 1985-1998 Microsoft Corporation
  3. Title: drvr.h - Installable driver code internal header file.
  4. Version: 1.00
  5. Date: 10-Jun-1990
  6. Author: DAVIDDS ROBWI
  7. ------------------------------------------------------------------------------
  8. Change log:
  9. DATE REV DESCRIPTION
  10. ----------- ----- -----------------------------------------------------------
  11. 10-JUN-1990 ROBWI Based on windows 3.1 installable driver code by davidds
  12. 28-FEB-1992 ROBINSP Port to NT
  13. *****************************************************************************/
  14. typedef LRESULT (*DRIVERPROC)
  15. (DWORD_PTR dwDriverID, HDRVR hDriver, UINT wMessage, LPARAM lParam1, LPARAM lParam2);
  16. #define DRIVER_PROC_NAME "DriverProc"
  17. #if 0
  18. extern BOOL fUseWinAPI;
  19. #else
  20. #define fUseWinAPI FALSE
  21. #endif
  22. typedef struct tagDRIVERTABLE
  23. {
  24. UINT fFirstEntry:1;
  25. UINT fBusy:1;
  26. DWORD_PTR dwDriverIdentifier;
  27. DWORD_PTR hModule;
  28. DRIVERPROC lpDriverEntryPoint;
  29. } DRIVERTABLE;
  30. typedef DRIVERTABLE FAR *LPDRIVERTABLE;
  31. LRESULT FAR PASCAL InternalBroadcastDriverMessage(UINT, UINT, LPARAM, LPARAM, UINT);
  32. LRESULT FAR PASCAL InternalCloseDriver(UINT, LPARAM, LPARAM, BOOL);
  33. LRESULT FAR PASCAL InternalOpenDriver(LPCWSTR, LPCWSTR, LPARAM, BOOL);
  34. LRESULT FAR PASCAL InternalLoadDriver(LPCWSTR, LPCWSTR, LPWSTR, UINT, BOOL);
  35. UINT FAR PASCAL InternalFreeDriver(UINT, BOOL);
  36. void FAR PASCAL InternalInstallDriverChain (void);
  37. void FAR PASCAL InternalDriverDisable (void);
  38. void FAR PASCAL InternalDriverEnable (void);
  39. int FAR PASCAL GetDrvrUsage(HANDLE);
  40. HANDLE FAR PASCAL LoadAliasedLibrary (LPCWSTR, LPCWSTR, LPWSTR, LPWSTR, UINT);
  41. /* Defines for internalbroadcastdrivermessage flags */
  42. #define IBDM_SENDMESSAGE 0x0001
  43. #define IBDM_REVERSE 0x0002
  44. #define IBDM_ONEINSTANCEONLY 0x0004
  45. /* Multi-thread protection for OpenDriver etc */
  46. #define DrvEnter() EnterCriticalSection(&DriverListCritSec)
  47. #define DrvLeave() LeaveCriticalSection(&DriverListCritSec)
  48. /*
  49. * DriverListCritSec keeps our handling of the driver list and count
  50. * protected
  51. *
  52. * DriverLoadFreeCritSec keeps our loads and frees from overlapping
  53. */
  54. extern CRITICAL_SECTION DriverListCritSec;
  55. extern CRITICAL_SECTION DriverLoadFreeCritSec;
  56. #define REGSTR_PATH_WAVEMAPPER TEXT("Software\\Microsoft\\Windows NT\\CurrentVersion\\Wave Mapper")
  57. #define REGSTR_VALUE_MAPPABLE TEXT("Mappable")