?? 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 + -