?? serialio.h
字號(hào):
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the SERIALIO_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// SERIALIO_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef SERIALIO_EXPORTS
#define SERIALIO_API __declspec(dllexport)
#else
#define SERIALIO_API __declspec(dllimport)
#endif
// This class is exported from the Serialio.dll
class SERIALIO_API CSerialio {
public:
CSerialio(void);
};
extern SERIALIO_API int nSerialio;
SERIALIO_API int fnSerialio(void);
#include "windows.h"
#include <stdlib.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define None 0
#define RTSCTS 1
#define DTRDSR 2
#define XONXOFF 3
///////////////////////// 全局變量 ///////////////////
char CIDMsg[] = "AT+CXXCID\r";
char MadeOfMsg[] = "AT+GMI\r";
char ModelMsg[] = "AT+GMM\r";
char VerMsgs[] = "AT+GMR\r";
char SMSCMsgs[] = "AT+CSCA?\r";
char SetCts[] = "ATQ0\r";
char Setecho[] = "ATE0\r";
char SetText[] = "AT+CMGF=1\r";
char DelMsg[] = "AT+CMGD=";
char SendMsg[] = "AT+CMGS=";
char ReadMsg[] = "AT+CMGR=";
char ListMsgs[] = "AT+CMGL";
char NewMsgs[] = "AT+CPMS?\r";
char msg[200];
char Getmsg[200];
static int sid;
int ID;
int Model;
int te;
int InputLength;
char ids[90];
int MsgAmount;
bool HC;
unsigned char outstring[200];
unsigned char ToBinString[20];
unsigned char cs[25];
unsigned char Result = 0;
bool CheckFlag = FALSE;
BYTE inBuffer[4096];
DWORD nBytesToRead = 1024, nBytesRead;
DWORD nBytesToWrite = 1024, BytesWritten;
char Error[] = "ERROR";
HANDLE my_hCommFile;
int IniFlag;
/////////////////// 函數(shù)定義 /////////////////////////
//內(nèi)部函數(shù)
unsigned char MakeCheckCode( unsigned char*, int);
BOOL CheckAddress(char, char);
void ToBin(unsigned char*);
void ToAsc(unsigned char*);
void ASCtoBCD(unsigned char*);
void BCDtoASC(unsigned char*, int);
char* IntToString(int, char*, int);
unsigned char* ToString(int, unsigned char*, int);
int ByteToInt(char * bs, int lens);
void TestString(BYTE * test);
void AscToHex(char* as, int aslen, int hexlen);
int Filter_z(char* sa, int length,int Model);
//通信函數(shù)
BOOL SetupCOMM(int port);
BOOL WriteCOMM(BYTE *OutBuffer, int Length);
BOOL ReadCOMM(BYTE *InBuffer);
void Delay(unsigned long);
BOOL Capabilities(DWORD CAPS);
BOOL SettaleParams(DWORD PARAMS);
BOOL CheckRS232(char* str);
//輸出函數(shù)
int SerialINI(int port);
char* ReadMessage(int index);
char* WriteMessage(char* outstring);
int GetMsgAmount(int mn);
char* GetMsgID(int type);
int Tc35DelMsg(int index);
char* Tc35CID(char*);
char* Tc35Made(char*);
char* Tc35Model(char*);
char* Tc35Ver(char*);
char* Tc35SMSC(char*);
char* ReadMSG(int id);
int WriteMSG(char* str);
//TC35T操作函數(shù)
char* Tc35GetMsgs(int MsgType);
BOOL Tc35Read(int index);
BOOL Tc35Send(char* str);
BOOL Tc35Ini(void);
int Tc35NewMsg();
int SearchStr(char*,char*);
BOOL ReadWriteTc35t(long delay, BYTE* cmdstr, BYTE* rslstr);
void EmptyBuffer(BYTE*, int);
//////////////////////////////////////////////////////
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -