diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-04-13 17:00:44 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-04-13 17:00:44 +0400 |
commit | 70dfa39c22a1f4f9756ec3627a8fb2691372b9b4 (patch) | |
tree | 704a587c9c371b6351c3ef80e6ea25c2a51e856c /include/atl | |
parent | acd830dd7f337743316281598844264440039a5c (diff) |
update atl include files
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3030 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'include/atl')
-rw-r--r-- | include/atl/atlcache.h | 46 | ||||
-rw-r--r-- | include/atl/atlisapi.h | 46 | ||||
-rw-r--r-- | include/atl/atlperf.h | 4 | ||||
-rw-r--r-- | include/atl/atlrx.h | 4 | ||||
-rw-r--r-- | include/atl/atlstencil.h | 23 |
5 files changed, 120 insertions, 3 deletions
diff --git a/include/atl/atlcache.h b/include/atl/atlcache.h index 7eacf9aa8..9e1ebc018 100644 --- a/include/atl/atlcache.h +++ b/include/atl/atlcache.h @@ -16,11 +16,17 @@ #include <atltime.h>
#include <atlutil.h>
#include <atlcoll.h>
+#ifndef _WIN32_WCE
#include <atlperf.h>
+#else // _WIN32_WCE
+#include <atlbase.h>
+#endif // _WIN32_WCE
#include <atlcom.h>
#include <atlstr.h>
#include <atlsrvres.h>
+#ifndef _WIN32_WCE
#include <atldbcli.h>
+#endif // _WIN32_WCE
#include <atlspriv.h>
#include <atlutil.h>
@@ -40,8 +46,12 @@ namespace ATL {
//forward declarations;
+#ifdef __ATLPERF_H__
class CStdStatClass;
class CPerfStatClass;
+#else
+class CNoStatClass;
+#endif // __ATLPERF_H__
typedef struct __CACHEITEM
{
@@ -685,7 +695,11 @@ template <class T, class Flusher=COldFlusher,
class Culler=CExpireCuller,
class SyncClass=CComCriticalSection,
+#ifdef __ATLPERF_H__
class StatClass=CStdStatClass >
+#else // __ATLPERF_H__
+ class StatClass=CNoStatClass >
+#endif // __ATLPERF_H__
class CMemoryCacheBase
{
protected:
@@ -1238,7 +1252,11 @@ struct CCacheDataEx : public CCacheDataBase template <typename DataType,
+#ifdef __ATLPERF_H__
class StatClass=CStdStatClass,
+#else // __ATLPERF_H__
+ class StatClass=CNoStatClass,
+#endif // __ATLPERF_H__
class FlushClass=COldFlusher,
class keyType=CFixedStringKey, class KeyTrait=CStringElementTraits<CFixedStringKey >,
class SyncClass=CComCriticalSection,
@@ -1321,6 +1339,8 @@ public: }
}; // CMemoryCache
+#ifdef __ATLPERF_H__
+
// CStdStatData - contains the data that CStdStatClass keeps track of
#define ATL_PERF_CACHE_OBJECT 100
@@ -1456,6 +1476,8 @@ public: }
}; // CStdStatClass
+#endif // __ATLPERF_H__
+
//
// CNoStatClass
// This is a noop stat class
@@ -1477,6 +1499,8 @@ public: void ResetCounters(){ }
}; // CNoStatClass
+#ifdef __ATLPERF_H__
+
//
//CPerfStatClass
// Description
@@ -1550,6 +1574,8 @@ public: }
}; // CPerfStatClass
+#endif // __ATLPERF_H__
+
#ifndef ATL_BLOB_CACHE_TIMEOUT
#ifdef _DEBUG
#define ATL_BLOB_CACHE_TIMEOUT 1000
@@ -1564,7 +1590,11 @@ public: // Implements a cache that stores pointers to void. Uses the generic CMemoryCacheBase class
// as the implementation.
template <class MonitorClass,
+#ifdef __ATLPERF_H__
class StatClass=CStdStatClass,
+#else // __ATLPERF_H__
+ class StatClass=CNoStatClass,
+#endif // __ATLPERF_H__
class SyncObj=CComCriticalSection,
class FlushClass=COldFlusher,
class CullClass=CExpireCuller >
@@ -2281,7 +2311,11 @@ IStencilCacheControl : public IUnknown #endif
template <class MonitorClass,
+#ifdef __ATLPERF_H__
class StatClass=CStdStatClass,
+#else // __ATLPERF_H__
+ class StatClass=CNoStatClass,
+#endif // __ATLPERF_H__
class SyncClass=CComCriticalSection,
class FlushClass=COldFlusher,
class CullClass=CLifetimeCuller >
@@ -2609,12 +2643,18 @@ struct CCacheDataPeer : public CCacheDataBase typename Peer::PeerInfo PeerData;
};
+#ifndef _WIN32_WCE
+
// A class to keep track of files, with maintenance -- maximum size of cache,
// maximum number of entries, expiration of entries, etc. -- inherits from
// CMemoryCacheBase
template <
class MonitorClass,
+#ifdef __ATLPERF_H__
class StatClass=CStdStatClass,
+#else // __ATLPERF_H__
+ class StatClass=CNoStatClass,
+#endif // __ATLPERF_H__
class FileCachePeer=CNoFileCachePeer,
class FlushClass=COldFlusher,
class SyncClass=CComCriticalSection,
@@ -2994,6 +3034,10 @@ public: }
}; // CFileCache
+#endif // _WIN32_WCE
+
+#ifdef __ATLDBCLI_H__
+
class CDataConnection; // see atldbcli.h
__interface __declspec(uuid("52E7759B-D6CC-4a03-BDF3-80A6BDCA1F94"))
IDataSourceCache : public IUnknown
@@ -3238,6 +3282,8 @@ static HRESULT ATL_NOINLINE RemoveDataSource(IServiceProvider *pProvider, LPCTST return hr;
}
+#endif // __ATLDBCLI_H__
+
} // namespace ATL
#pragma pack(pop)
diff --git a/include/atl/atlisapi.h b/include/atl/atlisapi.h index e812aecc5..5bf4f2f0f 100644 --- a/include/atl/atlisapi.h +++ b/include/atl/atlisapi.h @@ -23,14 +23,18 @@ #include <atlserr.h>
#include <atlfile.h>
#include <atlstr.h>
+#ifndef _WIN32_WCE
#include <atldbcli.h>
+#endif // _WIN32_WCE
#include <atlutil.h>
#include <atlcache.h>
#include <atlsrvres.h>
#include <atlsiface.h>
#include <objbase.h>
+#ifndef _WIN32_WCE
#include <atlsecurity.h>
#include <errno.h>
+#endif // _WIN32_WCE
#ifndef ATL_NO_SOAP
#include <msxml2.h>
#endif
@@ -43,13 +47,17 @@ #include <mmsystem.h>
#pragma warning(pop)
#ifndef _ATL_NO_DEFAULT_LIBS
+#ifndef _WIN32_WCE
#pragma comment(lib, "winmm.lib")
#ifndef ATL_NO_SOAP
#pragma comment(lib, "msxml2.lib")
-#endif
+#endif // !ATL_NO_SOAP
+#endif // _WIN32_WCE
#endif // !_ATL_NO_DEFAULT_LIBS
-#endif
+#endif // !ATL_NO_MMSYS
+#ifndef _WIN32_WCE
#include <atlpath.h>
+#endif // _WIN32_WCE
#pragma warning(push)
#pragma warning(disable: 4291) // allow placement new
@@ -62,7 +70,9 @@ #pragma warning(disable: 4702) // unreachable code
#include <initguid.h>
+#ifndef _WIN32_WCE
#include <dbgautoattach.h>
+#endif // _WIN32_WCE
#ifndef SESSION_COOKIE_NAME
#define SESSION_COOKIE_NAME "SESSIONID"
@@ -96,6 +106,8 @@ inline bool IsNullByType(__in TComp type) throw() #pragma pack(push,_ATL_PACKING)
namespace ATL {
+#ifndef _WIN32_WCE
+
// Default file extension for server response files
#ifndef ATL_DEFAULT_STENCIL_EXTENSION
#define ATL_DEFAULT_STENCIL_EXTENSION ".srf"
@@ -142,6 +154,7 @@ extern __declspec(selectany) const TCHAR * const c_tAtlDLLExtension = _T(ATL_DEF #define ATL_MAX_COOKIE_LEN 2048
#define ATL_MAX_COOKIE_ELEM 1024
+#endif // _WIN32_WCE
// Defines a small value used for comparing the equality of floating point numbers.
#ifndef ATL_EPSILON
@@ -152,6 +165,8 @@ extern __declspec(selectany) const TCHAR * const c_tAtlDLLExtension = _T(ATL_DEF #define ATL_DEFAULT_PRECISION 6
#endif
+#ifndef _WIN32_WCE
+
// Call this function to URL-encode a buffer and have the result appended to a CString passed by reference.
//
// A space in the input string is encoded as a plus sign (+).
@@ -271,6 +286,8 @@ inline bool EscapeToCString(__inout CStringA& string, __in_z LPCWSTR wszBuf) thr return true;
}
+#endif // _WIN32_WCE
+
struct CDefaultErrorProvider
{
struct HTTP_ERROR_TEXT
@@ -402,6 +419,8 @@ void GetStatusHeader(__inout CStringA &strStatus, __in DWORD dwStatus, __in DWOR strStatus.Append(szHeadErr);
}
+#ifndef _WIN32_WCE
+
template<class HttpUserErrorTextProvider>
void RenderError(__in IHttpServerContext *pServerContext, __in DWORD dwStatus, __in DWORD dwSubStatus, __in HttpUserErrorTextProvider* pErrorProvider)
{
@@ -3703,6 +3722,7 @@ public: }; // class CHttpRequestFile
+#endif // _WIN32_WCE
// utility function to ReadData from a ServerContext
ATL_NOINLINE inline
@@ -3766,6 +3786,8 @@ __checkReturn BOOL ReadClientData(__inout IHttpServerContext *pServerContext, __ return TRUE;
}
+#ifndef _WIN32_WCE
+
#ifndef MAX_MIME_BOUNDARY_LEN
#define MAX_MIME_BOUNDARY_LEN 128
#endif
@@ -5732,6 +5754,8 @@ __declspec(selectany) const char* const CHttpRequest::m_szMethodStrings[] = { NULL
};
+#endif // _WIN32_WCE
+
// This class provides type conversions via the Write method
// and overloaded left shift << operator for writing
// data to the IWriteStream interface. The IWriteStream interface
@@ -6503,6 +6527,7 @@ public: return FALSE;
}
+#ifndef _WIN32_WCE
// Call this function to set the Expires HTTP header to a relative date/time
// value specified in minutes;
BOOL SetExpires(__in long lMinutes) throw()
@@ -6517,6 +6542,7 @@ public: FileTimeToSystemTime(&ft, &st);
return SetExpiresAbsolute(st);
}
+#endif // _WIN32_WCE
// Call this function to set whether or not to output to client.
// Intended primarily for HEAD requests
@@ -6734,6 +6760,8 @@ public: return bRet;
}
+#ifndef _WIN32_WCE
+
// Call this function to add a Set-Cookie header to the collection of HTTP headers managed by this object.
//
// pCookie A pointer to a CCookie object describing the cookie to be sent to the client.
@@ -6835,6 +6863,8 @@ public: }
+#endif // _WIN32_WCE
+
// Call this function to clear the collection of HTTP response headers maintained by this object.
//
// Note that clearing the headers includes removing all cookies associated with the response
@@ -7052,7 +7082,11 @@ public: _ATLTRY
{
bRet = m_spServerContext->TransmitFile(hFile, NULL, NULL, NULL,
- 0, 0, NULL, 0, NULL, 0, HSE_IO_ASYNC | HSE_IO_NODELAY);
+ 0, 0, NULL, 0, NULL, 0, HSE_IO_ASYNC
+#ifndef _WIN32_WCE
+ | HSE_IO_NODELAY
+#endif // _WIN32_WCE
+ );
}
_ATLCATCHALL()
{
@@ -7064,6 +7098,7 @@ public: }
}; // class CHttpResponse
+#ifndef _WIN32_WCE
#define ATLS_FLAG_NONE 0
@@ -7147,6 +7182,7 @@ inline BOOL CreateRequestHandlerSync(__in IIsapiExtension *pExtension, __deref_o return (ATLSRV_INIT_USEASYNC|ATLSRV_INIT_USEASYNC_EX); \
}
+#endif // _WIN32_WCE
template <typename THandler>
class IRequestHandlerImpl : public IRequestHandler
@@ -7282,6 +7318,8 @@ public: }
};
+#ifndef _WIN32_WCE
+
struct CRequestStats
{
long m_lTotalRequests;
@@ -10601,6 +10639,8 @@ public: };
+#endif // _WIN32_WCE
+
} // namespace ATL
#pragma pack(pop)
diff --git a/include/atl/atlperf.h b/include/atl/atlperf.h index a1e8d9ea4..998a60a3f 100644 --- a/include/atl/atlperf.h +++ b/include/atl/atlperf.h @@ -13,6 +13,10 @@ #pragma once
+#ifdef _WIN32_WCE
+ #error atlpref.h is not supported on Windows CE (_WIN32_WCE is defined)
+#endif //_WIN32_WCE
+
#ifndef __cplusplus
#error ATL requires C++ compilation (use a .cpp suffix)
#endif
diff --git a/include/atl/atlrx.h b/include/atl/atlrx.h index 1f2b07a1f..b3edc3d4a 100644 --- a/include/atl/atlrx.h +++ b/include/atl/atlrx.h @@ -13,6 +13,10 @@ #pragma once
+#ifdef _WIN32_WCE
+ #error atlrx.h is not supported on Windows CE (_WIN32_WCE is defined)
+#endif //_WIN32_WCE
+
#include <atlbase.h>
#include <atlcoll.h>
#include <mbstring.h>
diff --git a/include/atl/atlstencil.h b/include/atl/atlstencil.h index 8694a0f42..42cfa9d24 100644 --- a/include/atl/atlstencil.h +++ b/include/atl/atlstencil.h @@ -31,7 +31,9 @@ #endif
#ifndef _ATL_NO_DEFAULT_LIBS
+#ifndef _WIN32_WCE
#pragma comment(lib, "shlwapi.lib")
+#endif // _WIN32_WCE
#endif // !_ATL_NO_DEFAULT_LIBS
#pragma warning( push )
@@ -47,6 +49,8 @@ #pragma pack(push,_ATL_PACKING)
namespace ATL {
+#ifndef _WIN32_WCE
+
// Token types
// These tags are token tags for the standard tag replacer implementation
extern __declspec(selectany) const DWORD STENCIL_TEXTTAG = 0x00000000;
@@ -64,6 +68,8 @@ extern __declspec(selectany) const DWORD STENCIL_CODEPAGE = 0x0000000 // The base for user defined token types
extern __declspec(selectany) const DWORD STENCIL_USER_TOKEN_BASE = 0x00001000;
+#endif // _WIN32_WCE
+
// Symbols to use in error handling in the stencil processor
#define STENCIL_INVALIDINDEX 0xFFFFFFFF
#define STENCIL_INVALIDOFFSET 0xFFFFFFFF
@@ -612,28 +618,43 @@ public: ATLENSURE( szParams != NULL );
ATLENSURE( ppParam != NULL );
+#ifndef _WIN32_WCE
errno_t errnoValue = 0;
+#endif //!_WIN32_WCE
*ppParam = (float *) pMemMgr->Allocate(sizeof(float));
if (*ppParam)
{
+#ifndef _WIN32_WCE
errno_t saveErrno = Checked::get_errno();
Checked::set_errno(0);
**ppParam = (float) atof(szParams);
errnoValue = Checked::get_errno();
Checked::set_errno(saveErrno);
+#else
+ **ppParam = (float) atof(szParams);
+#endif //!_WIN32_WCE
}
else
{
return AtlsHttpError(500, ISE_SUBERR_OUTOFMEM);
}
+#ifndef _WIN32_WCE
if ((**ppParam == -HUGE_VAL) || (**ppParam == HUGE_VAL) || (errnoValue == ERANGE))
{
return HTTP_FAIL;
}
+#else // _WIN32_WCE
+ if ((*pVal == -HUGE_VAL) || (*pVal == HUGE_VAL))
+ {
+ return HTTP_FAIL;
+ }
+#endif // _WIN32_WCE
return HTTP_SUCCESS;
}
};
+#ifndef _WIN32_WCE
+
inline LPCSTR SkipSpace(LPCSTR sz, WORD nCodePage) throw()
{
if (sz == NULL)
@@ -4144,6 +4165,8 @@ public: }
}; // class CRequestHandlerT
+#endif // _WIN32_WCE
+
} // namespace ATL
#pragma pack(pop)
|