?? smarfaxh.h
字號:
/**********************************************************************************
函數(shù)名:<_TapiSmartSendFax>
----------------------------
功能: 通過TAPI接口發(fā)送傳真!
----------------------------
參數(shù):
1: hFax 傳真對象句柄
2: hCall 傳真參數(shù)
3: hline 傳真參數(shù)
4: FileName 傳真文件名
5: Identifi 傳真識別符(一般添入自己的傳真號碼)
6: Volume Modem應(yīng)答音量( 0 | 1 | 2 | 3 )
7: Speed 傳真需要的速度( 24 | 48 | 72 | 96 | 120 |144)
8: Class 傳真類型(CLASS_1 | CLASS_2 | CLASS_1.0 | CLASS_2.0)
9: Is2d 壓縮方式(U2D_ENABLE | U2D_DISABLE)
10: ECM 糾錯方式(ECM_ENABLE | ECM_DISABLE )
11: CreateHead 建立傳真頁眉信息
12: Resolution 傳真質(zhì)量
13: From 發(fā)送者
14: To 接受者
15: hWnd 消息窗口句柄
16: Msg 消息ID (WM_SMARTFAX)
返回值:
0: End if function completes successfully
-1: Exception error
101: Failed to Open FAX file ~
102: Couldn't conneced within 35 secs of ATA command
103: Resevr
104: Failed to send CSI frames
105: Failed to send DIS frames
106: Failed to send NFS frames
107: Failed to send other negotiating frames
108: Failed to send CFR frames
109: Failed to training
110: Failed to send FTT frames
111: Failed to set training speed 3 times
112: Failed to send CRP frames
113: Failed to dropped carrier within 5 s
114: Failed to respond to +FRM properly
115: Failed to get modem data
116: Failed to accept page data
201: Couldn't be found transmit file
202: Transmit file isn't TIFF CLASS
203: Call isn't answered within 30 s
204: Machine can't receive fax data
205: Couldn't set +FTM
206: Couldn't set +FTM
210: NO DIALTONE
211: BUSY
212: NO ANSWER
213: NO CARRIER
************************************************************************************/
int _TapiSmartSendFax(SmartFaxObj *hFax ,HCALL &hCall,HLINE &hline,const char *Tel,const char *FileName,
const char *Identifi,EVolume Volume ,EFaxSpeed Speed,EClass Class,EUsed2D Is2d,
EErrorCorrect ECM,ECreateHead CreateHead,EResolution Resolution,
const char * From ,const char * Receiver,HWND hWnd,UINT Msg,int nStartPage);
/**********************************************************************************
函數(shù)名: <SmartReceiveFax>
----------------------------
功能: 直接通過端口接收傳真
----------------------------
參數(shù):
1: FaxParam 傳真參數(shù) (見SFaxParam定義)
************************************************************************************/
int SmartReceiveFax(SFaxParam *FaxParam);
/**********************************************************************************
函數(shù)名:<_SmartReceiveFax>
----------------------------
功能: 直接通過端口接收傳真
----------------------------
參數(shù):
1: hFax 傳真對象句柄
2: nPort 端口號
3: FileName 傳真文件名
4: Identifi 傳真識別符(一般添入自己的傳真號碼)
5: Volume Modem應(yīng)答音量( 0 | 1 | 2 | 3 )
6: Speed 傳真需要的速度( 24 | 48 | 72 | 96 | 120 |144)
7: Class 傳真類型(CLASS_1 | CLASS_2 | CLASS_1.0 | CLASS_2.0)
8: Is2d 壓縮方式(U2D_ENABLE | U2D_DISABLE)
9: ECM 糾錯方式(ECM_ENABLE | ECM_DISABLE )
10: hWnd 消息窗口句柄
11: Msg 消息ID (WM_SMARTFAX)
************************************************************************************/
int _SmartReceiveFax(SmartFaxObj *hFax ,unsigned char nPort ,const char *FaxFileName ,
const char *Identifi,EVolume Volume = VO_LOW, EFaxSpeed Speed =FS_1440,
EClass Class = CLASS_1 ,EUsed2D Is2d = U2D_ENABLE ,EErrorCorrect ECM = ECM_ENABLE,
HWND hWnd = NULL ,UINT Msg = NULL);
/**********************************************************************************
函數(shù)名:_SmartReceiveFax
功能:接收傳真文件
參數(shù):
1: nPort 端口號
2: FaxFileName 傳真文件名
3: Identifi 傳真識別符(一般添入自己的傳真號碼)
4: Speed 傳真需要的速度(default 96)
5: Fclass CLASS TYPE (defualt Class 1)
6: Twodee 壓縮方式(0 - 1D,1 - 2D defaul 1 )
7: ECM 糾錯方式(defaul 1)
8: hWnd 接受傳真消息的窗口句柄
9: Msg 傳真消息
返回值:
0: End if function completes successfully
-1: Exception error
101: Failed to Open FAX file ~
102: Couldn't conneced within 35 secs of ATA command
103: Resevr
104: Failed to send CSI frames
105: Failed to send DIS frames
106: Failed to send NFS frames
107: Failed to send other negotiating frames
108: Failed to send CFR frames
109: Failed to training
110: Failed to send FTT frames
111: Failed to set training speed 3 times
112: Failed to send CRP frames
113: Failed to dropped carrier within 5 s
114: Failed to respond to +FRM properly
115: Failed to get modem data
116: Failed to accept page data
201: Couldn't be found transmit file
202: Transmit file isn't TIFF CLASS
203: Call isn't answered within 30 s
204: Machine can't receive fax data
205: Couldn't set +FTM
206: Couldn't set +FTM
210: NO DIALTONE
211: BUSY
212: NO ANSWER
213: NO CARRIER
*******************************************************************************/
/**********************************************************************************
函數(shù)名: <SmartSendFax>
----------------------------
功能: 直接通過端口接收傳真
----------------------------
參數(shù):
1: FaxParam 傳真參數(shù) (見SFaxParam定義)
************************************************************************************/
int SmartSendFax(SFaxParam *FaxParam);
/**********************************************************************************
函數(shù)名:<_SmartSendFax>
----------------------------
功能: 直接通過端口發(fā)送傳真
----------------------------
參數(shù):
1: hFax 傳真對象句柄
2: nPort 端口號
3: FileName 傳真文件名
4: Identifi 傳真識別符(一般添入自己的傳真號碼)
5: Volume Modem應(yīng)答音量( 0 | 1 | 2 | 3 )
6: Speed 傳真需要的速度( 24 | 48 | 72 | 96 | 120 |144)
7: Class 傳真類型(CLASS_1 | CLASS_2 | CLASS_1.0 | CLASS_2.0)
8: Is2d 壓縮方式(U2D_ENABLE | U2D_DISABLE)
9: ECM 糾錯方式(ECM_ENABLE | ECM_DISABLE )
10: CreateHead 建立傳真頁眉信息
11: Resolution 傳真質(zhì)量
12: From 發(fā)送者
13: To 接受者
14: hWnd 消息窗口句柄
15: Msg 消息ID (WM_SMARTFAX)
************************************************************************************/
int _SmartSendFax(SmartFaxObj *hFax ,unsigned char nPort,const char *Tel,
const char *FaxFileName, const char *Identifi,EVolume Volume ,EFaxSpeed Speed,
EUsed2D Is2d,EErrorCorrect ECM,ECreateHead CreateHead,EResolution Resolution,
const char * From ,const char * Receiver,HWND hWnd,UINT Msg,int nStartPage);
/**********************************************************************************
函數(shù)名:SmartSendFax
功能:發(fā)送傳真文件
參數(shù):
1: nPort 端口號
2: Tel 接受端號碼
3: FaxFileName 傳真文件名
4: Identifi 傳真識別符(一般添入自己的傳真號碼)
5: Speed 傳真需要的速度(default 96)
6: Fclass CLASS TYPE (defualt Class 1)
7: Twodee 壓縮方式(0 - 1D,1 - 2D defaul 1 )
8: ECM 糾錯方式(defaul 1)
9: hWnd 接受傳真消息的窗口句柄
9: Msg 傳真消息
返回值:
0: End if function completes successfully
-1: Exception error
101: Failed to Open FAX file ~
102: Couldn't conneced within 35 secs of ATA command
103: Resevr
104: Failed to send CSI frames
105: Failed to send DIS frames
106: Failed to send NFS frames
107: Failed to send other negotiating frames
108: Failed to send CFR frames
109: Failed to training
110: Failed to send FTT frames
111: Failed to set training speed 3 times
112: Failed to send CRP frames
113: Failed to dropped carrier within 5 s
114: Failed to respond to +FRM properly
115: Failed to get modem data
116: Failed to accept page data
201: Couldn't be found transmit file
202: Transmit file isn't TIFF CLASS
203: Call isn't answered within 30 s
204: Machine can't receive fax data
205: Couldn't set +FTM
206: Couldn't set +FTM
210: NO DIALTONE
211: BUSY
212: NO ANSWER
213: NO CARRIER
*******************************************************************************/
// fax message for windows
#define WM_SMARTFAX WM_USER+101
#define WM_FAXMISSIONINOVER 0x101
#define WM_FAXCHANGESTATE 0x102
#define WM_FAXSETCIS 0x103
#define WM_FAXSETSPEED 0x104
#define WM_FAXMISSIONOUTOVER 0x105
#define WM_FAXRECVPAGEDATA 0x106
#define WM_FAXSENDPAGEDATA 0x107
#define WM_ACCEPTPAGE 0x108
#define WM_REJECTPAGE 0x109
#define WM_FAXSPEED 0x110
#define WM_FAXPROCESSPAGEDATA 0x111
#define WM_FAXUSERCANCE 0x112
#define WM_FAXECM 0x113
#define WM_FAXPAGE 0x114
#define WM_FAXRING 0x115
#define WM_FAXMONITORCLOSE 0x116
#define WM_FAXMONITORSTART 0x117
#define WM_FAXMONITORFAIL 0x118
#define WM_FAXANI 0x119
#define FAXINIT 0
#define DIALFAX 1
#define ANSWER 2
#define NEGOTIATION 3
#define TRAINING 4
/*
#ifdef __cplusplus
}
#endif
*/
#endif //__SMARTFAX_H_
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -