📄 contain.h
字号:
#endif
// Declaration for static global variables (WIN16 compatibility)
#if defined(_WIN32)
# define PSTATIC
#else
# define PSTATIC __near
#endif
// Declaration for platform independent architectures
#define PCHAR8 PANSI_CHAR
#define PBYTE_ORDER PLITTLE_ENDIAN
// Declaration for integer that is the same size as a void *
#if defined(_WIN32)
typedef int INT;
#else
typedef long INT;
#endif
// Declaration for signed integer that is 16 bits
typedef short PInt16;
// Declaration for signed integer that is 32 bits
typedef long PInt32;
#ifdef __MINGW32__
#define __USE_STL__
using namespace std;
#define P_HAS_INT64
typedef signed __int64 PInt64;
typedef unsigned __int64 PUInt64;
#endif
// Declaration for 64 bit unsigned integer quantity
#if defined(_MSC_VER) && defined(_WIN32)
#define P_HAS_INT64
typedef signed __int64 PInt64;
typedef unsigned __int64 PUInt64;
#if _MSC_VER<1300
class ostream;
class istream;
ostream & operator<<(ostream & s, PInt64 v);
ostream & operator<<(ostream & s, PUInt64 v);
istream & operator>>(istream & s, PInt64 & v);
istream & operator>>(istream & s, PUInt64 & v);
#endif
#endif
// Standard array index type (depends on compiler)
// Type used in array indexes especially that required by operator[] functions.
#if defined(_MSC_VER) || defined(__MINGW32__)
# define PINDEX int
# if defined(_WIN32)
const PINDEX P_MAX_INDEX = 0x7fffffff;
# else
const PINDEX P_MAX_INDEX = 0x7fff;
# endif
inline PINDEX PABSINDEX(PINDEX idx) { return (idx < 0 ? -idx : idx)&P_MAX_INDEX; }
# define PASSERTINDEX(idx) PAssert((idx) >= 0, PInvalidArrayIndex)
#else
# define PINDEX unsigned
# ifndef SIZEOF_INT
# define SIZEOF_INT sizeof(int)
# endif
# if SIZEOF_INT == 4
const PINDEX P_MAX_INDEX = 0xffffffff;
# else
const PINDEX P_MAX_INDEX = 0xffff;
# endif
# define PABSINDEX(idx) (idx)
# define PASSERTINDEX(idx)
#endif
#ifndef _WIN32_WCE
#if _MSC_VER>=1400
#define strcasecmp(s1,s2) _stricmp(s1,s2)
#define strncasecmp(s1,s2,n) _strnicmp(s1,s2,n)
#else
#define strcasecmp(s1,s2) stricmp(s1,s2)
#define strncasecmp(s1,s2,n) strnicmp(s1,s2,n)
//#define _putenv ::putenv
//#define _close ::close
//#define _access ::access
#endif
#endif
class PWin32Overlapped : public OVERLAPPED
{
// Support class for overlapped I/O in Win32.
public:
PWin32Overlapped();
~PWin32Overlapped();
void Reset();
};
enum { PWIN32ErrorFlag = 0x40000000 };
class PString;
class RegistryKey
{
public:
enum OpenMode {
ReadOnly,
ReadWrite,
Create
};
RegistryKey(const PString & subkey, OpenMode mode);
~RegistryKey();
BOOL EnumKey(PINDEX idx, PString & str);
BOOL EnumValue(PINDEX idx, PString & str);
BOOL DeleteKey(const PString & subkey);
BOOL DeleteValue(const PString & value);
BOOL QueryValue(const PString & value, PString & str);
BOOL QueryValue(const PString & value, DWORD & num, BOOL boolean);
BOOL SetValue(const PString & value, const PString & str);
BOOL SetValue(const PString & value, DWORD num);
private:
HKEY key;
};
#ifndef _WIN32_WCE
extern "C" int PASCAL WinMain(HINSTANCE, HINSTANCE, LPSTR, int);
#else
extern "C" int PASCAL WinMain(HINSTANCE, HINSTANCE, LPTSTR, int);
#include <ptlib/wince/time.h>
#endif
// used by various modules to disable the winsock2 include to avoid header file problems
#ifndef P_KNOCKOUT_WINSOCK2
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4127 4706)
#endif
#if defined(P_WINSOCKv1)
#include <winsock.h>
#else // P_WINSOCKv1
///IPv6 support
// Needed for for IPv6 socket API. Must be included before "windows.h"
#include <winsock2.h> // Version 2 of windows socket
#include <ws2tcpip.h> // winsock2 is not complete, ws2tcpip add some defines such as IP_TOS
#if P_HAS_IPV6 && !defined IPPROTO_IPV6
#include "tpipv6.h" // For IPv6 Tech Preview.
#endif
#endif // P_WINSOCKv1
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
#define PIPX
typedef int socklen_t;
#endif // P_KNOCKOUT_WINSOCK2
#if defined(_MSC_VER) && !defined(_WIN32)
extern "C" int __argc;
extern "C" char ** __argv;
#endif
#ifdef __BORLANDC__
#define __argc _argc
#define __argv _argv
#endif
#undef Yield
#define P_THREADIDENTIFIER DWORD
#include <sys/types.h>
#include <errno.h>
#include <io.h>
#if defined(_MSC_VER)
#pragma warning(disable:4201)
#endif
#include <mmsystem.h>
#ifndef _WIN32_WCE
#include <vfw.h>
#else
#include <cevfw.h>
#endif
#define P_HAS_TYPEINFO 1
//#define PCONTAINER_USES_CRITSEC 1
// preload <string> and kill warnings
#if defined(_MSC_VER)
#pragma warning(push)
#include <yvals.h>
#pragma warning(disable:4100)
#pragma warning(disable:4018)
#pragma warning(disable:4663)
#pragma warning(disable:4146)
#pragma warning(disable:4244)
#pragma warning(disable:4786)
#endif
#include <string>
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
// preload <vector> and kill warnings
#if defined(_MSC_VER)
#pragma warning(push)
#include <yvals.h>
#pragma warning(disable:4018)
#pragma warning(disable:4663)
#pragma warning(disable:4786)
#endif
#include <vector>
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
// preload <map> and kill warnings
#if defined(_MSC_VER)
#pragma warning(push)
#include <yvals.h>
#pragma warning(disable:4018)
#pragma warning(disable:4663)
#pragma warning(disable:4786)
#endif
#include <map>
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
// preload <utility> and kill warnings
#if defined(_MSC_VER)
#pragma warning(push)
#include <yvals.h>
#pragma warning(disable:4786)
#endif
#include <utility>
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
// preload <iterator> and kill warnings
#if defined(_MSC_VER)
#pragma warning(push)
#include <yvals.h>
#pragma warning(disable:4786)
#endif
#include <iterator>
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
// preload <algorithm> and kill warnings
#include <algorithm>
// preload <queue> and kill warnings
#if defined(_MSC_VER)
#pragma warning(push)
#include <yvals.h>
#pragma warning(disable:4284)
#endif
#include <queue>
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
// VS.net won't work without this :(
#if _MSC_VER>=1300
using namespace std;
#endif
#if defined(_MSC_VER)
#pragma warning(disable:4786)
#endif
///////////////////////////////////////////////////////////////////////////////
// Fill in common declarations
//#include "../../contain.h"
#endif // _OBJECT_H
// End Of File ///////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -