Source code of Windows XP (NT5)
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.

122 lines
3.3 KiB

  1. /*****************************************************************/
  2. /** Microsoft Windows for Workgroups **/
  3. /** Copyright (C) Microsoft Corp., 1991-1992 **/
  4. /*****************************************************************/
  5. /* NPHOOK.H -- Internal header for hooking calls into network providers.
  6. *
  7. *
  8. * History:
  9. * 05/17/94 lens Created.
  10. *
  11. */
  12. #include <npdefs.h>
  13. #include <netspi.h>
  14. #ifdef __cplusplus
  15. extern "C" { /* Assume C declarations for C++ */
  16. #endif /* __cplusplus */
  17. #define ORD_NPSHookMPR 222
  18. #define ORD_NPSUnHookMPR 223
  19. #define ORD_NPSUnHookMe 224
  20. #define ORD_NPSGetHandleFromInstance 225
  21. #define NPSHookMPR NPSHookMPRA
  22. #define NPSUnHookMPR NPSUnHookMPRA
  23. #define NPSUnHookMe NPSUnHookMeA
  24. #define NPSGetHandleFromInstance NPSGetHandleFromInstanceA
  25. typedef HMODULE F_LoadLibrary(
  26. LPCTSTR lpszLibFile
  27. );
  28. typedef F_LoadLibrary *PF_LoadLibrary;
  29. typedef BOOL F_FreeLibrary(
  30. HMODULE hLibModule
  31. );
  32. typedef F_FreeLibrary *PF_FreeLibrary;
  33. typedef FARPROC F_GetProcAddress(
  34. HMODULE hModule,
  35. LPCSTR lpszProc
  36. );
  37. typedef F_GetProcAddress *PF_GetProcAddress;
  38. typedef HANDLE16 F_LoadLibrary16(
  39. LPCTSTR lpszLibFile
  40. );
  41. typedef F_LoadLibrary16 *PF_LoadLibrary16;
  42. typedef VOID F_FreeLibrary16(
  43. HANDLE16 hLibModule
  44. );
  45. typedef F_FreeLibrary16 *PF_FreeLibrary16;
  46. typedef DWORD WINAPI F_GetProcAddressByName16(
  47. LPCSTR lpszProc,
  48. HANDLE16 hModule
  49. );
  50. typedef F_GetProcAddressByName16 *PF_GetProcAddressByName16;
  51. typedef DWORD WINAPI F_GetProcAddressByOrdinal16(
  52. WORD wOrdinal,
  53. HANDLE16 hModule
  54. );
  55. typedef F_GetProcAddressByOrdinal16 *PF_GetProcAddressByOrdinal16;
  56. typedef DWORD NPSERVICE F_NPSHookMPR(
  57. struct _MPRCALLS *pMPRCalls
  58. );
  59. typedef F_NPSHookMPR *PF_NPSHookMPR;
  60. F_NPSHookMPR NPSHookMPR;
  61. typedef DWORD NPSERVICE F_UnHookMPR(
  62. PF_NPSHookMPR pfNPSHookMPR,
  63. struct _MPRCALLS *pMPRCalls
  64. );
  65. typedef F_UnHookMPR *PF_UnHookMPR;
  66. typedef DWORD NPSERVICE F_NPSUnHookMPR(
  67. PF_NPSHookMPR pfReqNPSHookMPR,
  68. struct _MPRCALLS *pReqMPRCalls,
  69. struct _MPRCALLS *pChainedMPRCalls
  70. );
  71. typedef F_NPSUnHookMPR *PF_NPSUnHookMPR;
  72. F_NPSUnHookMPR NPSUnHookMPR;
  73. typedef DWORD NPSERVICE F_NPSUnHookMe(
  74. PF_NPSHookMPR pfMyNPSHookMPR,
  75. struct _MPRCALLS *pChainedMPRCalls
  76. );
  77. typedef F_NPSUnHookMe *PF_NPSUnHookMe;
  78. F_NPSUnHookMe NPSUnHookMe;
  79. typedef struct _MPRCALLS {
  80. PF_NPSHookMPR pfNPSHookMPR; /* NPSHookMPR call */
  81. PF_UnHookMPR pfUnHookMPR; /* UnHookMPR call */
  82. PF_LoadLibrary pfLoadLibrary; /* LoadLibrary call */
  83. PF_FreeLibrary pfFreeLibrary; /* FreeLibrary call */
  84. PF_GetProcAddress pfGetProcAddress; /* GetProcAddress call */
  85. PF_LoadLibrary16 pfLoadLibrary16; /* LoadLibrary call */
  86. PF_FreeLibrary16 pfFreeLibrary16; /* FreeLibrary call */
  87. PF_GetProcAddressByName16 pfGetProcAddressByName16; /* GetProcAddress call */
  88. PF_GetProcAddressByOrdinal16 pfGetProcAddressByOrdinal16; /* GetProcAddress call */
  89. } MPRCALLS, *PMPRCALLS;
  90. typedef HPROVIDER NPSERVICE F_NPSGetHandleFromInstance(
  91. BOOL bWinnet16,
  92. LPVOID phInstance
  93. );
  94. typedef F_NPSGetHandleFromInstance *PF_NPSGetHandleFromInstance;
  95. F_NPSGetHandleFromInstance NPSGetHandleFromInstance;
  96. #ifdef __cplusplus
  97. }
  98. #endif /* __cplusplus */