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.

123 lines
3.8 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. faxext.h
  5. Abstract:
  6. Declarations of fax extension configuration and notification functions.
  7. --*/
  8. #ifndef _FAX_EXT_H_
  9. #define _FAX_EXT_H_
  10. #if _MSC_VER > 1000
  11. #pragma once
  12. #endif
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /************************************
  17. * *
  18. * Extension configuration data *
  19. * *
  20. ************************************/
  21. typedef enum
  22. {
  23. DEV_ID_SRC_FAX, // Device id is generated by the fax server of EFSP
  24. DEV_ID_SRC_TAPI // Device id is generated by a TAPI TSP (of FSP).
  25. } FAX_ENUM_DEVICE_ID_SOURCE;
  26. //
  27. // Prototype of FaxExtGetData
  28. //
  29. DWORD
  30. FaxExtGetData (
  31. DWORD dwDeviceId, // Device id (0 = No device)
  32. FAX_ENUM_DEVICE_ID_SOURCE DevIdSrc, // The source of the device id
  33. LPCWSTR lpcwstrDataGUID,// GUID of data
  34. LPBYTE *ppData, // (Out) Pointer to allocated data
  35. LPDWORD lpdwDataSize // (Out) Pointer to data size
  36. );
  37. typedef DWORD (CALLBACK *PFAX_EXT_GET_DATA) (DWORD, FAX_ENUM_DEVICE_ID_SOURCE, LPCWSTR, LPBYTE *, LPDWORD);
  38. //
  39. // Prototype of FaxExtSetData
  40. //
  41. DWORD
  42. FaxExtSetData (
  43. HINSTANCE hInst, // Instance of calling extension
  44. DWORD dwDeviceId, // Device id (0 = No device)
  45. FAX_ENUM_DEVICE_ID_SOURCE DevIdSrc, // The source of the device id
  46. LPCWSTR lpcwstrDataGUID,// GUID of data
  47. LPBYTE pData, // Pointer to data
  48. DWORD dwDataSize // Data size
  49. );
  50. typedef DWORD (CALLBACK *PFAX_EXT_SET_DATA) (HINSTANCE, DWORD, FAX_ENUM_DEVICE_ID_SOURCE, LPCWSTR, LPBYTE, DWORD);
  51. HRESULT
  52. FaxExtConfigChange (
  53. DWORD dwDeviceId, // The device for which configuration has changed
  54. LPCWSTR lpcwstrDataGUID, // Configuration name
  55. LPBYTE lpData, // New configuration data
  56. DWORD dwDataSize // Size of new configuration data
  57. );
  58. typedef HRESULT (WINAPI *PFAX_EXT_CONFIG_CHANGE) (DWORD, LPCWSTR, LPBYTE, DWORD);
  59. //
  60. // Prototype of FaxExtRegisterForEvents
  61. //
  62. HANDLE
  63. FaxExtRegisterForEvents (
  64. HINSTANCE hInst, // Instance of calling extension
  65. DWORD dwDeviceId, // Device id (0 = No device)
  66. FAX_ENUM_DEVICE_ID_SOURCE DevIdSrc, // The source of the device id
  67. LPCWSTR lpcwstrDataGUID,// GUID of data
  68. PFAX_EXT_CONFIG_CHANGE lpConfigChangeCallback
  69. );
  70. typedef HANDLE (CALLBACK *PFAX_EXT_REGISTER_FOR_EVENTS) (HINSTANCE, DWORD, FAX_ENUM_DEVICE_ID_SOURCE, LPCWSTR, PFAX_EXT_CONFIG_CHANGE);
  71. //
  72. // Prototype of FaxExtUnregisterForEvents
  73. //
  74. DWORD
  75. FaxExtUnregisterForEvents (
  76. HANDLE hNotification
  77. );
  78. typedef DWORD (CALLBACK *PFAX_EXT_UNREGISTER_FOR_EVENTS) (HANDLE);
  79. //
  80. // Prototype of FaxExtFreeBuffer
  81. //
  82. VOID
  83. FaxExtFreeBuffer (
  84. LPVOID lpvBuffer
  85. );
  86. typedef VOID (CALLBACK *PFAX_EXT_FREE_BUFFER) (LPVOID);
  87. //
  88. // The extension should implement and export the following function:
  89. //
  90. HRESULT
  91. FaxExtInitializeConfig (
  92. PFAX_EXT_GET_DATA, // Pointer to FaxExtGetExtensionData in service
  93. PFAX_EXT_SET_DATA, // Pointer to FaxExtSetExtensionData in service
  94. PFAX_EXT_REGISTER_FOR_EVENTS, // Pointer to FaxExtRegisterForExtensionEvents in service
  95. PFAX_EXT_UNREGISTER_FOR_EVENTS, // Pointer to FaxExtUnregisterForExtensionEvents in service
  96. PFAX_EXT_FREE_BUFFER // Pointer to FaxExtFreeBuffer in service
  97. );
  98. typedef HRESULT (WINAPI *PFAX_EXT_INITIALIZE_CONFIG) (PFAX_EXT_GET_DATA, PFAX_EXT_SET_DATA, PFAX_EXT_REGISTER_FOR_EVENTS, PFAX_EXT_UNREGISTER_FOR_EVENTS, PFAX_EXT_FREE_BUFFER);
  99. #ifdef __cplusplus
  100. }
  101. #endif
  102. #endif // _FAX_EXT_H_