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.
62 lines
1.2 KiB
C++
62 lines
1.2 KiB
C++
#ifndef _GENERALMODH_
|
|
#define _GENERALMODH_
|
|
|
|
#include "GlobalDef.h"
|
|
|
|
#include <list>
|
|
#include <string>
|
|
using std::string;
|
|
using std::list;
|
|
|
|
// 释放内存
|
|
void SafeDelMemory(void *pNew, BOOL isArray);
|
|
|
|
|
|
typedef struct FunCallBack
|
|
{
|
|
void * pFunction;
|
|
void * pFirstParameter;
|
|
WORD wVideoID;
|
|
}myFunCallBack;
|
|
|
|
typedef struct tagHvImage
|
|
{
|
|
PBYTE pbImgData; // 图像数据
|
|
int iImgSize; // 图像大小
|
|
int iImgWidth; // 图像宽度
|
|
int iImgHeight; // 图像高度
|
|
DWORD wImgType; // 图像类型
|
|
DWORD64 dw64TimeMS; // 图像时间
|
|
|
|
tagHvImage()
|
|
{
|
|
pbImgData = NULL;
|
|
iImgSize = 0;
|
|
iImgWidth = 0;
|
|
iImgHeight = 0;
|
|
wImgType = 0;
|
|
dw64TimeMS = 0;
|
|
}
|
|
~tagHvImage()
|
|
{
|
|
SafeDelMemory(pbImgData, true);
|
|
}
|
|
}HvImage;
|
|
|
|
extern "C" int isnumer(char cChar);
|
|
extern "C" int isIpAddr(char * buf);
|
|
extern "C" int isIpAddrAndPort(char * buf);
|
|
|
|
|
|
extern "C" void DelHvImage(HvImage &img);
|
|
|
|
//gbk vonvert utf8
|
|
//编码转换
|
|
/*
|
|
int code_convert(char *from_charset,char *to_charset,char *inbuf,size_t inlen,
|
|
char *outbuf,size_t outlen);
|
|
|
|
// gbk转为utf8
|
|
extern "C" string gbk2utf8(const char *inbuf);
|
|
*/
|
|
#endif |