You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.0 KiB
C++

#ifndef _GLOBAL_H_
#define _GLOBAL_H_
#define HRESULT int
#define HANDLE void *
#define INT32 int
#define PRINTERNANE "NAME"
#define PRINTERCOL "COL"
#define PRINTERLINE "ROW"
#define PRINTERVALUE "VALUE"
#define PRINTTYPE_LPT 1
#define PRINTTYPE_COM 2
#define PRINTTYPE_OTHER 3
#define S_OK 0
#include <vector>
using namespace std;
typedef struct printerPara
{
char Name[128];
int col;
int line;
}myprinterPara;
typedef struct printerInfo
{
char Name[128];
char Value[128];
}myprinterInfo;
typedef struct printerData
{
int line;
char Data[384];
}myprinterData;
int isnumer(char cChar,int base=10);
int isnumer(char * buf,int base=10);
void charToUpper(char * buf);
//int isLptPort(char * buf);
//int isComPort(char * buf);
// 串口检查
//波特率
int isBaudRate(int baud);
//
int GetBaud(char * buf);
void InitPrinterPara(myprinterPara * pPara);
void InitPrinterInfo(myprinterInfo * pPara);
void InitPrinterData(myprinterData * pPara);
#endif