📄 shpp.h
字号:
/*********************************************
* file name: KN.h
* date: 2001.7.6
*
*********************************************/
#if !defined(_KN_H_LINYOUHAI)
#define _KN_H_LINYOUHAI
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef _WIN32
#include <winsock2.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <assert.h>
#endif
#include <malloc.h>
#define PRINTMAXLEN 48
#define FIELDBUFFER (PRINTMAXLEN+2)
//#include <crtdbg.h>
/* Typedefs */
typedef unsigned char UInt8;
typedef signed char SInt8;
typedef unsigned char* LPUCHAR;
typedef char* LPSCHAR;
typedef unsigned short UInt16;
typedef signed short SInt16;
typedef unsigned long UInt32;
typedef signed long SInt32;
//typedef signed long long SInt64;
//typedef unsigned long long UInt64;
typedef signed long SInt64;
typedef unsigned long UInt64;
typedef float Float32;
typedef double Float64;
typedef UInt16 Bool16;
typedef UInt8 Bool8;
//error code
#define NULL 0
enum KN_ERROR{
KN_OK = 0, //请求处理成功
KN_RegisterErr = -1, //没有注册非法的IP地址
KN_PopedomErr = -2, //你没有这个权限
KN_PasswordErr = -3, //密码错误
KN_RequestErr = -4, //非法请求
KN_ParameterErr = -5, //参数出错
KN_PrintErr = -6, //不能打印这月份的清单
KN_NotListErr = -7, //本月没有清单
KN_HaveFeeErr = -8, //你有欠费
KN_Version = -9, //版本出错
KN_NotDefine = -10, //未定义
KN_SocketConnectErr = -11, //网络连接出错
KN_SocketBindErr = -12, //网络绑定出错
KN_SocketSendErr = -13, //网络发送出错
KN_SocketRecvErr = -14, //网络接收出错
KN_SocketTimeoutErr = -15, //网络超时出错
KN_SocketError = -16, //网络出错
KN_ErrorCode = 16 //错误代码的个数
};
typedef SInt16 KN_Error; //错误返回类型
#ifdef _DEBUG
class CErrorMessage
{
public:
// Constructor
CErrorMessage(char* inMes = NULL,KN_Error snError = 0);
~CErrorMessage();
virtual Bool16 GetErrorMessage(char* pchErrorMessage);
private:
KN_Error m_sfssError;
SInt32 m_nSysError; //用GetLastError()得到的
char* m_pchMes; //自定义的错误字符串。
static char *ErrorString[];
};
#endif //_DEBUG
//***************************************************
#endif //define(_KN_H_LINYOUHAI)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -