?? sendsms.h
字號:
// SendSMS.h: interface for the CSendSMS class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SENDSMS_H__B41A08B6_392E_426C_9C21_780EC022F77B__INCLUDED_)
#define AFX_SENDSMS_H__B41A08B6_392E_426C_9C21_780EC022F77B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxinet.h> // http support add by chenjun
#include <afxmt.h> //event support add by chenjun
#define MAXTHREAD 5
extern int MAXNOOFTHREAD;
//const buf[]="0123456789+- ";
//strspn(data,buf)<strlen(data);
//////////////////////////////////////////////////////////////////////////
//使用一個消息WM_SENDONCE與主程序通信
// WPARAM wParam = 1: 成功發(fā)送了 n 條sms, lParam 為條數(shù) n
// = 2: 服務(wù)器錯誤,本次查詢失敗
// = 3: 構(gòu)造HTTP請求異常,該線程退出,lParam為線程的順序號
// = 4: 本次線程發(fā)送所用時(shí)間,lParam為時(shí)間
// = 0: 一般性錯誤,原因可以通過GetLastError()得到.
//
//////////////////////////////////////////////////////////////////////////
//#define WM_SENDONCE WM_USER + 1000
UINT SendMutliSms(LPVOID pParam);
typedef struct tagThreadData{
CStringArray* pArrayUser;
CString szPreUrl;
int iPos;
BOOL bProxy;
CString szAddrProxy;
UINT nPortProxy;
CEvent ev[MAXTHREAD];
HWND hMain;
}ThreadData;
class CSendSMS
{
public:
CString GetLastError(){ return m_szError;}
void SetProxy(CString szIP,UINT nPort); //set proxy server's IP&PORT
BOOL StartSend(CStringArray* pszReceiver); //start send multi-sms
BOOL SetParam(CString strServerName,UINT nPort,CString strUsername,CString strPassword,HWND hMain = NULL);
// set some parameters
CSendSMS();
virtual ~CSendSMS();
private:
ThreadData* pData;
CString m_szError;
};
#endif // !defined(AFX_SENDSMS_H__B41A08B6_392E_426C_9C21_780EC022F77B__INCLUDED_)
/*////////////////////////////////////////////////////////////////////////////
// CHttpSocket command target
class CHttpSocket : public CAsyncSocket
{
// Attributes
public:
// Operations
public:
CHttpSocket();
virtual ~CHttpSocket();
// Overrides
public:
BOOL ConnectHttp(CString szServername,UINT nPort);
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHttpSocket)
public:
virtual void OnSend(int nErrorCode);
virtual void OnClose(int nErrorCode);
virtual void OnConnect(int nErrorCode);
//}}AFX_VIRTUAL
// Generated message map functions
//{{AFX_MSG(CHttpSocket)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
// Implementation
protected:
};
/////////////////////////////////////////////////////////////////////////////
*/
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -