📄 winfax.h
字号:
/*++
Copyright (c) 1996-1998 Microsoft Corporation
Module Name:
winfax.h
Abstract:
This module contains the WIN32 FAX APIs.
--*/
#ifndef _FAXAPI_
#pragma option push -b -a8 -pc -A- /*P_O_Push*/
#define _FAXAPI_
#ifndef MIDL_PASS
#include <tapi.h>
#endif
#if !defined(_WINFAX_)
#define WINFAXAPI DECLSPEC_IMPORT
#else
#define WINFAXAPI
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define FAXLOG_LEVEL_NONE 0
#define FAXLOG_LEVEL_MIN 1
#define FAXLOG_LEVEL_MED 2
#define FAXLOG_LEVEL_MAX 3
#define FAXLOG_CATEGORY_INIT 1
#define FAXLOG_CATEGORY_OUTBOUND 2
#define FAXLOG_CATEGORY_INBOUND 3
#define FAXLOG_CATEGORY_UNKNOWN 4
typedef struct _FAX_LOG_CATEGORYA {
LPCSTR Name; // logging category name
DWORD Category; // logging category number
DWORD Level; // logging level for the category
} FAX_LOG_CATEGORYA, *PFAX_LOG_CATEGORYA;
typedef struct _FAX_LOG_CATEGORYW {
LPCWSTR Name; // logging category name
DWORD Category; // logging category number
DWORD Level; // logging level for the category
} FAX_LOG_CATEGORYW, *PFAX_LOG_CATEGORYW;
#ifdef UNICODE
typedef FAX_LOG_CATEGORYW FAX_LOG_CATEGORY;
typedef PFAX_LOG_CATEGORYW PFAX_LOG_CATEGORY;
#else
typedef FAX_LOG_CATEGORYA FAX_LOG_CATEGORY;
typedef PFAX_LOG_CATEGORYA PFAX_LOG_CATEGORY;
#endif // UNICODE
typedef struct _FAX_TIME {
WORD Hour;
WORD Minute;
} FAX_TIME, *PFAX_TIME;
typedef struct _FAX_CONFIGURATIONA {
DWORD SizeOfStruct; // size of this structure
DWORD Retries; // number of retries for fax send
DWORD RetryDelay; // number of minutes between retries
DWORD DirtyDays; // number of days to keep an unsent job in the queue
BOOL Branding; // fsp should brand outgoing faxes
BOOL UseDeviceTsid; // server uses device tsid only
BOOL ServerCp; // clients must use cover pages on the server
BOOL PauseServerQueue; // is the server queue paused?
FAX_TIME StartCheapTime; // start of discount rate period
FAX_TIME StopCheapTime; // end of discount rate period
BOOL ArchiveOutgoingFaxes; // whether outgoing faxes should be archived
LPCSTR ArchiveDirectory; // archive directory for outgoing faxes
LPCSTR InboundProfile; // profile used for inbound routing (email)
} FAX_CONFIGURATIONA, *PFAX_CONFIGURATIONA;
typedef struct _FAX_CONFIGURATIONW {
DWORD SizeOfStruct; // size of this structure
DWORD Retries; // number of retries for fax send
DWORD RetryDelay; // number of minutes between retries
DWORD DirtyDays; // number of days to keep an unsent job in the queue
BOOL Branding; // fsp should brand outgoing faxes
BOOL UseDeviceTsid; // server uses device tsid only
BOOL ServerCp; // clients must use cover pages on the server
BOOL PauseServerQueue; // is the server queue paused?
FAX_TIME StartCheapTime; // start of discount rate period
FAX_TIME StopCheapTime; // end of discount rate period
BOOL ArchiveOutgoingFaxes; // whether outgoing faxes should be archived
LPCWSTR ArchiveDirectory; // archive directory for outgoing faxes
LPCWSTR InboundProfile; // profile used for inbound routing (email)
} FAX_CONFIGURATIONW, *PFAX_CONFIGURATIONW;
#ifdef UNICODE
typedef FAX_CONFIGURATIONW FAX_CONFIGURATION;
typedef PFAX_CONFIGURATIONW PFAX_CONFIGURATION;
#else
typedef FAX_CONFIGURATIONA FAX_CONFIGURATION;
typedef PFAX_CONFIGURATIONA PFAX_CONFIGURATION;
#endif // UNICODE
//
// FaxSetJob() command codes
//
#define JC_UNKNOWN 0
#define JC_DELETE 1
#define JC_PAUSE 2
#define JC_RESUME 3
#define JC_RESTART JC_RESUME
//
// job type defines
//
#define JT_UNKNOWN 0
#define JT_SEND 1
#define JT_RECEIVE 2
#define JT_ROUTING 3
#define JT_FAIL_RECEIVE 4
//
// job status defines
//
#define JS_PENDING 0x00000000
#define JS_INPROGRESS 0x00000001
#define JS_DELETING 0x00000002
#define JS_FAILED 0x00000004
#define JS_PAUSED 0x00000008
#define JS_NOLINE 0x00000010
#define JS_RETRYING 0x00000020
#define JS_RETRIES_EXCEEDED 0x00000040
typedef struct _FAX_DEVICE_STATUSA {
DWORD SizeOfStruct; // size of this structure
LPCSTR CallerId; // caller id string
LPCSTR Csid; // station identifier
DWORD CurrentPage; // current page
DWORD DeviceId; // permanent line id
LPCSTR DeviceName; // device name
LPCSTR DocumentName; // document name
DWORD JobType; // send or receive?
LPCSTR PhoneNumber; // sending phone number
LPCSTR RoutingString; // routing information
LPCSTR SenderName; // sender name
LPCSTR RecipientName; // recipient name
DWORD Size; // size in bytes of the document
FILETIME StartTime; // starting time of the fax send/receive
DWORD Status; // current status of the device, see FPS_??? masks
LPCSTR StatusString; // status string if the Status field is zero. this may be NULL.
FILETIME SubmittedTime; // time the document was submitted
DWORD TotalPages; // total number of pages in this job
LPCSTR Tsid; // transmitting station identifier
LPCSTR UserName; // user that submitted the active job
} FAX_DEVICE_STATUSA, *PFAX_DEVICE_STATUSA;
typedef struct _FAX_DEVICE_STATUSW {
DWORD SizeOfStruct; // size of this structure
LPCWSTR CallerId; // caller id string
LPCWSTR Csid; // station identifier
DWORD CurrentPage; // current page
DWORD DeviceId; // permanent line id
LPCWSTR DeviceName; // device name
LPCWSTR DocumentName; // document name
DWORD JobType; // send or receive?
LPCWSTR PhoneNumber; // sending phone number
LPCWSTR RoutingString; // routing information
LPCWSTR SenderName; // sender name
LPCWSTR RecipientName; // recipient name
DWORD Size; // size in bytes of the document
FILETIME StartTime; // starting time of the fax send/receive
DWORD Status; // current status of the device, see FPS_??? masks
LPCWSTR StatusString; // status string if the Status field is zero. this may be NULL.
FILETIME SubmittedTime; // time the document was submitted
DWORD TotalPages; // total number of pages in this job
LPCWSTR Tsid; // transmitting station identifier
LPCWSTR UserName; // user that submitted the active job
} FAX_DEVICE_STATUSW, *PFAX_DEVICE_STATUSW;
#ifdef UNICODE
typedef FAX_DEVICE_STATUSW FAX_DEVICE_STATUS;
typedef PFAX_DEVICE_STATUSW PFAX_DEVICE_STATUS;
#else
typedef FAX_DEVICE_STATUSA FAX_DEVICE_STATUS;
typedef PFAX_DEVICE_STATUSA PFAX_DEVICE_STATUS;
#endif // UNICODE
typedef struct _FAX_JOB_ENTRYA {
DWORD SizeOfStruct; // size of this structure
DWORD JobId; // fax job id
LPCSTR UserName; // user who submitted the job
DWORD JobType; // job type, see JT defines
DWORD QueueStatus; // job queue status, see JS defines
DWORD Status; // current status of the device, see FPS_??? masks
DWORD Size; // size in bytes of the document
DWORD PageCount; // total page count
LPCSTR RecipientNumber; // recipient fax number
LPCSTR RecipientName; // recipient name
LPCSTR Tsid; // transmitter's id
LPCSTR SenderName; // sender name
LPCSTR SenderCompany; // sender company
LPCSTR SenderDept; // sender department
LPCSTR BillingCode; // billing code
DWORD ScheduleAction; // when to schedule the fax, see JSA defines
SYSTEMTIME ScheduleTime; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
DWORD DeliveryReportType; // delivery report type, see DRT defines
LPCSTR DeliveryReportAddress; // email address for delivery report (ndr or dr)
LPCSTR DocumentName; // document name
} FAX_JOB_ENTRYA, *PFAX_JOB_ENTRYA;
typedef struct _FAX_JOB_ENTRYW {
DWORD SizeOfStruct; // size of this structure
DWORD JobId; // fax job id
LPCWSTR UserName; // user who submitted the job
DWORD JobType; // job type, see JT defines
DWORD QueueStatus; // job queue status, see JS defines
DWORD Status; // current status of the device, see FPS_??? masks
DWORD Size; // size in bytes of the document
DWORD PageCount; // total page count
LPCWSTR RecipientNumber; // recipient fax number
LPCWSTR RecipientName; // recipient name
LPCWSTR Tsid; // transmitter's id
LPCWSTR SenderName; // sender name
LPCWSTR SenderCompany; // sender company
LPCWSTR SenderDept; // sender department
LPCWSTR BillingCode; // billing code
DWORD ScheduleAction; // when to schedule the fax, see JSA defines
SYSTEMTIME ScheduleTime; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
DWORD DeliveryReportType; // delivery report type, see DRT defines
LPCWSTR DeliveryReportAddress; // email address for delivery report (ndr or dr)
LPCWSTR DocumentName; // document name
} FAX_JOB_ENTRYW, *PFAX_JOB_ENTRYW;
#ifdef UNICODE
typedef FAX_JOB_ENTRYW FAX_JOB_ENTRY;
typedef PFAX_JOB_ENTRYW PFAX_JOB_ENTRY;
#else
typedef FAX_JOB_ENTRYA FAX_JOB_ENTRY;
typedef PFAX_JOB_ENTRYA PFAX_JOB_ENTRY;
#endif // UNICODE
//
// fax port state masks
//
// if you change these defines the be sure to
// change the resources in the fax service.
//
#define FPS_DIALING 0x20000001
#define FPS_SENDING 0x20000002
#define FPS_RECEIVING 0x20000004
#define FPS_COMPLETED 0x20000008
#define FPS_HANDLED 0x20000010
#define FPS_UNAVAILABLE 0x20000020
#define FPS_BUSY 0x20000040
#define FPS_NO_ANSWER 0x20000080
#define FPS_BAD_ADDRESS 0x20000100
#define FPS_NO_DIAL_TONE 0x20000200
#define FPS_DISCONNECTED 0x20000400
#define FPS_FATAL_ERROR 0x20000800
#define FPS_NOT_FAX_CALL 0x20001000
#define FPS_CALL_DELAYED 0x20002000
#define FPS_CALL_BLACKLISTED 0x20004000
#define FPS_INITIALIZING 0x20008000
#define FPS_OFFLINE 0x20010000
#define FPS_RINGING 0x20020000
#define FPS_AVAILABLE 0x20100000
#define FPS_ABORTING 0x20200000
#define FPS_ROUTING 0x20400000
#define FPS_ANSWERED 0x20800000
//
// fax port capability mask
//
#define FPF_RECEIVE 0x00000001
#define FPF_SEND 0x00000002
#define FPF_VIRTUAL 0x00000004
typedef struct _FAX_PORT_INFOA {
DWORD SizeOfStruct; // size of this structure
DWORD DeviceId; //
DWORD State; //
DWORD Flags; //
DWORD Rings; //
DWORD Priority; //
LPCSTR DeviceName; //
LPCSTR Tsid; //
LPCSTR Csid; //
} FAX_PORT_INFOA, *PFAX_PORT_INFOA;
typedef struct _FAX_PORT_INFOW {
DWORD SizeOfStruct; // size of this structure
DWORD DeviceId; //
DWORD State; //
DWORD Flags; //
DWORD Rings; //
DWORD Priority; //
LPCWSTR DeviceName; //
LPCWSTR Tsid; //
LPCWSTR Csid; //
} FAX_PORT_INFOW, *PFAX_PORT_INFOW;
#ifdef UNICODE
typedef FAX_PORT_INFOW FAX_PORT_INFO;
typedef PFAX_PORT_INFOW PFAX_PORT_INFO;
#else
typedef FAX_PORT_INFOA FAX_PORT_INFO;
typedef PFAX_PORT_INFOA PFAX_PORT_INFO;
#endif // UNICODE
typedef struct _FAX_ROUTING_METHODA {
DWORD SizeOfStruct; // size of this structure
DWORD DeviceId; // device identifier
BOOL Enabled; // is this method enabled for this device?
LPCSTR DeviceName; // device name
LPCSTR Guid; // guid that identifies this routing method
LPCSTR FriendlyName; // friendly name for this method
LPCSTR FunctionName; // exported function name that identifies this method
LPCSTR ExtensionImageName; // module (dll) name that implements this method
LPCSTR ExtensionFriendlyName; // displayable string that identifies the extension
} FAX_ROUTING_METHODA, *PFAX_ROUTING_METHODA;
typedef struct _FAX_ROUTING_METHODW {
DWORD SizeOfStruct; // size of this structure
DWORD DeviceId; // device identifier
BOOL Enabled; // is this method enabled for this device?
LPCWSTR DeviceName; // device name
LPCWSTR Guid; // guid that identifies this routing method
LPCWSTR FriendlyName; // friendly name for this method
LPCWSTR FunctionName; // exported function name that identifies this method
LPCWSTR ExtensionImageName; // module (dll) name that implements this method
LPCWSTR ExtensionFriendlyName; // displayable string that identifies the extension
} FAX_ROUTING_METHODW, *PFAX_ROUTING_METHODW;
#ifdef UNICODE
typedef FAX_ROUTING_METHODW FAX_ROUTING_METHOD;
typedef PFAX_ROUTING_METHODW PFAX_ROUTING_METHOD;
#else
typedef FAX_ROUTING_METHODA FAX_ROUTING_METHOD;
typedef PFAX_ROUTING_METHODA PFAX_ROUTING_METHOD;
#endif // UNICODE
typedef struct _FAX_GLOBAL_ROUTING_INFOA {
DWORD SizeOfStruct; // size of this structure
DWORD Priority; // priority of this device
LPCSTR Guid; // guid that identifies this routing method
LPCSTR FriendlyName; // friendly name for this method
LPCSTR FunctionName; // exported function name that identifies this method
LPCSTR ExtensionImageName; // module (dll) name that implements this method
LPCSTR ExtensionFriendlyName; // displayable string that identifies the extension
} FAX_GLOBAL_ROUTING_INFOA, *PFAX_GLOBAL_ROUTING_INFOA;
typedef struct _FAX_GLOBAL_ROUTING_INFOW {
DWORD SizeOfStruct; // size of this structure
DWORD Priority; // priority of this device
LPCWSTR Guid; // guid that identifies this routing method
LPCWSTR FriendlyName; // friendly name for this method
LPCWSTR FunctionName; // exported function name that identifies this method
LPCWSTR ExtensionImageName; // module (dll) name that implements this method
LPCWSTR ExtensionFriendlyName; // displayable string that identifies the extension
} FAX_GLOBAL_ROUTING_INFOW, *PFAX_GLOBAL_ROUTING_INFOW;
#ifdef UNICODE
typedef FAX_GLOBAL_ROUTING_INFOW FAX_GLOBAL_ROUTING_INFO;
typedef PFAX_GLOBAL_ROUTING_INFOW PFAX_GLOBAL_ROUTING_INFO;
#else
typedef FAX_GLOBAL_ROUTING_INFOA FAX_GLOBAL_ROUTING_INFO;
typedef PFAX_GLOBAL_ROUTING_INFOA PFAX_GLOBAL_ROUTING_INFO;
#endif // UNICODE
typedef struct _FAX_COVERPAGE_INFOA {
DWORD SizeOfStruct; // Size of this structure
//
// general
//
LPCSTR CoverPageName; // coverpage document name
BOOL UseServerCoverPage; // coverpage exists on the fax server
//
// Recipient information
//
LPCSTR RecName; //
LPCSTR RecFaxNumber; //
LPCSTR RecCompany; //
LPCSTR RecStreetAddress; //
LPCSTR RecCity; //
LPCSTR RecState; //
LPCSTR RecZip; //
LPCSTR RecCountry; //
LPCSTR RecTitle; //
LPCSTR RecDepartment; //
LPCSTR RecOfficeLocation; //
LPCSTR RecHomePhone; //
LPCSTR RecOfficePhone; //
//
// Sender information
//
LPCSTR SdrName; //
LPCSTR SdrFaxNumber; //
LPCSTR SdrCompany; //
LPCSTR SdrAddress; //
LPCSTR SdrTitle; //
LPCSTR SdrDepartment; //
LPCSTR SdrOfficeLocation; //
LPCSTR SdrHomePhone; //
LPCSTR SdrOfficePhone; //
//
// Misc information
//
LPCSTR Note; //
LPCSTR Subject; //
SYSTEMTIME TimeSent; // Time the fax was sent
DWORD PageCount; // Number of pages
} FAX_COVERPAGE_INFOA, *PFAX_COVERPAGE_INFOA;
typedef struct _FAX_COVERPAGE_INFOW {
DWORD SizeOfStruct; // Size of this structure
//
// general
//
LPCWSTR CoverPageName; // coverpage document name
BOOL UseServerCoverPage; // coverpage exists on the fax server
//
// Recipient information
//
LPCWSTR RecName; //
LPCWSTR RecFaxNumber; //
LPCWSTR RecCompany; //
LPCWSTR RecStreetAddress; //
LPCWSTR RecCity; //
LPCWSTR RecState; //
LPCWSTR RecZip; //
LPCWSTR RecCountry; //
LPCWSTR RecTitle; //
LPCWSTR RecDepartment; //
LPCWSTR RecOfficeLocation; //
LPCWSTR RecHomePhone; //
LPCWSTR RecOfficePhone; //
//
// Sender information
//
LPCWSTR SdrName; //
LPCWSTR SdrFaxNumber; //
LPCWSTR SdrCompany; //
LPCWSTR SdrAddress; //
LPCWSTR SdrTitle; //
LPCWSTR SdrDepartment; //
LPCWSTR SdrOfficeLocation; //
LPCWSTR SdrHomePhone; //
LPCWSTR SdrOfficePhone; //
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -