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.

127 lines
4.2 KiB

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