Visual Studio 2015
Makefile e.a. flink opgeschoond _CRT_SECURE_DEPRECATE verwijderd en aantal functies de _s variant gebruikt WTL van 9.0 naar 9.1 DWF Toolkit makefiles voor VS12.0 en vooral 14.0 ook committen svn path=/Slnkdwf/trunk/; revision=28366
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
Microsoft Limited Permissive License (Ms-LPL)
|
||||
|
||||
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
|
||||
|
||||
1. Definitions
|
||||
The terms <20>reproduce,<2C> <20>reproduction,<2C> <20>derivative works,<2C> and <20>distribution<6F> have the same meaning here as under U.S. copyright law.
|
||||
A <20>contribution<6F> is the original software, or any additions or changes to the software.
|
||||
A <20>contributor<6F> is any person that distributes its contribution under this license.
|
||||
<EFBFBD>Licensed patents<74> are a contributor<6F>s patent claims that read directly on its contribution.
|
||||
|
||||
2. Grant of Rights
|
||||
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
|
||||
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
|
||||
|
||||
3. Conditions and Limitations
|
||||
(A) No Trademark License- This license does not grant you rights to use any contributors<72> name, logo, or trademarks.
|
||||
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
|
||||
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
|
||||
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
|
||||
(E) The software is licensed <20>as-is.<2E> You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
|
||||
(F) Platform Limitation- The licenses granted in sections 2(A) & 2(B) extend only to the software or derivative works that you create that run on a Microsoft Windows operating system product.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,376 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#ifndef __ATLCRYPT_H__
|
||||
#define __ATLCRYPT_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <atlchecked.h>
|
||||
#include <wincrypt.h>
|
||||
|
||||
|
||||
#pragma pack(push,_ATL_PACKING)
|
||||
namespace ATL
|
||||
{
|
||||
|
||||
class CCryptKey;
|
||||
|
||||
class CCryptProv
|
||||
{
|
||||
protected:
|
||||
HCRYPTPROV m_hProv;
|
||||
|
||||
public:
|
||||
CCryptProv() throw();
|
||||
CCryptProv( const CCryptProv& prov ) throw();
|
||||
explicit CCryptProv( HCRYPTPROV hProv, BOOL bTakeOwnership = FALSE ) throw();
|
||||
~CCryptProv() throw();
|
||||
|
||||
CCryptProv& operator=( const CCryptProv& prov ) throw();
|
||||
|
||||
HRESULT AddRef() throw();
|
||||
void Attach( HCRYPTPROV hProv, BOOL bTakeOwnership = FALSE ) throw();
|
||||
HCRYPTPROV Detach() throw();
|
||||
HRESULT Release() throw();
|
||||
|
||||
|
||||
HRESULT Initialize(DWORD dwProviderType = PROV_RSA_FULL,
|
||||
LPCTSTR szContainer = NULL, LPCTSTR szProvider = MS_DEF_PROV,
|
||||
DWORD dwFlags = 0) throw();
|
||||
HRESULT InitVerifyContext(DWORD dwProviderType = PROV_RSA_FULL,
|
||||
LPCTSTR szProvider = MS_DEF_PROV, DWORD dwFlags = 0) throw();
|
||||
HRESULT InitCreateKeySet(DWORD dwProviderType = PROV_RSA_FULL,
|
||||
LPCTSTR szContainer = NULL, LPCTSTR szProvider = MS_DEF_PROV,
|
||||
DWORD dwFlags = 0) throw();
|
||||
|
||||
HRESULT DeleteKeySet(DWORD dwProviderType = PROV_RSA_FULL,
|
||||
LPCTSTR szContainer = NULL, LPCTSTR szProvider = MS_DEF_PROV,
|
||||
DWORD dwFlags = 0) throw();
|
||||
|
||||
HRESULT Uninitialize();
|
||||
|
||||
HRESULT GetParam(DWORD dwParam, BYTE * pbData, DWORD * pdwDataLen, DWORD dwFlags = 0) throw();
|
||||
HRESULT SetParam( DWORD dwParam, BYTE* pbData, DWORD dwFlags = 0) throw();
|
||||
HRESULT GetName(__out_ecount_part_z(*pdwLength, *pdwLength) LPSTR szBuf, __inout DWORD * pdwLength) throw();
|
||||
HRESULT GetContainer(__out_ecount_part_z(*pdwLength, *pdwLength) LPSTR szBuf, __inout DWORD * pdwLength) throw();
|
||||
HRESULT GetImpType(DWORD * pdwImpType) throw();
|
||||
HRESULT GetVersion(DWORD * pdwVersion) throw();
|
||||
HRESULT GetProvType(DWORD * pdwType) throw();
|
||||
HRESULT GetSecurityDesc(SECURITY_INFORMATION * pSecInfo) throw();
|
||||
HRESULT SetSecurityDesc(SECURITY_INFORMATION SecInfo) throw();
|
||||
|
||||
HRESULT GenRandom(ULONG nLength, BYTE* pbBuffer ) throw();
|
||||
|
||||
inline HCRYPTPROV GetHandle() throw()
|
||||
{
|
||||
return m_hProv;
|
||||
}
|
||||
}; // class CCryptProv
|
||||
|
||||
|
||||
// class CCryptHash
|
||||
// Provides base functionality of hashes.
|
||||
class CCryptHash
|
||||
{
|
||||
protected:
|
||||
HCRYPTHASH m_hHash;
|
||||
|
||||
public:
|
||||
CCryptHash() throw();
|
||||
CCryptHash( const CCryptHash& hash ) throw();
|
||||
explicit CCryptHash( HCRYPTHASH hHash, BOOL bTakeOwnership = FALSE ) throw();
|
||||
~CCryptHash() throw();
|
||||
|
||||
void Attach( HCRYPTHASH hHash, BOOL bTakeOwnership = FALSE ) throw();
|
||||
void Destroy() throw();
|
||||
HCRYPTHASH Detach() throw();
|
||||
HCRYPTHASH Duplicate() const throw();
|
||||
|
||||
HRESULT Uninitialize() throw();
|
||||
HRESULT Detach(HCRYPTHASH * phHash) throw();
|
||||
HRESULT AddData(const BYTE * pbData, DWORD dwDataLen, DWORD dwFlags = 0) throw();
|
||||
HRESULT AddString(LPCTSTR szData, DWORD dwFlags = 0) throw();
|
||||
HRESULT GetParam(DWORD dwParam, BYTE * pbData, DWORD * pdwDataLen, DWORD dwFlags = 0) throw();
|
||||
HRESULT SetParam(DWORD dwParam, BYTE * pbData, DWORD dwFlags = 0) throw();
|
||||
HRESULT GetAlgId(ALG_ID * pAlgId) throw();
|
||||
HRESULT GetSize(DWORD * pdwSize) throw();
|
||||
HRESULT GetValue(BYTE * pBuf, DWORD * pdwSize) throw();
|
||||
HRESULT SetValue(BYTE * pBuf) throw();
|
||||
HRESULT Sign(
|
||||
BYTE * pbSignature,
|
||||
DWORD * pdwSigLen,
|
||||
DWORD dwFlags = 0,
|
||||
DWORD dwKeySpec = AT_SIGNATURE) throw();
|
||||
HRESULT VerifySignature(
|
||||
const BYTE * pbSignature,
|
||||
DWORD pdwSignLen,
|
||||
CCryptKey &PubKey,
|
||||
DWORD dwFlags = 0) throw();
|
||||
|
||||
inline HCRYPTHASH GetHandle()
|
||||
{
|
||||
return m_hHash;
|
||||
}
|
||||
static CCryptHash EmptyHash;
|
||||
|
||||
}; // class CCryptHash
|
||||
|
||||
// class CCryptKey
|
||||
// Provides the functionality for cryptographic keys, i.e. encrypting, decrypting.
|
||||
class CCryptKey
|
||||
{
|
||||
protected:
|
||||
HCRYPTKEY m_hKey;
|
||||
|
||||
public:
|
||||
CCryptKey() throw();
|
||||
CCryptKey( const CCryptKey& key ) throw();
|
||||
explicit CCryptKey( HCRYPTKEY hKey, BOOL bTakeOwnership = FALSE ) throw();
|
||||
~CCryptKey() throw();
|
||||
|
||||
void Attach( HCRYPTKEY hKey, BOOL bTakeOwnership = FALSE ) throw();
|
||||
void Destroy() throw();
|
||||
HCRYPTKEY Detach() throw();
|
||||
HCRYPTKEY Duplicate() const throw();
|
||||
|
||||
HRESULT Uninitialize() throw();
|
||||
HRESULT Encrypt(
|
||||
BOOL final,
|
||||
BYTE * pbData,
|
||||
DWORD * pdwDataLen,
|
||||
DWORD dwBufLen,
|
||||
CCryptHash &Hash = CCryptHash::EmptyHash) throw();
|
||||
|
||||
HRESULT Encrypt(
|
||||
const BYTE * pbPlainText,
|
||||
DWORD dwPlainTextLen,
|
||||
BYTE * pbCipherText,
|
||||
DWORD * pdwCipherTextLen,
|
||||
CCryptHash &Hash = CCryptHash::EmptyHash) throw();
|
||||
|
||||
HRESULT Decrypt(
|
||||
BOOL final,
|
||||
BYTE * pbData,
|
||||
DWORD * pdwDataLen,
|
||||
CCryptHash &Hash = CCryptHash::EmptyHash) throw();
|
||||
HRESULT Decrypt(
|
||||
const BYTE * pbCipherText,
|
||||
DWORD dwCipherTextLen,
|
||||
BYTE * pbPlainText,
|
||||
DWORD * pdwPlainTextLen,
|
||||
CCryptHash &Hash = CCryptHash::EmptyHash) throw();
|
||||
HRESULT EncryptString(
|
||||
LPCTSTR szPlainText,
|
||||
BYTE * pbCipherText,
|
||||
DWORD * pdwCipherTextLen,
|
||||
CCryptHash &Hash = CCryptHash::EmptyHash) throw();
|
||||
HRESULT ExportSimpleBlob(
|
||||
CCryptKey &ExpKey,
|
||||
DWORD dwFlags,
|
||||
BYTE * pbData,
|
||||
DWORD * pdwDataLen) throw();
|
||||
HRESULT ExportPublicKeyBlob(
|
||||
CCryptKey &ExpKey,
|
||||
DWORD dwFlags,
|
||||
BYTE * pbData,
|
||||
DWORD * pdwDataLen) throw();
|
||||
HRESULT ExportPrivateKeyBlob(
|
||||
CCryptKey &ExpKey,
|
||||
DWORD dwFlags,
|
||||
BYTE * pbData,
|
||||
DWORD * pdwDataLen) throw();
|
||||
HRESULT GetParam(DWORD dwParam, BYTE * pbData, DWORD * pdwDataLen, DWORD dwFlags = 0) throw();
|
||||
HRESULT SetParam(DWORD dwParam, BYTE * pbData, DWORD dwFlags = 0) throw();
|
||||
HRESULT GetAlgId(ALG_ID * pAlgId) throw();
|
||||
HRESULT SetAlgId(ALG_ID AlgId, DWORD dwFlags) throw();
|
||||
HRESULT GetBlockLength(DWORD * pdwBlockLen) throw();
|
||||
HRESULT GetKeyLength(DWORD * pdwKeyLen) throw();
|
||||
HRESULT GetSalt(BYTE * pbSalt, DWORD * pdwLength) throw();
|
||||
HRESULT SetSalt(BYTE * pbSalt) throw();
|
||||
HRESULT SetSaltEx(_CRYPTOAPI_BLOB * pBlobSalt) throw();
|
||||
HRESULT GetPermissions(DWORD * pdwPerms) throw();
|
||||
HRESULT SetPermissions(DWORD dwPerms) throw();
|
||||
HRESULT GetP(BYTE * pbP, DWORD * pdwLength) throw();
|
||||
HRESULT SetP(_CRYPTOAPI_BLOB * pBlobP) throw();
|
||||
HRESULT SetP(BYTE * pbP, DWORD dwLength) throw();
|
||||
HRESULT GetQ(BYTE * pbQ, DWORD * pdwLength) throw();
|
||||
HRESULT SetQ(_CRYPTOAPI_BLOB * pBlobQ) throw();
|
||||
HRESULT SetQ(BYTE * pbQ, DWORD dwLength) throw();
|
||||
HRESULT GetG(BYTE * pbG, DWORD * pdwLength) throw();
|
||||
HRESULT SetG(_CRYPTOAPI_BLOB * pBlobG) throw();
|
||||
HRESULT SetG(BYTE * pbG, DWORD dwLength) throw();
|
||||
HRESULT SetX() throw();
|
||||
HRESULT GetEffKeyLen(DWORD * pdwEffKeyLen) throw();
|
||||
HRESULT SetEffKeyLen(DWORD dwEffKeyLen) throw();
|
||||
HRESULT GetPadding(DWORD * pdwPadding) throw();
|
||||
HRESULT SetPadding(DWORD dwPadding) throw();
|
||||
HRESULT GetIV(BYTE * pbIV, DWORD * pdwLength) throw();
|
||||
HRESULT SetIV(BYTE * pbIV) throw();
|
||||
HRESULT GetMode(DWORD * pdwMode) throw();
|
||||
HRESULT SetMode(DWORD dwMode) throw();
|
||||
HRESULT GetModeBits(DWORD * pdwModeBits) throw();
|
||||
HRESULT SetModeBits(DWORD dwModeBits) throw();
|
||||
|
||||
inline HCRYPTKEY GetHandle() throw()
|
||||
{
|
||||
return m_hKey;
|
||||
}
|
||||
|
||||
static CCryptKey EmptyKey;
|
||||
}; // class CCryptKey
|
||||
|
||||
|
||||
|
||||
// Specific instances of Keys and Hashes
|
||||
|
||||
// class CCryptDerivedKey
|
||||
// A key that is derived from a hashed password. Two keys derived
|
||||
// from the same password will be identical.
|
||||
class CCryptDerivedKey : public CCryptKey
|
||||
{
|
||||
public:
|
||||
HRESULT Initialize(
|
||||
CCryptProv &Prov,
|
||||
CCryptHash &Hash,
|
||||
ALG_ID algid = CALG_RC4,
|
||||
DWORD dwFlags = CRYPT_EXPORTABLE) throw();
|
||||
}; // class CCryptDerivedKey
|
||||
|
||||
// class CCryptRandomKey
|
||||
// A randomly generated key. Can be used internally by a program
|
||||
// to protect data during execution, or can be exported with Crypt.Export
|
||||
//
|
||||
// Currently it is possible to pass in AT_KEYEXCHANGE or AT_SIGNATURE
|
||||
// for algid, but these two will generate keys for the current key set, and
|
||||
// the resulting handle can only be used for exporting and importing keys or
|
||||
// signing hashes.
|
||||
class CCryptRandomKey : public CCryptKey
|
||||
{
|
||||
public:
|
||||
HRESULT Initialize(
|
||||
CCryptProv &Prov,
|
||||
ALG_ID algid = CALG_RC4,
|
||||
DWORD dwFlags = CRYPT_EXPORTABLE) throw();
|
||||
}; // class CCryptRandomKey
|
||||
|
||||
// class CCryptUserExKey
|
||||
// Obtains the user's key exchange key pair.
|
||||
class CCryptUserExKey : public CCryptKey
|
||||
{
|
||||
public:
|
||||
HRESULT Initialize(CCryptProv &Prov) throw();
|
||||
HRESULT Create(CCryptProv &Prov) throw();
|
||||
}; // class CCryptUserExKey
|
||||
|
||||
// class CCryptUserSigKey
|
||||
// Obtains the user's signature key pair
|
||||
class CCryptUserSigKey : public CCryptKey
|
||||
{
|
||||
public:
|
||||
HRESULT Initialize(CCryptProv &Prov) throw();
|
||||
HRESULT Create(CCryptProv &Prov) throw();
|
||||
}; // class CCryptUserSigKey
|
||||
|
||||
// class CCryptImportKey
|
||||
// Forms a key from an imported key blob
|
||||
class CCryptImportKey : public CCryptKey
|
||||
{
|
||||
public:
|
||||
HRESULT Initialize(
|
||||
CCryptProv &Prov,
|
||||
BYTE * pbData,
|
||||
DWORD dwDataLen,
|
||||
CCryptKey &PubKey,
|
||||
DWORD dwFlags) throw();
|
||||
}; // class CCryptImportKey
|
||||
|
||||
|
||||
// class CCryptHash
|
||||
// A generic hash that may or may not take a key.
|
||||
class CCryptKeyedHash : public CCryptHash
|
||||
{
|
||||
public:
|
||||
|
||||
HRESULT Initialize(CCryptProv &Prov, ALG_ID Algid, CCryptKey &Key, DWORD dwFlags) throw();
|
||||
}; // class CCryptKeyedHash
|
||||
|
||||
// class CCryptMD5Hash
|
||||
// RSA's MD5 hash (RSA's most recent hash as of 9/7/99);
|
||||
class CCryptMD5Hash : public CCryptHash
|
||||
{
|
||||
public:
|
||||
|
||||
HRESULT Initialize(CCryptProv &Prov, LPCTSTR szText = NULL) throw();
|
||||
}; // class CCryptMD5Hash
|
||||
|
||||
// class CCryptMD4Hash
|
||||
// RSA's MD4 hash
|
||||
class CCryptMD4Hash : public CCryptHash
|
||||
{
|
||||
public:
|
||||
|
||||
HRESULT Initialize(CCryptProv &Prov, LPCTSTR szText = NULL) throw();
|
||||
}; // class CCryptMD4Hash
|
||||
|
||||
|
||||
// class CCryptMD2Hash
|
||||
// RSA's MD2 hash
|
||||
class CCryptMD2Hash : public CCryptHash
|
||||
{
|
||||
public:
|
||||
|
||||
HRESULT Initialize(CCryptProv &Prov, LPCTSTR szText = NULL) throw();
|
||||
}; // class CCryptMD2Hash
|
||||
|
||||
|
||||
// class CCryptSHAHash
|
||||
// The Secure Hash Algorithm hash, from NIST and NSA. Technically, SHA-1.
|
||||
class CCryptSHAHash : public CCryptHash
|
||||
{
|
||||
public:
|
||||
|
||||
HRESULT Initialize(CCryptProv &Prov, LPCTSTR szText = NULL) throw();
|
||||
}; // class CCryptSHAHash
|
||||
|
||||
// The Secure Hash Algorithm, from NIST and NSA. Identical to CCryptSHA
|
||||
typedef CCryptSHAHash CCryptSHA1Hash;
|
||||
|
||||
|
||||
// class CCryptHMACHash
|
||||
// Hash-base Message Authentication Code keyed hash
|
||||
class CCryptHMACHash : public CCryptHash
|
||||
{
|
||||
public:
|
||||
HRESULT Initialize(CCryptProv &Prov, CCryptKey &Key, LPCTSTR szText = NULL) throw();
|
||||
}; // class CCryptHMACHash
|
||||
|
||||
// class CCryptMACHash
|
||||
// Message Authentication Code keyed hash. Believed to be less secure than HMAC
|
||||
class CCryptMACHash : public CCryptHash
|
||||
{
|
||||
public:
|
||||
HRESULT Initialize(CCryptProv &Prov, CCryptKey &Key, LPCTSTR szText = NULL) throw();
|
||||
}; // class CCryptMACHash
|
||||
|
||||
// class CCryptSSL3SHAMD5Hash
|
||||
// Hash algorithm used by Secure Socket Layer
|
||||
class CCryptSSL3SHAMD5Hash : public CCryptHash
|
||||
{
|
||||
public:
|
||||
HRESULT Initialize(CCryptProv &Prov, CCryptKey &Key, LPCTSTR szText = NULL) throw();
|
||||
}; // class CCryptSSl3SHAMD5Hash
|
||||
|
||||
}; // namespace ATL
|
||||
|
||||
|
||||
#include <atlcrypt.inl>
|
||||
#pragma pack(pop)
|
||||
#endif // __ATLCRYPT_H__
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,725 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#ifndef __ATLHTTP_H__
|
||||
#define __ATLHTTP_H__
|
||||
|
||||
#pragma once
|
||||
#ifndef __CPPUNWIND
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4702)
|
||||
#endif
|
||||
#ifndef _WINSOCKAPI_
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
#include <atlutil.h>
|
||||
#include <atlisapi.h>
|
||||
#include <atlcoll.h>
|
||||
#include <atlfile.h>
|
||||
#define SECURITY_WIN32
|
||||
#include <security.h>
|
||||
#include <atlenc.h>
|
||||
#ifndef _ATL_NO_DEFAULT_LIBS
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
#pragma comment(lib, "SECUR32.LIB")
|
||||
#endif // !_ATL_NO_DEFAULT_LIBS
|
||||
|
||||
#include <atlspriv.h>
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4625) // copy constructor could not be generated because a base class copy constructor is inaccessible
|
||||
#pragma warning(disable: 4626) // assignment operator could not be generated because a base class assignment operator is inaccessible
|
||||
|
||||
#pragma pack(push,_ATL_PACKING)
|
||||
namespace ATL {
|
||||
|
||||
template <class TSocketClass>
|
||||
class CAtlHttpClientT;
|
||||
class CAtlBaseAuthObject;
|
||||
|
||||
enum status_headerparse{
|
||||
ATL_HEADER_PARSE_COMPLETE=0,
|
||||
ATL_HEADER_PARSE_HEADERNOTCOMPLETE,
|
||||
ATL_HEADER_PARSE_HEADERERROR
|
||||
};
|
||||
|
||||
enum readstate{rs_init=0, rs_readheader, rs_scanheader, rs_readbody, rs_complete};
|
||||
|
||||
#define ATL_HEADER_END "\r\n\r\n"
|
||||
#define ATL_HEADER_END_LEN 4
|
||||
#define ATL_DW_HEADER_END 0x0a0d0a0d
|
||||
#define ATL_FIELDNAME_DELIMITER _T(':')
|
||||
#define ATL_MAX_FIELDNAME_LEN 1024
|
||||
#define ATL_MAX_VALUE_LEN 1024
|
||||
#define ATL_AUTH_HDR_SIZE 1024
|
||||
#define ATL_READ_BUFF_SIZE 2048
|
||||
#define ATL_INVALID_STATUS -1
|
||||
#define ATL_HTTP_HEADER _T(" HTTP/1.1\r\n")
|
||||
#define ATL_HTTP_HEADER_PROXY _T(" HTTP/1.1\r\n")
|
||||
#ifndef ATL_HTTP_USERAGENT
|
||||
#define ATL_HTTP_USERAGENT _T("User-Agent: Microsoft-ATL-Native/") _T(_ATL_VER_RBLD) _T("\r\n")
|
||||
#endif
|
||||
|
||||
#define ATL_IS_INVALIDCREDHANDLE(x) ((x.dwLower==0xFFFFFFFF) && (x.dwUpper==0xFFFFFFFF))
|
||||
#define ATL_HTTP_AUTHTYPE_NTLM _T("NTLM")
|
||||
#define ATL_HTTP_AUTHTYPE_BASIC _T("BASIC")
|
||||
#define ATL_HTTP_METHOD_GET _T("GET")
|
||||
#define ATL_HTTP_METHOD_POST _T("POST")
|
||||
|
||||
#ifndef MAX_REALM_LEN
|
||||
#define MAX_REALM_LEN 1024
|
||||
#endif
|
||||
|
||||
#ifndef _ATL_MAX_AUTH_BUFF
|
||||
#define _ATL_MAX_AUTH_BUFF 512
|
||||
#endif
|
||||
|
||||
__interface IAuthInfo;
|
||||
typedef bool (WINAPI *PFNATLCHUNKEDCB)(BYTE** ppData, DWORD *pdwSize, DWORD_PTR dwParam);
|
||||
typedef bool (WINAPI *PFNATLSTATUSCALLBACK)(DWORD dwBytesSent, DWORD_PTR dwParam);
|
||||
|
||||
#define ATL_HTTP_FLAG_AUTO_REDIRECT 0x1
|
||||
#define ATL_HTTP_FLAG_PROCESS_RESULT 0x2
|
||||
#define ATL_HTTP_FLAG_SEND_CALLBACK 0x4
|
||||
#define ATL_HTTP_FLAG_SEND_BLOCKS 0x8
|
||||
#define ATL_HTTP_FLAG_INVALID_FLAGS 0xFFFFFFFF
|
||||
|
||||
#ifndef ATL_HTTP_DEFAULT_BLOCK_SIZE
|
||||
#define ATL_HTTP_DEFAULT_BLOCK_SIZE 4096
|
||||
#endif
|
||||
|
||||
#define ATL_HTTP_CLIENT_EMPTY_READ_RETRIES 5
|
||||
|
||||
struct ATL_NAVIGATE_DATA
|
||||
{
|
||||
LPCTSTR szExtraHeaders;
|
||||
LPCTSTR szMethod;
|
||||
LPCTSTR szDataType;
|
||||
DWORD dwDataLen;
|
||||
DWORD dwFlags;
|
||||
DWORD dwTimeout;
|
||||
DWORD dwSendBlockSize;
|
||||
DWORD dwReadBlockSize;
|
||||
DWORD_PTR m_lParamSend;
|
||||
DWORD_PTR m_lParamRead;
|
||||
DWORD_PTR m_lParamChunkCB;
|
||||
short nPort;
|
||||
BYTE *pData;
|
||||
PFNATLCHUNKEDCB pfnChunkCallback;
|
||||
PFNATLSTATUSCALLBACK pfnSendStatusCallback;
|
||||
PFNATLSTATUSCALLBACK pfnReadStatusCallback;
|
||||
};
|
||||
|
||||
class CAtlNavigateData : public ATL_NAVIGATE_DATA
|
||||
{
|
||||
public:
|
||||
CAtlNavigateData() throw(); // public construction
|
||||
CAtlNavigateData(const CAtlNavigateData &rhs);
|
||||
CAtlNavigateData(const ATL_NAVIGATE_DATA &rhs);
|
||||
CAtlNavigateData& operator=(const CAtlNavigateData &rhs);
|
||||
CAtlNavigateData& operator=(const ATL_NAVIGATE_DATA &rhs);
|
||||
DWORD SetFlags(DWORD dwNewFlags) throw(); // set all flags
|
||||
DWORD GetFlags() throw(); // get value of flags
|
||||
DWORD AddFlags(DWORD dwFlagsToAdd) throw(); // add one or more flags to existing flags
|
||||
DWORD RemoveFlags(DWORD dwFlagsToRemove) throw(); // remove one or more flags from existing flags
|
||||
LPCTSTR SetExtraHeaders(LPCTSTR szNewHeaders) throw(); // set the extra request headers
|
||||
LPCTSTR GetExtraHeaders() throw(); // get the extra request headers
|
||||
LPCTSTR SetMethod(LPCTSTR szNewMethod) throw(); // set the HTTP request method
|
||||
LPCTSTR GetMethod() throw(); // get the HTTP request method
|
||||
short SetPort(short newPort) throw(); // set the TCP port for this request
|
||||
short GetPort() throw(); // get the TCP port for this request
|
||||
void SetPostData(BYTE *pData, DWORD dwDataLen, LPCTSTR szDataType) throw(); // Set data to be sent as the reqeust entity body
|
||||
DWORD SetSocketTimeout(DWORD dwNewTimeout) throw(); // Set the timeout for this socket
|
||||
DWORD GetSocketTimeout() throw(); // Get the timeout for this socket
|
||||
DWORD SetSendBlockSize(DWORD dwBlockSize) throw(); // Set the size of the blocks used to send data
|
||||
DWORD GetSendBlockSize() throw(); // get the size of the blocks used to send data
|
||||
DWORD SetReadBlockSize(DWORD dwBlockSize) throw(); // Set the size of the blocks used to send data
|
||||
DWORD GetReadBlockSize() throw(); // get the size of the blocks used to send data
|
||||
PFNATLCHUNKEDCB SetChunkCallback(PFNATLCHUNKEDCB pfn, DWORD_PTR dwParam) throw(); // set the callback function used for sending chunked data
|
||||
PFNATLCHUNKEDCB GetChunkCallback() throw(); // get the chunked callback function
|
||||
PFNATLSTATUSCALLBACK SetSendStatusCallback(PFNATLSTATUSCALLBACK pfn, DWORD_PTR dwData) throw(); // sets a function pointer to be called after bytes are sent over the socket
|
||||
PFNATLSTATUSCALLBACK GetSendStatusCallback() throw(); // returns current status callback function
|
||||
PFNATLSTATUSCALLBACK SetReadStatusCallback(PFNATLSTATUSCALLBACK pfn, DWORD_PTR dwData) throw();
|
||||
PFNATLSTATUSCALLBACK GetReadStatusCallback() throw();
|
||||
};
|
||||
|
||||
template <class TSocketClass>
|
||||
class CAtlHttpClientT :
|
||||
private TSocketClass
|
||||
{
|
||||
public:
|
||||
CAtlHttpClientT() throw();
|
||||
virtual ~CAtlHttpClientT()
|
||||
{
|
||||
}
|
||||
|
||||
// Use these functions to send an HTTP request and retrieve
|
||||
// the response.
|
||||
bool Navigate(
|
||||
const CUrl* pUrl,
|
||||
ATL_NAVIGATE_DATA *pNavData = NULL
|
||||
) throw(...);
|
||||
|
||||
bool Navigate(
|
||||
LPCTSTR szServer,
|
||||
LPCTSTR szPath,
|
||||
ATL_NAVIGATE_DATA *pNavData = NULL
|
||||
) throw(...);
|
||||
|
||||
bool Navigate(
|
||||
LPCTSTR szURL,
|
||||
ATL_NAVIGATE_DATA *pNavData = NULL
|
||||
) throw(...);
|
||||
|
||||
|
||||
// Performs navigation, sending data with Transfer-Coding: chunked
|
||||
bool NavigateChunked(
|
||||
const CUrl *pUrl,
|
||||
ATL_NAVIGATE_DATA *pData
|
||||
) throw();
|
||||
|
||||
bool NavigateChunked(
|
||||
LPCTSTR szServer,
|
||||
LPCTSTR szPath,
|
||||
ATL_NAVIGATE_DATA *pNavData
|
||||
) throw();
|
||||
|
||||
bool NavigateChunked(
|
||||
LPCTSTR szURL,
|
||||
ATL_NAVIGATE_DATA *pNavData
|
||||
) throw();
|
||||
|
||||
// Use to set/retrieve information about the proxy server used
|
||||
// when making this request via a proxy server.
|
||||
bool SetProxy(LPCTSTR szProxy = NULL, short nProxyPort = 0) throw();
|
||||
void RemoveProxy() throw();
|
||||
LPCTSTR GetProxy() const throw();
|
||||
short GetProxyPort() const throw();
|
||||
|
||||
// Use these functions to add/remove/find objects that will
|
||||
// be used to authorize request when a 401 Not Authorized response
|
||||
// is received. This class maps these objects by scheme name in map.
|
||||
// Override NegotiateAuth to change the way authorization negotiation occurs.
|
||||
bool AddAuthObj(LPCTSTR szScheme, CAtlBaseAuthObject *pObject, IAuthInfo *pInfo=NULL) throw();
|
||||
const CAtlBaseAuthObject* FindAuthObject(LPCTSTR szScheme) throw();
|
||||
bool RemoveAuthObject(LPCTSTR szScheme) throw();
|
||||
virtual bool NegotiateAuth(bool bProxy) throw();
|
||||
|
||||
|
||||
// Retrieve the value of a response header
|
||||
bool GetHeaderValue(LPCTSTR szName, CString& strValue) const throw();
|
||||
bool GetHeaderValue(__in_z LPCTSTR szName, __out_ecount_part_z_opt(*pdwLen, *pdwLen) LPTSTR szBuffer, __inout DWORD *pdwLen) const throw();
|
||||
|
||||
DWORD GetResponseLength() throw(); // Get the number of bytes in the response
|
||||
const BYTE* GetResponse() throw(); // Get the entire response
|
||||
DWORD GetBodyLength() const throw(); // Get the length of the body of the response (everything after the \r\n\r\n)
|
||||
const BYTE* GetBody() throw(); // Get the body of the response (length is determined by GetBodyLength())
|
||||
DWORD GetRawResponseHeaderLength() throw(); // Get the length of the raw request headers
|
||||
bool GetRawResponseHeader(LPBYTE szBuffer, DWORD *pdwLen) throw(); // Get the raw request headers
|
||||
LPCURL GetCurrentUrl() const throw(); // Get a pointer to the current URL for this request
|
||||
DWORD GetFlags() const throw(); // Retrieve flags used for processing this request
|
||||
int GetStatus() throw(); // Get the HTTP status code that resulted from making this request
|
||||
LPCTSTR GetMethod() throw(); // Get the HTTP method used for making this request
|
||||
BYTE* GetPostData() throw(); // Get a pointer to raw data being sent with this request
|
||||
DWORD GetPostDataLen() throw(); // Get the length of the raw data sent with this request
|
||||
LPCTSTR GetPostDataType() throw(); // Get the data type (sent as Content-Type header) for this request
|
||||
DWORD GetLastError() throw(); // Retrieves errors from the underlying socket
|
||||
const SOCKET& GetSocket() throw(); // Retrieves the underlying socket. Be careful!
|
||||
void Close() throw(); // Close the connection
|
||||
DWORD SetSocketTimeout(DWORD dwNewTimeout) throw(); // Sets a new socket timeout, returns the old timeout.
|
||||
DWORD GetSocketTimeout() throw(); // retrieves the current socket timeout
|
||||
void AuthProtocolFailed(LPCTSTR szProto) throw(); // notifies us of failure to connect with the named protocol
|
||||
const ATL_NAVIGATE_DATA* GetCurrentNavdata();
|
||||
enum HTTP_RESPONSE_READ_STATUS
|
||||
{
|
||||
RR_OK = 0, // response was successfully processed
|
||||
RR_FAIL, // an unknown error occurred reading the HTTP response
|
||||
RR_STATUS_INVALID, // could not parse the status line
|
||||
RR_PARSEHEADERS_FAILED, // failed to parse HTTP response headers
|
||||
RR_READSOCKET_FAILED, // failed to read response data from socket
|
||||
RR_READBODY_FAILED, // failed to successfully read the entity body of the HTTP response
|
||||
RR_READCHUNKEDBODY_FAILED, // failed to read a 'Transfer-Encoding: chunked' response body
|
||||
RR_NOT_READ // we haven't started reading the response.
|
||||
};
|
||||
HTTP_RESPONSE_READ_STATUS GetResponseStatus();
|
||||
|
||||
|
||||
// Implementation
|
||||
HTTP_RESPONSE_READ_STATUS ReadHttpResponse() throw();
|
||||
void ResetConnection() throw();
|
||||
bool ProcessStatus(DWORD dwFlags) throw();
|
||||
bool BuildRequest(/*out*/CString *pstrRequest,
|
||||
LPCTSTR szDataType=NULL,
|
||||
LPCTSTR szExtraHeaders=NULL) throw();
|
||||
|
||||
void SetSilentLogonOk(bool bSet)
|
||||
{
|
||||
m_bSilentLogonOk = bSet;
|
||||
}
|
||||
protected:
|
||||
DWORD WriteWithNoData(LPCSTR pRequest, DWORD dwRequestLen);
|
||||
DWORD WriteWithCallback(LPCSTR pRequest, DWORD dwRequestLen);
|
||||
DWORD WriteWithChunks(LPCSTR pRequest, DWORD dwRequestLen);
|
||||
DWORD WriteWithData(LPCSTR pRequest, DWORD dwRequestLen);
|
||||
bool SetDefaultUrl(LPCTSTR szUrl, short nPortNumber=ATL_URL_DEFAULT_HTTP_PORT) throw();
|
||||
bool SetDefaultUrl(LPCURL pUrl, short nPortNumber=ATL_URL_DEFAULT_HTTP_PORT) throw();
|
||||
bool SetDefaultMethod(LPCTSTR szMethod) throw();
|
||||
void InitializeObject() throw();
|
||||
void ResetRequest() throw();
|
||||
bool ReadSocket() throw();
|
||||
unsigned char* FindHeaderEnd(unsigned char** ppBegin) throw();
|
||||
bool LookupRegProxy() throw();
|
||||
bool DisconnectIfRequired() throw();
|
||||
bool ConnectSocket() throw();
|
||||
|
||||
long GetContentLength() throw();
|
||||
LPCSTR NextLine(BYTE* pCurr) throw();
|
||||
bool IsMsgBodyChunked() throw();
|
||||
LPCSTR FindEndOfHeader(LPCSTR pszStart) throw();
|
||||
bool DecodeHeader(LPCSTR pHeaderStart, LPCSTR pHeaderEnd) throw();
|
||||
virtual void OnSetCookie(LPCTSTR /*szCookie*/) throw();
|
||||
LPCSTR ParseStatusLine(BYTE* pBuffer) throw();
|
||||
int CrackResponseHeader(LPCSTR pBuffer, /*out*/ LPCSTR *pEnd) throw();
|
||||
bool ReadBody(int nContentLen, int nCurrentBodyLen) throw();
|
||||
bool ReadChunkedBody() throw();
|
||||
bool ReconnectIfRequired() throw();
|
||||
bool CompleteURL(CString& strURL) throw();
|
||||
bool ProcessObjectMoved() throw();
|
||||
bool _SetDefaultUrl(LPCTSTR szURL, short nPort) throw();
|
||||
|
||||
enum CHUNK_STATE{
|
||||
READ_CHUNK_SIZE, // need to read the size of a chunk.
|
||||
READ_CHUNK_SIZE_FOOTER,
|
||||
READ_CHUNK_DATA, // need to read the actual data
|
||||
READ_CHUNK_DATA_FOOTER, // need to read the chunk footer.
|
||||
READ_CHUNK_TRAILER, // Read the trailer headers at the end of the chunk data
|
||||
READ_CHUNK_TRAILER_FOOTER, // read the final crlf
|
||||
CHUNK_READ_DATA_COMPLETE, // done reading chunk data.
|
||||
};
|
||||
|
||||
enum CHUNK_LEX_RESULT{
|
||||
LEX_OK,
|
||||
LEX_OUTOFDATA,
|
||||
LEX_ERROR,
|
||||
LEX_TRAILER_COMPLETE
|
||||
};
|
||||
|
||||
CHUNK_LEX_RESULT get_chunked_size(__deref_inout char *&pBuffStart, __deref_inout char *&pBuffEnd, __inout long* pnChunkSize) throw();
|
||||
bool move_leftover_bytes(__in_ecount(nLen) char *pBufferStart, __in int nLen, __deref_inout char *&pBuffStart, __deref_inout char *&pBuffEnd) throw();
|
||||
CHUNK_LEX_RESULT get_chunked_data(__deref_inout char *&pBufferStart, __deref_inout char *&pBufferEnd, long nChunkSize,
|
||||
__deref_out_ecount_part(*pnDataLen, *pnDataLen) char **ppDataStart, __inout long *pnDataLen) throw();
|
||||
CHUNK_LEX_RESULT consume_chunk_trailer(__deref_inout char *&pBufferStart, __deref_inout char *pBufferEnd) throw();
|
||||
CHUNK_LEX_RESULT consume_chunk_footer(__deref_inout char *&pBufferStart, __deref_inout char *&pBufferEnd) throw();
|
||||
|
||||
typedef CAtlMap<
|
||||
CString,
|
||||
CString,
|
||||
CStringElementTraitsI<CString>,
|
||||
CStringElementTraitsI<CString>
|
||||
> HeaderMapType;
|
||||
|
||||
typedef CAtlMap <
|
||||
CString,
|
||||
CAtlBaseAuthObject*,
|
||||
CStringElementTraitsI<CString>
|
||||
> AuthMapType;
|
||||
|
||||
typedef CAtlArray<
|
||||
CString,
|
||||
CStringElementTraitsI<CString>
|
||||
> AuthListType;
|
||||
|
||||
HeaderMapType m_HeaderMap; // Map of response headers
|
||||
AuthMapType m_AuthMap; // Map of pointers to authorization objects.
|
||||
AuthListType m_AuthTypes; // list of authorization types the server is willing to use.
|
||||
BOOL m_bSilentLogonOk;
|
||||
CAtlIsapiBuffer<> m_current; // The entire response
|
||||
CUrl m_urlCurrent; // URL of current request
|
||||
|
||||
CString m_strMethod; // Current request method.
|
||||
CString m_strProxy; // Path to current proxy server.
|
||||
|
||||
long m_nStatus; // Current response status (from status line)
|
||||
short m_nProxyPort; // Port used on current proxy server
|
||||
DWORD m_dwBodyLen; // Length of body
|
||||
DWORD m_dwHeaderLen; // Length of current raw headers
|
||||
DWORD m_dwHeaderStart;
|
||||
BYTE *m_pCurrent;
|
||||
BYTE *m_pEnd; // the end of the data we've read fromt he socket;
|
||||
ATL_NAVIGATE_DATA *m_pNavData;
|
||||
HTTP_RESPONSE_READ_STATUS m_LastResponseParseError;
|
||||
}; //CAtlHttpClientT
|
||||
typedef CAtlHttpClientT<ZEvtSyncSocket> CAtlHttpClient;
|
||||
|
||||
|
||||
// Interface used to acquire authentication information from clients
|
||||
__interface IAuthInfo
|
||||
{
|
||||
HRESULT GetPassword(__out_ecount_part_z_opt(*pdwBuffSize, *pdwBuffSize) LPTSTR szPwd, __inout DWORD *pdwBuffSize);
|
||||
HRESULT GetUsername(__out_ecount_part_z_opt(*pdwBuffSize, *pdwBuffSize) LPTSTR szUid, __inout DWORD *pdwBuffSize);
|
||||
HRESULT GetDomain(__out_ecount_part_z_opt(*pdwBuffSize, *pdwBuffSize) LPTSTR szDomain, __inout DWORD *pdwBuffSize);
|
||||
};
|
||||
typedef HRESULT (IAuthInfo::*PFNAUTHFUNC)(LPTSTR szPwd, DWORD *pdwSize);
|
||||
|
||||
// pure virtual class that describes required functions for authoriztion
|
||||
// objects
|
||||
class CAtlBaseAuthObject
|
||||
{
|
||||
public:
|
||||
CAtlBaseAuthObject();
|
||||
virtual bool Authenticate(LPCTSTR szAuthTypes, bool bProxy) = 0;
|
||||
virtual void Init(CAtlHttpClient *pSocket, IAuthInfo *pAuthInfo) = 0;
|
||||
bool m_bFailed;
|
||||
};
|
||||
|
||||
// strings used for authentication.
|
||||
extern __declspec(selectany)const TCHAR * const g_pszWWWAuthenticate = _T("www-authenticate");
|
||||
extern __declspec(selectany)const TCHAR * const g_pszProxyAuthenticate = _T("proxy-authenticate");
|
||||
|
||||
// Performs NTLM authentication
|
||||
class CNTLMAuthObject :
|
||||
public CAtlBaseAuthObject
|
||||
{
|
||||
public:
|
||||
virtual ~CNTLMAuthObject() throw();
|
||||
CNTLMAuthObject() throw();
|
||||
CNTLMAuthObject(IAuthInfo *pAuthInfo) throw();
|
||||
void SetAuthInfo(IAuthInfo *pAuthInfo) throw();
|
||||
bool GetCredentialNames(CString& theName);
|
||||
|
||||
// Implementation
|
||||
// Called by the CAtlHttpClient class to authenticate a user.
|
||||
virtual void Init(CAtlHttpClient *pSocket, IAuthInfo *pAuthInfo=NULL) throw();
|
||||
|
||||
// Called by the CAtlHttpClient class to initialize this authentication object.
|
||||
virtual bool Authenticate(LPCTSTR szAuthTypes, bool bProxy) throw();
|
||||
protected:
|
||||
bool AcquireCredHandle() throw();
|
||||
// This function creates an NTML Authorization header
|
||||
// and sends it to the HTTP server.
|
||||
bool SendSecurityInfo(SecBuffer *pSecBuffer, LPSTR *pszBuffer) throw();
|
||||
bool DoNTLMAuthenticate() throw();
|
||||
|
||||
IAuthInfo *m_pAuthInfo;
|
||||
CAtlHttpClient *m_pSocket;
|
||||
CredHandle m_hCredentials;
|
||||
int m_nMaxTokenSize;
|
||||
TimeStamp m_ts;
|
||||
bool m_bProxy;
|
||||
static const char * const m_pszFmtWWW;
|
||||
static const char * const m_pszFmtProxy;
|
||||
CAtlNavigateData m_CurrentRequestData;
|
||||
|
||||
}; // CNTLMAuthObject
|
||||
|
||||
// Performs BASIC authentication for an CAtlHttpClient
|
||||
// object. Caller must implement an IAuthInfo interface
|
||||
// and pass it to this object before this object attempts
|
||||
// to authenticate or authentication will fail.
|
||||
class CBasicAuthObject :
|
||||
public CAtlBaseAuthObject
|
||||
{
|
||||
public:
|
||||
CBasicAuthObject() throw();
|
||||
CBasicAuthObject(IAuthInfo *pAuthInfo) throw();
|
||||
void SetAuthInfo(IAuthInfo *pAuthInfo) throw();
|
||||
LPCTSTR GetRealm() throw(); // Retrieve's the realm being used.
|
||||
|
||||
// Implementation
|
||||
// Called by the CAtlHttpClient class to authenticate a user.
|
||||
virtual bool Authenticate(LPCTSTR szAuthTypes, bool bProxy) throw();
|
||||
|
||||
// Called by the CAtlHttpClient class to initialize this authentication object.
|
||||
virtual void Init(CAtlHttpClient *pSocket, IAuthInfo *pAuthInfo=NULL) throw();
|
||||
protected:
|
||||
bool DoBasicAuthenticate() throw();
|
||||
bool CrackRealm(LPCTSTR szHeader) throw();
|
||||
|
||||
IAuthInfo *m_pAuthInfo;
|
||||
CAtlHttpClient *m_pClient;
|
||||
TCHAR m_szRealm[MAX_REALM_LEN];
|
||||
bool m_bProxy;
|
||||
static const char * const m_pszFmtWWW;
|
||||
static const char * const m_pszFmtProxy;
|
||||
}; // CBasicAuthObject
|
||||
|
||||
__declspec(selectany)const char * const CBasicAuthObject::m_pszFmtWWW = "Authorization: Basic ";
|
||||
__declspec(selectany)const char * const CBasicAuthObject::m_pszFmtProxy = "Proxy-Authorization: Basic ";
|
||||
__declspec(selectany)const char * const CNTLMAuthObject::m_pszFmtWWW = "Authorization: NTLM %s\r\n";
|
||||
__declspec(selectany)const char * const CNTLMAuthObject::m_pszFmtProxy = "Proxy-Authorization: NTLM %s\r\n";
|
||||
|
||||
typedef CTempBuffer<TCHAR, _ATL_MAX_AUTH_BUFF> CAuthInfoBuffType;
|
||||
inline bool _AtlGetAuthInfoHelper(IAuthInfo *pObj, PFNAUTHFUNC pFunc, CAuthInfoBuffType& buff, DWORD *dwLen) throw()
|
||||
{
|
||||
ATLENSURE_RETURN_VAL(pObj, false);
|
||||
ATLENSURE_RETURN_VAL(pFunc, false);
|
||||
DWORD dwSize = _ATL_MAX_AUTH_BUFF;
|
||||
bool bRet = true;
|
||||
TCHAR *szValue = NULL;
|
||||
_ATLTRY
|
||||
{
|
||||
szValue = buff.Allocate(_ATL_MAX_AUTH_BUFF);
|
||||
HRESULT hr = E_FAIL;
|
||||
if (szValue)
|
||||
{
|
||||
hr = (pObj->*pFunc)(szValue, &dwSize);
|
||||
if (hr != S_OK)
|
||||
{
|
||||
if (hr == E_OUTOFMEMORY)
|
||||
{
|
||||
// buffer not big enough, try to allocate
|
||||
szValue = buff.Reallocate(dwSize);
|
||||
if (szValue)
|
||||
{
|
||||
// retry the call
|
||||
if (S_OK != (pObj->*pFunc)(szValue, &dwSize))
|
||||
bRet = false;
|
||||
}
|
||||
else
|
||||
bRet = false;
|
||||
}
|
||||
else
|
||||
bRet = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
bRet = false;
|
||||
|
||||
}
|
||||
_ATLCATCHALL()
|
||||
{
|
||||
bRet = false;
|
||||
}
|
||||
if (bRet)
|
||||
*dwLen = (DWORD)_tcslen(szValue);
|
||||
else
|
||||
*dwLen = 0;
|
||||
return bRet;
|
||||
}
|
||||
|
||||
//
|
||||
// Security Service Provider Interface (sspi) Helper classes
|
||||
// These classes are used as helpers for structures used in
|
||||
// SSPI functions.
|
||||
//
|
||||
class CSecAuthIdentity : public SEC_WINNT_AUTH_IDENTITY_EX
|
||||
{
|
||||
public:
|
||||
CSecAuthIdentity() throw()
|
||||
{
|
||||
Version = SEC_WINNT_AUTH_IDENTITY_VERSION;
|
||||
Length = sizeof(SEC_WINNT_AUTH_IDENTITY_EX);
|
||||
#ifdef _UNICODE
|
||||
Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
|
||||
#else
|
||||
Flags = SEC_WINNT_AUTH_IDENTITY_ANSI;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
bool Init(IAuthInfo *pAuthInfo) throw()
|
||||
{
|
||||
if (!pAuthInfo)
|
||||
return false;
|
||||
|
||||
if (!_AtlGetAuthInfoHelper(pAuthInfo, &IAuthInfo::GetUsername, buffUserName, &UserLength))
|
||||
return false;
|
||||
|
||||
if (!_AtlGetAuthInfoHelper(pAuthInfo, &IAuthInfo::GetPassword, buffPassword, &PasswordLength))
|
||||
return false;
|
||||
|
||||
if (!_AtlGetAuthInfoHelper(pAuthInfo, &IAuthInfo::GetDomain, buffDomain, &DomainLength))
|
||||
return false;
|
||||
|
||||
#ifndef _UNICODE
|
||||
User = (unsigned char*)(char*)buffUserName;
|
||||
Domain = DomainLength > 0 ? (unsigned char*)(char*)buffDomain : 0;
|
||||
Password = PasswordLength > 0 ? (unsigned char*)(char*)buffPassword : 0;
|
||||
#else
|
||||
// have to cast to unsigned short *, because SEC_WINNT_AUTH_IDENTITY_EXW
|
||||
// uses unsigned short instead of wchar_t
|
||||
User = (unsigned short *)(wchar_t*)buffUserName;
|
||||
Domain = DomainLength > 0 ? (unsigned short *)(wchar_t*)buffDomain : 0;
|
||||
Password = PasswordLength > 0 ? (unsigned short *)(wchar_t*)buffPassword : 0;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
CAuthInfoBuffType buffUserName;
|
||||
CAuthInfoBuffType buffPassword;
|
||||
CAuthInfoBuffType buffDomain;
|
||||
}; // CSecAuthIdentity
|
||||
|
||||
class CSecBuffer : public SecBuffer
|
||||
{
|
||||
public:
|
||||
CSecBuffer() throw()
|
||||
{
|
||||
cbBuffer = 0;
|
||||
BufferType = 0;
|
||||
pvBuffer = NULL;
|
||||
m_cbAlloc = 0;
|
||||
}
|
||||
|
||||
~CSecBuffer() throw()
|
||||
{
|
||||
delete [] static_cast<unsigned char*>(pvBuffer);
|
||||
}
|
||||
|
||||
bool SetSize(unsigned long nSize) throw()
|
||||
{
|
||||
if (!nSize)
|
||||
return false;
|
||||
|
||||
if (pvBuffer)
|
||||
{
|
||||
delete [] static_cast<unsigned char*>(pvBuffer);
|
||||
pvBuffer = NULL;
|
||||
cbBuffer = 0;
|
||||
m_cbAlloc = 0;
|
||||
}
|
||||
|
||||
ATLTRY(pvBuffer = static_cast<void*>(new unsigned char[nSize]));
|
||||
if (pvBuffer)
|
||||
{
|
||||
cbBuffer = nSize;
|
||||
BufferType = SECBUFFER_TOKEN;
|
||||
m_cbAlloc = cbBuffer;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ClearBuffer(unsigned long nSize) throw()
|
||||
{
|
||||
if(nSize > m_cbAlloc)
|
||||
return false;
|
||||
|
||||
ZeroMemory(pvBuffer, nSize);
|
||||
cbBuffer = nSize;
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned long Size()
|
||||
{
|
||||
return cbBuffer;
|
||||
}
|
||||
|
||||
unsigned char *Buffer() throw()
|
||||
{
|
||||
return static_cast<unsigned char*>(pvBuffer);
|
||||
}
|
||||
|
||||
operator SecBuffer*() throw()
|
||||
{
|
||||
return (SecBuffer*)this;
|
||||
}
|
||||
|
||||
protected:
|
||||
unsigned long m_cbAlloc;
|
||||
|
||||
}; // CSecBuffer
|
||||
|
||||
class CSecBufferDesc : public SecBufferDesc
|
||||
{
|
||||
public:
|
||||
CSecBufferDesc() throw()
|
||||
{
|
||||
ulVersion = SECBUFFER_VERSION;
|
||||
cBuffers = 0;
|
||||
pBuffers = NULL;
|
||||
}
|
||||
|
||||
~CSecBufferDesc() throw()
|
||||
{
|
||||
cBuffers = 0;
|
||||
|
||||
if (pBuffers)
|
||||
{
|
||||
CSecBuffer *psb = (CSecBuffer*)pBuffers;
|
||||
delete [] psb;
|
||||
}
|
||||
}
|
||||
|
||||
// index is 0 based
|
||||
CSecBuffer* Buffers(unsigned int i) throw()
|
||||
{
|
||||
if (i < cBuffers)
|
||||
{
|
||||
return (CSecBuffer*)(&pBuffers[i]);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool AddBuffers(unsigned int nCount, unsigned int nBufferSize) throw()
|
||||
{
|
||||
if (!nCount)
|
||||
return true;
|
||||
|
||||
if (cBuffers == 0)
|
||||
{
|
||||
CSecBuffer *pSecBuffer = NULL;
|
||||
ATLTRY(pSecBuffer = new CSecBuffer[nCount]);
|
||||
if (!pSecBuffer)
|
||||
return false;
|
||||
CAutoVectorPtr<CSecBuffer> spSecBuffer(pSecBuffer);
|
||||
|
||||
for (unsigned int i=0; i<nCount; i++)
|
||||
{
|
||||
if (!pSecBuffer[i].SetSize(nBufferSize))
|
||||
return false;
|
||||
}
|
||||
cBuffers = nCount;
|
||||
pBuffers = (SecBuffer*)spSecBuffer.Detach();
|
||||
}
|
||||
else // realloc
|
||||
{
|
||||
CSecBuffer *pSecBuffer = NULL;
|
||||
ATLTRY(pSecBuffer = new CSecBuffer[nCount + cBuffers]);
|
||||
if (!pSecBuffer)
|
||||
return false;
|
||||
CAutoVectorPtr<CSecBuffer> spSecBuffer(pSecBuffer);
|
||||
Checked::memcpy_s(pSecBuffer, (nCount + cBuffers)*sizeof(CSecBuffer), pBuffers, cBuffers*sizeof(CSecBuffer));
|
||||
delete [] pBuffers;
|
||||
pBuffers=NULL;
|
||||
|
||||
// initialize new buffers
|
||||
for (unsigned int i=0; i<nCount; i++)
|
||||
{
|
||||
if (!pSecBuffer[cBuffers+i].SetSize(nBufferSize))
|
||||
return false;
|
||||
}
|
||||
pBuffers = spSecBuffer.Detach();
|
||||
cBuffers += nCount;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
operator PSecBufferDesc() throw()
|
||||
{
|
||||
return static_cast<PSecBufferDesc>(this);
|
||||
}
|
||||
}; // CSecBufferDesc
|
||||
|
||||
} // namespace ATL
|
||||
|
||||
|
||||
#include <atlhttp.inl>
|
||||
|
||||
#pragma pack(pop)
|
||||
#pragma warning(pop)
|
||||
|
||||
#ifndef __CPPUNWIND
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // __ATLHTTP_H__
|
||||
File diff suppressed because it is too large
Load Diff
10609
ATL90/include/atlisapi.h
10609
ATL90/include/atlisapi.h
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,663 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#ifndef __ATLPERF_H__
|
||||
#define __ATLPERF_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __cplusplus
|
||||
#error ATL requires C++ compilation (use a .cpp suffix)
|
||||
#endif
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlstr.h>
|
||||
#include <atlfile.h>
|
||||
#include <atlsync.h>
|
||||
#include <winperf.h>
|
||||
#include <atlcoll.h>
|
||||
#include <atlsecurity.h>
|
||||
|
||||
#ifndef _ATL_PERF_NOXML
|
||||
#include <atlenc.h>
|
||||
#include <oaidl.h>
|
||||
#include <xmldomdid.h>
|
||||
|
||||
/* xmldsodid and mshtmdid both have the same identifiers defined, with differing values. So we are renaming the XML ones since there are less identifiers dependent on those. */
|
||||
#ifdef DISPID_XOBJ_MIN
|
||||
/* in case the HTM one was included first, we'll undef these first */
|
||||
#define _ATL_MSHTMDID_INCLUDED_ALREADY
|
||||
#undef DISPID_XOBJ_MIN
|
||||
#undef DISPID_XOBJ_MAX
|
||||
#undef DISPID_XOBJ_BASE
|
||||
#endif
|
||||
|
||||
#include <xmldsodid.h>
|
||||
#include <msxmldid.h>
|
||||
|
||||
/* re-undef the clashing names, and their direct dependents */
|
||||
#undef DISPID_XOBJ_MIN
|
||||
#undef DISPID_XOBJ_MAX
|
||||
#undef DISPID_XOBJ_BASE
|
||||
#undef DISPID_XMLDSO
|
||||
#undef DISPID_XMLELEMENTCOLLECTION
|
||||
|
||||
/* re-def the clashing names, and their direct dependents, with un-clashed values */
|
||||
#define DISPID_XMLDSO_XOBJ_MIN 0x00010000
|
||||
#define DISPID_XMLDSO_XOBJ_MAX 0x0001FFFF
|
||||
#define DISPID_XMLDSO_XOBJ_BASE DISPID_XMLDSO_XOBJ_MIN
|
||||
#define DISPID_XMLDSO DISPID_XMLDSO_XOBJ_BASE
|
||||
#define DISPID_XMLELEMENTCOLLECTION DISPID_XMLDSO_XOBJ_BASE
|
||||
#ifdef _ATL_MSHTMDID_INCLUDED_ALREADY
|
||||
|
||||
/* redef the clashing names to the HTM values */
|
||||
#define DISPID_XOBJ_MIN 0x80010000
|
||||
#define DISPID_XOBJ_MAX 0x8001FFFF
|
||||
#define DISPID_XOBJ_BASE DISPID_XOBJ_MIN
|
||||
#endif
|
||||
#include <msxml.h>
|
||||
#endif
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4625) // copy constructor could not be generated because a base class copy constructor is inaccessible
|
||||
#pragma warning(disable: 4626) // assignment operator could not be generated because a base class assignment operator is inaccessible
|
||||
|
||||
|
||||
#pragma pack(push,_ATL_PACKING)
|
||||
namespace ATL
|
||||
{
|
||||
|
||||
const DWORD ATLPERF_SIZE_MASK = 0x00000300;
|
||||
const DWORD ATLPERF_TYPE_MASK = 0x00000C00;
|
||||
const DWORD ATLPERF_TEXT_MASK = 0x00010000;
|
||||
|
||||
#ifndef ATLPERF_DEFAULT_MAXINSTNAMELENGTH
|
||||
#define ATLPERF_DEFAULT_MAXINSTNAMELENGTH 64
|
||||
#endif
|
||||
|
||||
// base class for user-defined perf objects
|
||||
struct CPerfObject
|
||||
{
|
||||
// implementation
|
||||
|
||||
ULONG m_nAllocSize;
|
||||
DWORD m_dwCategoryId;
|
||||
DWORD m_dwInstance;
|
||||
ULONG m_nRefCount;
|
||||
ULONG m_nInstanceNameOffset; // byte offset from beginning of PerfObject to LPWSTR szInstanceName
|
||||
};
|
||||
|
||||
class CPerfMon
|
||||
{
|
||||
public:
|
||||
virtual ~CPerfMon() throw();
|
||||
|
||||
#ifdef _ATL_PERF_REGISTER
|
||||
// registration
|
||||
HRESULT Register(
|
||||
LPCTSTR szOpenFunc,
|
||||
LPCTSTR szCollectFunc,
|
||||
LPCTSTR szCloseFunc,
|
||||
HINSTANCE hDllInstance = _AtlBaseModule.GetModuleInstance()) throw();
|
||||
HRESULT RegisterStrings(
|
||||
LANGID wLanguage = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
|
||||
HINSTANCE hResInstance = _AtlBaseModule.GetResourceInstance()) throw();
|
||||
HRESULT RegisterAllStrings(HINSTANCE hResInstance = NULL) throw();
|
||||
HRESULT Unregister() throw();
|
||||
#endif
|
||||
|
||||
HRESULT Initialize() throw();
|
||||
void UnInitialize() throw();
|
||||
HRESULT CreateInstance(
|
||||
DWORD dwCategoryId,
|
||||
DWORD dwInstance,
|
||||
LPCWSTR szInstanceName,
|
||||
CPerfObject** ppInstance) throw();
|
||||
HRESULT CreateInstanceByName(
|
||||
DWORD dwCategoryId,
|
||||
LPCWSTR szInstanceName,
|
||||
CPerfObject** ppInstance) throw();
|
||||
|
||||
template <class T>
|
||||
HRESULT CreateInstance(
|
||||
DWORD dwInstance,
|
||||
LPCWSTR szInstanceName,
|
||||
T** ppInstance) throw()
|
||||
{
|
||||
// Ensure T derives from CPerfObject
|
||||
static_cast<CPerfObject*>(*ppInstance);
|
||||
|
||||
return CreateInstance(
|
||||
T::kCategoryId,
|
||||
dwInstance,
|
||||
szInstanceName,
|
||||
reinterpret_cast<CPerfObject**>(ppInstance)
|
||||
);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
HRESULT CreateInstanceByName(
|
||||
LPCWSTR szInstanceName,
|
||||
T** ppInstance) throw()
|
||||
{
|
||||
// Ensure T derives from CPerfObject
|
||||
static_cast<CPerfObject*>(*ppInstance);
|
||||
|
||||
return CreateInstanceByName(
|
||||
T::kCategoryId,
|
||||
szInstanceName,
|
||||
reinterpret_cast<CPerfObject**>(ppInstance)
|
||||
);
|
||||
}
|
||||
|
||||
HRESULT ReleaseInstance(CPerfObject* pInstance) throw();
|
||||
HRESULT LockPerf(DWORD dwTimeout = INFINITE) throw();
|
||||
void UnlockPerf() throw();
|
||||
|
||||
#ifndef _ATL_PERF_NOXML
|
||||
HRESULT PersistToXML(IStream *pStream, BOOL bFirst=TRUE, BOOL bLast=TRUE) throw(...);
|
||||
HRESULT LoadFromXML(IStream *pStream) throw(...);
|
||||
#endif
|
||||
|
||||
// implementation
|
||||
|
||||
public:
|
||||
// PerfMon entry point helpers
|
||||
DWORD Open(LPWSTR lpDeviceNames) throw();
|
||||
DWORD Collect(__in_z LPWSTR lpwszValue, __deref_inout_bcount(*pcbBytes) LPVOID* lppData, __inout LPDWORD lpcbBytes, __inout LPDWORD lpcObjectTypes) throw();
|
||||
DWORD Close() throw();
|
||||
|
||||
// map building routines
|
||||
HRESULT AddCategoryDefinition(
|
||||
DWORD dwCategoryId,
|
||||
LPCTSTR szCategoryName,
|
||||
LPCTSTR szHelpString,
|
||||
DWORD dwDetailLevel,
|
||||
INT nDefaultCounter,
|
||||
BOOL bInstanceLess,
|
||||
UINT nStructSize,
|
||||
UINT nMaxInstanceNameLen = ATLPERF_DEFAULT_MAXINSTNAMELENGTH) throw();
|
||||
HRESULT AddCounterDefinition(
|
||||
DWORD dwCounterId,
|
||||
LPCTSTR szCounterName,
|
||||
LPCTSTR szHelpString,
|
||||
DWORD dwDetailLevel,
|
||||
DWORD dwCounterType,
|
||||
ULONG nMaxCounterSize,
|
||||
UINT nOffset,
|
||||
INT nDefaultScale) throw();
|
||||
|
||||
// macro helpers
|
||||
HRESULT RegisterCategory(
|
||||
WORD wLanguage,
|
||||
HINSTANCE hResInstance,
|
||||
UINT* pSampleRes,
|
||||
DWORD dwCategoryId,
|
||||
UINT nNameString,
|
||||
UINT nHelpString,
|
||||
DWORD dwDetail,
|
||||
BOOL bInstanceless,
|
||||
UINT nStructSize,
|
||||
UINT nMaxInstanceNameLen,
|
||||
INT nDefaultCounter) throw();
|
||||
HRESULT RegisterCategory(
|
||||
WORD wLanguage,
|
||||
HINSTANCE hResInstance,
|
||||
UINT* pSampleRes,
|
||||
DWORD dwCategoryId,
|
||||
LPCTSTR szNameString,
|
||||
LPCTSTR szHelpString,
|
||||
DWORD dwDetail,
|
||||
BOOL bInstanceless,
|
||||
UINT nStructSize,
|
||||
UINT nMaxInstanceNameLen,
|
||||
INT nDefaultCounter) throw();
|
||||
HRESULT RegisterCounter(
|
||||
WORD wLanguage,
|
||||
HINSTANCE hResInstance,
|
||||
DWORD dwCounterId,
|
||||
UINT nNameString,
|
||||
UINT nHelpString,
|
||||
DWORD dwDetail,
|
||||
DWORD dwCounterType,
|
||||
ULONG nMaxCounterSize,
|
||||
UINT nOffset,
|
||||
INT nDefaultScale) throw();
|
||||
HRESULT RegisterCounter(
|
||||
WORD wLanguage,
|
||||
HINSTANCE hResInstance,
|
||||
DWORD dwCounterId,
|
||||
LPCTSTR szNameString,
|
||||
LPCTSTR szHelpString,
|
||||
DWORD dwDetail,
|
||||
DWORD dwCounterType,
|
||||
ULONG nMaxCounterSize,
|
||||
UINT nOffset,
|
||||
INT nDefaultScale) throw();
|
||||
|
||||
protected:
|
||||
void ClearMap() throw();
|
||||
|
||||
virtual LPCTSTR GetAppName() const throw() = 0;
|
||||
virtual HRESULT CreateMap(WORD wLanguage, HINSTANCE hResInstance, UINT* pSampleRes = NULL) throw();
|
||||
virtual void OnBlockAlloc(CAtlFileMappingBase* /*pNewBlock*/) { }
|
||||
#ifdef _ATL_PERF_REGISTER
|
||||
static BOOL CALLBACK EnumResLangProc(HINSTANCE hModule, LPCTSTR szType, LPCTSTR szName, LANGID wIDLanguage, LPARAM lParam);
|
||||
#endif
|
||||
|
||||
// implementation helpers
|
||||
struct CounterInfo
|
||||
{
|
||||
CounterInfo() : m_dwCounterId(0), m_dwDetailLevel(0), m_nNameId(0),
|
||||
m_nHelpId(0), m_dwCounterType(0), m_nDefaultScale(0),
|
||||
m_nMaxCounterSize(0), m_nDataOffset(0)
|
||||
{
|
||||
ZeroMemory (&m_cache, sizeof(m_cache));
|
||||
}
|
||||
// implementation
|
||||
|
||||
DWORD m_dwCounterId;
|
||||
CString m_strName;
|
||||
CString m_strHelp;
|
||||
DWORD m_dwDetailLevel;
|
||||
|
||||
// the ids that correspond to the name and help strings stored in the registry
|
||||
UINT m_nNameId;
|
||||
UINT m_nHelpId;
|
||||
|
||||
// counter data
|
||||
|
||||
DWORD m_dwCounterType;
|
||||
LONG m_nDefaultScale;
|
||||
|
||||
// the maximum size of the string counter data in characters, including the null terminator
|
||||
// ignored if not a string counter
|
||||
ULONG m_nMaxCounterSize;
|
||||
|
||||
ULONG m_nDataOffset;
|
||||
|
||||
// cached data to be copied into request
|
||||
PERF_COUNTER_DEFINITION m_cache;
|
||||
};
|
||||
|
||||
struct CategoryInfo
|
||||
{
|
||||
// implementation
|
||||
|
||||
DWORD m_dwCategoryId;
|
||||
CString m_strName;
|
||||
CString m_strHelp;
|
||||
DWORD m_dwDetailLevel;
|
||||
|
||||
// the ids that correspond to the name and help strings stored in the registry
|
||||
UINT m_nNameId;
|
||||
UINT m_nHelpId;
|
||||
|
||||
// category data
|
||||
|
||||
LONG m_nDefaultCounter;
|
||||
LONG m_nInstanceLess; // PERF_NO_INSTANCES if instanceless
|
||||
|
||||
// the size of the struct not counting the name and string counters
|
||||
ULONG m_nStructSize;
|
||||
|
||||
// in characters including the null terminator
|
||||
ULONG m_nMaxInstanceNameLen;
|
||||
|
||||
ULONG m_nAllocSize;
|
||||
|
||||
// cached data to be copied into request
|
||||
PERF_OBJECT_TYPE m_cache;
|
||||
ULONG m_nCounterBlockSize;
|
||||
|
||||
// counters
|
||||
UINT _GetNumCounters() throw();
|
||||
CounterInfo* _GetCounterInfo(UINT nIndex) throw();
|
||||
|
||||
CAtlArray<CounterInfo> m_counters;
|
||||
};
|
||||
|
||||
LPBYTE _AllocData(LPBYTE& pData, ULONG nBytesAvail, ULONG* pnBytesUsed, size_t nBytesNeeded) throw();
|
||||
template<typename T> T* _AllocStruct(LPBYTE& pData, ULONG nBytesAvail, ULONG* pnBytesUsed, T*) throw()
|
||||
{
|
||||
return reinterpret_cast<T*>(_AllocData(pData, nBytesAvail, pnBytesUsed, sizeof(T)));
|
||||
}
|
||||
|
||||
UINT _GetNumCategoriesAndCounters() throw();
|
||||
CategoryInfo* _GetCategoryInfo(UINT nIndex) throw();
|
||||
UINT _GetNumCategories() throw();
|
||||
CPerfObject* _GetFirstInstance(CAtlFileMappingBase* pBlock) throw();
|
||||
CPerfObject* _GetNextInstance(CPerfObject* pInstance) throw();
|
||||
CAtlFileMappingBase* _GetNextBlock(CAtlFileMappingBase* pBlock) throw();
|
||||
CAtlFileMappingBase* _OpenNextBlock(CAtlFileMappingBase* pPrev) throw();
|
||||
CAtlFileMappingBase* _AllocNewBlock(CAtlFileMappingBase* pPrev, BOOL* pbExisted = NULL) throw();
|
||||
HRESULT _OpenAllBlocks() throw();
|
||||
DWORD& _GetBlockId(CAtlFileMappingBase* pBlock) throw(...);
|
||||
DWORD* _GetBlockId_NoThrow(CAtlFileMappingBase* pBlock) throw();
|
||||
CategoryInfo* _FindCategoryInfo(DWORD dwCategoryId) throw();
|
||||
CounterInfo* _FindCounterInfo(CategoryInfo* pCategoryInfo, DWORD dwCounterId) throw();
|
||||
CounterInfo* _FindCounterInfo(DWORD dwCategoryId, DWORD dwCounterId) throw();
|
||||
BOOL _WantCategoryType(__in_z LPWSTR lpwszValue, __in DWORD dwPerfId) throw(...);
|
||||
void _FillCategoryType(CategoryInfo* pCategoryInfo) throw();
|
||||
void _FillCounterDef(CounterInfo* pCounterInfo, ULONG* pnCounterBlockSize) throw();
|
||||
HRESULT CPerfMon::_CollectInstance(
|
||||
CategoryInfo* pCategoryInfo,
|
||||
LPBYTE& pData,
|
||||
ULONG nBytesAvail,
|
||||
ULONG* pnBytesUsed,
|
||||
CPerfObject* pInstance,
|
||||
PERF_OBJECT_TYPE* pObjectType,
|
||||
PERF_COUNTER_DEFINITION* pCounterDefs
|
||||
) throw();
|
||||
HRESULT _CollectInstance(
|
||||
CategoryInfo* pCategoryInfo,
|
||||
LPBYTE& pData,
|
||||
ULONG nBytesAvail,
|
||||
ULONG* pnBytesUsed,
|
||||
PERF_OBJECT_TYPE* pObjectType,
|
||||
PERF_COUNTER_DEFINITION* pCounterDefs
|
||||
) throw();
|
||||
HRESULT _CollectCategoryType(
|
||||
CategoryInfo* pCategoryInfo,
|
||||
LPBYTE pData,
|
||||
ULONG nBytesAvail,
|
||||
ULONG* pnBytesUsed) throw();
|
||||
HRESULT _LoadMap(DWORD* pData) throw();
|
||||
HRESULT _SaveMap() throw();
|
||||
HRESULT _GetAttribute(
|
||||
IXMLDOMNode *pNode,
|
||||
LPCWSTR szAttrName,
|
||||
BSTR *pbstrVal) throw();
|
||||
HRESULT CPerfMon::_CreateInstance(
|
||||
DWORD dwCategoryId,
|
||||
DWORD dwInstance,
|
||||
LPCWSTR szInstanceName,
|
||||
CPerfObject** ppInstance,
|
||||
bool bByName) throw();
|
||||
|
||||
#ifdef _ATL_PERF_REGISTER
|
||||
void _AppendStrings(
|
||||
LPTSTR& pszNew,
|
||||
CAtlArray<CString>& astrStrings,
|
||||
ULONG iFirstIndex
|
||||
) throw();
|
||||
HRESULT _AppendRegStrings(
|
||||
CRegKey& rkLang,
|
||||
LPCTSTR szValue,
|
||||
CAtlArray<CString>& astrStrings,
|
||||
ULONG nNewStringSize,
|
||||
ULONG iFirstIndex,
|
||||
ULONG iLastIndex) throw();
|
||||
HRESULT _RemoveRegStrings(
|
||||
CRegKey& rkLang,
|
||||
LPCTSTR szValue,
|
||||
ULONG iFirstIndex,
|
||||
ULONG iLastIndex) throw();
|
||||
HRESULT _ReserveStringRange(DWORD& dwFirstCounter, DWORD& dwFirstHelp) throw();
|
||||
HRESULT _UnregisterStrings() throw();
|
||||
HRESULT _RegisterAllStrings(UINT nRes, HINSTANCE hResInstance) throw();
|
||||
#endif
|
||||
private:
|
||||
CAtlArray<CategoryInfo> m_categories;
|
||||
CAutoPtrArray<CAtlFileMappingBase> m_aMem;
|
||||
CMutex m_lock;
|
||||
ULONG m_nAllocSize;
|
||||
ULONG m_nHeaderSize;
|
||||
ULONG m_nSchemaSize;
|
||||
CSecurityDesc m_sd;
|
||||
};
|
||||
|
||||
class CPerfLock
|
||||
{
|
||||
public:
|
||||
CPerfLock(CPerfMon* pPerfMon, DWORD dwTimeout = INFINITE)
|
||||
{
|
||||
ATLENSURE(pPerfMon != NULL);
|
||||
m_pPerfMon = pPerfMon;
|
||||
m_hrStatus = m_pPerfMon->LockPerf(dwTimeout);
|
||||
}
|
||||
|
||||
~CPerfLock() throw()
|
||||
{
|
||||
if (SUCCEEDED(m_hrStatus))
|
||||
m_pPerfMon->UnlockPerf();
|
||||
}
|
||||
|
||||
HRESULT GetStatus() const throw()
|
||||
{
|
||||
return m_hrStatus;
|
||||
}
|
||||
|
||||
private:
|
||||
CPerfMon* m_pPerfMon;
|
||||
HRESULT m_hrStatus;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// map macros
|
||||
|
||||
// empty definition just for ease of use with code wizards, etc.
|
||||
#define BEGIN_PERFREG_MAP()
|
||||
|
||||
// empty definition just for ease of use with code wizards, etc.
|
||||
#define END_PERFREG_MAP()
|
||||
|
||||
#if !defined(_ATL_PERF_REGISTER) | defined(_ATL_PERF_NOEXPORT)
|
||||
#define PERFREG_ENTRY(className)
|
||||
#endif
|
||||
|
||||
#ifdef _ATL_PERF_REGISTER
|
||||
#define BEGIN_PERF_MAP(AppName) \
|
||||
private: \
|
||||
LPCTSTR GetAppName() const throw() { return AppName; } \
|
||||
HRESULT CreateMap(WORD wLanguage, HINSTANCE hResInstance, UINT* pSampleRes = NULL) throw() \
|
||||
{ \
|
||||
if (pSampleRes) \
|
||||
*pSampleRes = 0; \
|
||||
ClearMap();
|
||||
|
||||
#define BEGIN_COUNTER_MAP(categoryclass) \
|
||||
public: \
|
||||
typedef categoryclass _PerfCounterClass; \
|
||||
static HRESULT CreateMap(CPerfMon* pPerf, WORD wLanguage, HINSTANCE hResInstance, UINT* pSampleRes) throw() \
|
||||
{ \
|
||||
HRESULT hr = RegisterCategory(pPerf, wLanguage, hResInstance, pSampleRes); \
|
||||
if (FAILED(hr)) \
|
||||
return hr;
|
||||
|
||||
#define DECLARE_PERF_CATEGORY_EX(dwCategoryId, namestring, helpstring, detail, instanceless, structsize, maxinstnamelen, defcounter) \
|
||||
static HRESULT RegisterCategory(CPerfMon* pPerf, WORD wLanguage, HINSTANCE hResInstance, UINT* pSampleRes) throw() \
|
||||
{ \
|
||||
return pPerf->RegisterCategory(wLanguage, hResInstance, pSampleRes, dwCategoryId, namestring, helpstring, detail, instanceless, structsize, maxinstnamelen, defcounter); \
|
||||
} \
|
||||
/* NOTE: put a semicolon after your call to DECLARE_PERF_CATEGORY*(...) */ \
|
||||
/* this is needed for the code wizards to parse things properly */ \
|
||||
static const DWORD kCategoryId = dwCategoryId
|
||||
|
||||
#define CHAIN_PERF_CATEGORY(categoryclass) \
|
||||
if (FAILED(categoryclass::CreateMap(this, wLanguage, hResInstance, pSampleRes))) \
|
||||
return E_FAIL;
|
||||
|
||||
// CAssertValidField ensures that the member variable that's being passed to
|
||||
// DEFINE_COUNTER[_EX] is the proper type. only 32-bit integral types can be used with
|
||||
// PERF_SIZE_DWORD and only 64-bit integral types can be used with PERF_SIZE_LARGE
|
||||
template< DWORD t_dwSize >
|
||||
class CAssertValidField
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
class CAssertValidField< PERF_SIZE_DWORD >
|
||||
{
|
||||
public:
|
||||
template< class C > static void AssertValidFieldType( ULONG C::* ) throw() { }
|
||||
template< class C > static void AssertValidFieldType( LONG C::* ) throw() { }
|
||||
};
|
||||
|
||||
template<>
|
||||
class CAssertValidField< PERF_SIZE_LARGE >
|
||||
{
|
||||
public:
|
||||
template< class C > static void AssertValidFieldType( ULONGLONG C::* ) throw() { }
|
||||
template< class C > static void AssertValidFieldType( LONGLONG C::* ) throw() { }
|
||||
};
|
||||
|
||||
#define DEFINE_COUNTER_EX(member, dwCounterId, namestring, helpstring, detail, countertype, maxcountersize, defscale) \
|
||||
CAssertValidField< (countertype) & ATLPERF_SIZE_MASK >::AssertValidFieldType( &_PerfCounterClass::member ); \
|
||||
hr = pPerf->RegisterCounter(wLanguage, hResInstance, dwCounterId, namestring, helpstring, detail, countertype, maxcountersize, (ULONG) offsetof(_PerfCounterClass, member), defscale); \
|
||||
if (FAILED(hr)) \
|
||||
return hr;
|
||||
|
||||
#define END_PERF_MAP() \
|
||||
return S_OK; \
|
||||
}
|
||||
|
||||
#define END_COUNTER_MAP() \
|
||||
return S_OK; \
|
||||
}
|
||||
|
||||
#else // _ATL_PERF_REGISTER
|
||||
|
||||
#define BEGIN_PERF_MAP(AppName) \
|
||||
private: \
|
||||
LPCTSTR GetAppName() const throw() { return AppName; }
|
||||
|
||||
#define BEGIN_COUNTER_MAP(objectclass)
|
||||
|
||||
#define DECLARE_PERF_CATEGORY_EX(dwCategoryId, namestring, helpstring, detail, instanceless, structsize, maxinstnamelen, defcounter) \
|
||||
/* NOTE: put a semicolon after your call to DECLARE_PERF_CATEGORY*(...) */ \
|
||||
/* this is needed for the code wizards to parse things properly */ \
|
||||
static const DWORD kCategoryId = dwCategoryId
|
||||
|
||||
#define CHAIN_PERF_CATEGORY(objectclass)
|
||||
#define DEFINE_COUNTER_EX(member, dwCounterId, namestring, helpstring, detail, countertype, maxcountersize, defscale)
|
||||
|
||||
#define END_PERF_MAP()
|
||||
#define END_COUNTER_MAP()
|
||||
|
||||
#endif // _ATL_PERF_REGISTER
|
||||
|
||||
#define DECLARE_PERF_CATEGORY(objectclass, dwCategoryId, namestring, helpstring, defcounter) \
|
||||
DECLARE_PERF_CATEGORY_EX(dwCategoryId, namestring, helpstring, PERF_DETAIL_NOVICE, 0, sizeof(objectclass), ATLPERF_DEFAULT_MAXINSTNAMELENGTH, defcounter)
|
||||
#define DECLARE_PERF_CATEGORY_NO_INSTANCES(objectclass, dwCategoryId, namestring, helpstring, defcounter) \
|
||||
DECLARE_PERF_CATEGORY_EX(dwCategoryId, namestring, helpstring, PERF_DETAIL_NOVICE, PERF_NO_INSTANCES, sizeof(objectclass), 0, defcounter)
|
||||
|
||||
#define DEFINE_COUNTER(member, namestring, helpstring, countertype, defscale) \
|
||||
DEFINE_COUNTER_EX(member, 0, namestring, helpstring, PERF_DETAIL_NOVICE, countertype, 0, defscale)
|
||||
|
||||
#pragma deprecated( DECLARE_PERF_OBJECT_EX )
|
||||
#pragma deprecated( DECLARE_PERF_OBJECT )
|
||||
#pragma deprecated( DECLARE_PERF_OBJECT_NO_INSTANCES )
|
||||
#pragma deprecated( CHAIN_PERF_OBJECT )
|
||||
#define DECLARE_PERF_OBJECT_EX DECLARE_PERF_CATEGORY_EX
|
||||
#define DECLARE_PERF_OBJECT DECLARE_PERF_CATEGORY
|
||||
#define DECLARE_PERF_OBJECT_NO_INSTANCES DECLARE_PERF_CATEGORY_NO_INSTANCES
|
||||
#define CHAIN_PERF_OBJECT CHAIN_PERF_CATEGORY
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// automagic registration stuff
|
||||
|
||||
#if defined(_ATL_PERF_REGISTER) & !defined(_ATL_PERF_NOEXPORT)
|
||||
|
||||
// define _ATL_PERF_NOEXPORT if you don't want to use the PERFREG map and don't want these
|
||||
// functions exported from your DLL
|
||||
|
||||
// Perf register map stuff
|
||||
// this is for ease of integration with the module attribute and for the
|
||||
// perfmon wizard
|
||||
|
||||
#pragma section("ATLP$A", read, shared)
|
||||
#pragma section("ATLP$Z", read, shared)
|
||||
#pragma section("ATLP$C", read, shared)
|
||||
extern "C"
|
||||
{
|
||||
__declspec(selectany) __declspec(allocate("ATLP$A")) CPerfMon * __pperfA = NULL;
|
||||
__declspec(selectany) __declspec(allocate("ATLP$Z")) CPerfMon * __pperfZ = NULL;
|
||||
}
|
||||
|
||||
#if !defined(_M_IA64)
|
||||
#pragma comment(linker, "/merge:ATLP=.rdata")
|
||||
#endif
|
||||
|
||||
#if defined(_M_IA64) || defined(_M_AMD64)
|
||||
#define ATLPERF_FUNCID_OPEN "OpenPerfMon"
|
||||
#define ATLPERF_FUNCID_COLLECT "CollectPerfMon"
|
||||
#define ATLPERF_FUNCID_CLOSE "ClosePerfMon"
|
||||
#elif defined(_M_IX86)
|
||||
#define ATLPERF_FUNCID_OPEN "_OpenPerfMon@4"
|
||||
#define ATLPERF_FUNCID_COLLECT "_CollectPerfMon@16"
|
||||
#define ATLPERF_FUNCID_CLOSE "_ClosePerfMon@0"
|
||||
#else
|
||||
#if !defined(ATLPERF_FUNCID_OPEN) || !defined(ATLPERF_FUNCID_COLLECT) || !defined (ATLPERF_FUNCID_CLOSE)
|
||||
#error "Unknown platform. Define ATLPERF_FUNCID_OPEN, ATLPERF_FUNCID_COLLECT, ATLPERF_FUNCID_CLOSE"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
HRESULT RegisterPerfMon(HINSTANCE hDllInstance = _AtlBaseModule.GetModuleInstance()) throw();
|
||||
HRESULT UnregisterPerfMon() throw();
|
||||
|
||||
extern "C" DWORD __declspec(dllexport) WINAPI OpenPerfMon(LPWSTR lpDeviceNames) throw();
|
||||
extern "C" DWORD __declspec(dllexport) WINAPI CollectPerfMon(LPWSTR lpwszValue, LPVOID* lppData,
|
||||
LPDWORD lpcbBytes, LPDWORD lpcObjectTypes) throw();
|
||||
extern "C" DWORD __declspec(dllexport) WINAPI ClosePerfMon() throw();
|
||||
|
||||
// this class handles integrating the registration with CComModule
|
||||
class _CAtlPerfSetFuncPtr
|
||||
{
|
||||
public:
|
||||
_CAtlPerfSetFuncPtr()
|
||||
{
|
||||
_pPerfRegFunc = RegisterPerfMon;
|
||||
_pPerfUnRegFunc = UnregisterPerfMon;
|
||||
}
|
||||
};
|
||||
|
||||
extern "C" { __declspec(selectany) _CAtlPerfSetFuncPtr g_atlperfinit; }
|
||||
|
||||
#if defined(_M_IX86)
|
||||
#pragma comment(linker, "/INCLUDE:_g_atlperfinit")
|
||||
#elif defined(_M_IA64) || defined(_M_AMD64)
|
||||
#pragma comment(linker, "/INCLUDE:g_atlperfinit")
|
||||
#else
|
||||
#pragma message("Unknown platform. Make sure the linker includes g_atlperfinit")
|
||||
#endif
|
||||
|
||||
#ifndef PERF_ENTRY_PRAGMA
|
||||
|
||||
#if defined(_M_IX86)
|
||||
#define PERF_ENTRY_PRAGMA(class) __pragma(comment(linker, "/include:___pperf_" #class));
|
||||
#elif defined(_M_IA64)
|
||||
#define PERF_ENTRY_PRAGMA(class) __pragma(comment(linker, "/include:__pperf_" #class));
|
||||
#elif defined(_M_AMD64)
|
||||
#define PERF_ENTRY_PRAGMA(class) __pragma(comment(linker, "/include:__pperf_" #class));
|
||||
#else
|
||||
#error Unknown Platform. define PERF_ENTRY_PRAGMA
|
||||
#endif
|
||||
|
||||
#endif // PERF_ENTRY_PRAGMA
|
||||
|
||||
#define PERFREG_ENTRY(className) \
|
||||
__declspec(selectany) className __perf_##className; \
|
||||
extern "C" __declspec(allocate("ATLP$C")) __declspec(selectany) CPerfMon * const __pperf_##className = \
|
||||
static_cast<CPerfMon*>(&__perf_##className); \
|
||||
PERF_ENTRY_PRAGMA(className)
|
||||
|
||||
#endif // _ATL_PERF_NOEXPORT
|
||||
|
||||
} // namespace ATL
|
||||
|
||||
|
||||
#include <atlperf.inl>
|
||||
|
||||
#pragma pack(pop)
|
||||
#pragma warning(pop)
|
||||
|
||||
#endif // __ATLPERF_H__
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,174 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#ifndef __ATLSERR_H__
|
||||
#define __ATLSERR_H__
|
||||
|
||||
#pragma once
|
||||
#pragma pack(push,_ATL_PACKING)
|
||||
namespace ATL{
|
||||
|
||||
#define VALIDATION_S_OK 0x00000000
|
||||
#define VALIDATION_S_EMPTY 0x00000001
|
||||
#define VALIDATION_E_PARAMNOTFOUND 0x00000002
|
||||
#define VALIDATION_E_LENGTHMIN 0x80000083
|
||||
#define VALIDATION_E_LENGTHMAX 0x80000084
|
||||
#define VALIDATION_E_INVALIDLENGTH 0x80000080
|
||||
#define VALIDATION_E_INVALIDPARAM 0x80000005
|
||||
#define VALIDATION_E_FAIL 0x80000006
|
||||
|
||||
#define VALIDATION_SUCCEEDED(x) (((x == VALIDATION_S_OK) || (x == VALIDATION_S_EMPTY )))
|
||||
|
||||
typedef DWORD HTTP_CODE;
|
||||
|
||||
#define HTTP_ERROR(err, sub) ((HTTP_CODE)(DWORD_PTR)MAKELONG((WORD)err, (WORD)sub))
|
||||
#define HTTP_ERROR_CODE(err) ((DWORD)LOWORD(err))
|
||||
#define HTTP_SUBERROR_CODE(err) ((DWORD)HIWORD(err))
|
||||
#define HTTP_SUCCESS HTTP_ERROR(0, 0)
|
||||
|
||||
#define SUBERR_NONE 0
|
||||
#define ISE_SUBERR_BADSRF 1
|
||||
#define ISE_SUBERR_HNDLFAIL 2
|
||||
#define ISE_SUBERR_SYSOBJFAIL 3
|
||||
#define ISE_SUBERR_READFILEFAIL 4
|
||||
#define ISE_SUBERR_LOADFILEFAIL 6
|
||||
#define ISE_SUBERR_LOADLIB 7
|
||||
#define ISE_SUBERR_HANDLERIF 8
|
||||
#define ISE_SUBERR_OUTOFMEM 9
|
||||
#define ISE_SUBERR_UNEXPECTED 10
|
||||
#define ISE_SUBERR_STENCIL_INVALIDFUNCOFFSET 11
|
||||
#define ISE_SUBERR_STENCIL_MISMATCHWHILE 12
|
||||
#define ISE_SUBERR_STENCIL_MISMATCHIF 13
|
||||
#define ISE_SUBERR_STENCIL_UNEXPECTEDTYPE 14
|
||||
#define ISE_SUBERR_STENCIL_INVALIDINDEX 15
|
||||
#define ISE_SUBERR_STENCIL_INDEXOUTOFRANGE 16
|
||||
#define ISE_SUBERR_STENCIL_PARSE_FAIL 17
|
||||
#define ISE_SUBERR_STENCIL_LOAD_FAIL 18
|
||||
#define ISE_SUBERR_HANDLER_NOT_FOUND 19
|
||||
#define ISE_SUBERR_BAD_HANDLER_TAG 20
|
||||
#define ISE_SUBERR_NO_HANDLER_TAG 21
|
||||
#define ISE_SUBERR_LONGMETHODNAME 22
|
||||
#define ISE_SUBERR_LONGHANDLERNAME 23
|
||||
#define ISE_SUBERR_IMPERSONATIONFAILED 24
|
||||
#define ISE_SUBERR_ISAPISTARTUPFAILED 25
|
||||
#define ISE_SUBERR_SOAPNOSOAPACTION 26
|
||||
#define SUBERR_NO_PROCESS 27
|
||||
#define SUBERR_S_FALSE 28
|
||||
#define SUBERR_ASYNC 29
|
||||
#define SUBERR_ASYNC_DONE 30
|
||||
#define SUBERR_ASYNC_NOFLUSH 31
|
||||
#define SUBERR_ASYNC_NOFLUSH_DONE 32
|
||||
#define SUBERR_NO_CACHE 33
|
||||
#define DBG_SUBERR_ALREADY_DEBUGGING 34
|
||||
#define DBG_SUBERR_NOT_DEBUGGING 35
|
||||
#define DBG_SUBERR_INVALID_SESSION 36
|
||||
#define DBG_SUBERR_BAD_ID 37
|
||||
#define DBG_SUBERR_COCREATE 38
|
||||
#define DBG_SUBERR_ATTACH 39
|
||||
|
||||
|
||||
#define HTTP_FAIL HTTP_ERROR(500, SUBERR_NONE)
|
||||
#define HTTP_SUCCESS_NO_PROCESS HTTP_ERROR(200, SUBERR_NO_PROCESS)
|
||||
#define HTTP_S_FALSE HTTP_ERROR(HTTP_ERROR_CODE(HTTP_SUCCESS), SUBERR_S_FALSE)
|
||||
#define HTTP_SUCCESS_ASYNC HTTP_ERROR(200, SUBERR_ASYNC)
|
||||
#define HTTP_SUCCESS_ASYNC_DONE HTTP_ERROR(200, SUBERR_ASYNC_DONE)
|
||||
#define HTTP_SUCCESS_ASYNC_NOFLUSH HTTP_ERROR(200, SUBERR_ASYNC_NOFLUSH)
|
||||
#define HTTP_SUCCESS_ASYNC_NOFLUSH_DONE HTTP_ERROR(200, SUBERR_ASYNC_NOFLUSH_DONE)
|
||||
#define HTTP_SUCCESS_NO_CACHE HTTP_ERROR(200, SUBERR_NO_CACHE)
|
||||
#define HTTP_OK HTTP_ERROR(200, SUBERR_NONE)
|
||||
#define HTTP_CONTINUE HTTP_ERROR(100, SUBERR_NONE)
|
||||
|
||||
#define HTTP_CREATED HTTP_ERROR(201, SUBERR_NONE)
|
||||
#define HTTP_ACCEPTED HTTP_ERROR(202, SUBERR_NONE)
|
||||
#define HTTP_NON_AUTHORITATIVE HTTP_ERROR(203, SUBERR_NONE)
|
||||
#define HTTP_NO_CONTENT HTTP_ERROR(204, SUBERR_NONE)
|
||||
#define HTTP_RESET_CONTENT HTTP_ERROR(205, SUBERR_NONE)
|
||||
#define HTTP_PARTIAL_CONTENT HTTP_ERROR(206, SUBERR_NONE)
|
||||
|
||||
#define HTTP_MULTIPLE_CHOICES HTTP_ERROR(300, SUBERR_NONE)
|
||||
#define HTTP_MOVED_PERMANENTLY HTTP_ERROR(301, SUBERR_NONE)
|
||||
#define HTTP_FOUND HTTP_ERROR(302, SUBERR_NONE)
|
||||
#define HTTP_SEE_OTHER HTTP_ERROR(303, SUBERR_NONE)
|
||||
#define HTTP_NOT_MODIFIED HTTP_ERROR(304, SUBERR_NONE)
|
||||
#define HTTP_USE_PROXY HTTP_ERROR(305, SUBERR_NONE)
|
||||
#define HTTP_TEMPORARY_REDIRECT HTTP_ERROR(307, SUBERR_NONE)
|
||||
|
||||
#define HTTP_BAD_REQUEST HTTP_ERROR(400, SUBERR_NONE)
|
||||
#define HTTP_UNAUTHORIZED HTTP_ERROR(401, SUBERR_NONE)
|
||||
#define HTTP_PAYMENT_REQUIRED HTTP_ERROR(402, SUBERR_NONE)
|
||||
#define HTTP_FORBIDDEN HTTP_ERROR(403, SUBERR_NONE)
|
||||
#define HTTP_NOT_FOUND HTTP_ERROR(404, SUBERR_NONE)
|
||||
#define HTTP_METHOD_NOT_ALLOWED HTTP_ERROR(405, SUBERR_NONE)
|
||||
#define HTTP_NOT_ACCEPTABLE HTTP_ERROR(406, SUBERR_NONE)
|
||||
#define HTTP_PROXY_AUTHENTICATION_REQUIRED HTTP_ERROR(407, SUBERR_NONE)
|
||||
#define HTTP_REQUEST_TIMEOUT HTTP_ERROR(408, SUBERR_NONE)
|
||||
#define HTTP_CONFLICT HTTP_ERROR(409, SUBERR_NONE)
|
||||
#define HTTP_GONE HTTP_ERROR(410, SUBERR_NONE)
|
||||
#define HTTP_LENGTH_REQUIRED HTTP_ERROR(411, SUBERR_NONE)
|
||||
#define HTTP_PRECONDITION_FAILED HTTP_ERROR(412, SUBERR_NONE)
|
||||
#define HTTP_REQUEST_ENTITY_TOO_LONG HTTP_ERROR(413, SUBERR_NONE)
|
||||
#define HTTP_REQUEST_URI_TOO_LONG HTTP_ERROR(414, SUBERR_NONE)
|
||||
#define HTTP_UNSUPPORTED_MEDIA_TYPE HTTP_ERROR(415, SUBERR_NONE)
|
||||
#define HTTP_RANGE_NOT_SATISFIABLE HTTP_ERROR(416, SUBERR_NONE)
|
||||
#define HTTP_EXPECTATION_FAILED HTTP_ERROR(417, SUBERR_NONE)
|
||||
|
||||
#define HTTP_INTERNAL_SERVER_ERROR HTTP_ERROR(500, SUBERR_NONE)
|
||||
#define HTTP_NOT_IMPLEMENTED HTTP_ERROR(501, SUBERR_NONE)
|
||||
#define HTTP_BAD_GATEWAY HTTP_ERROR(502, SUBERR_NONE)
|
||||
#define HTTP_SERVICE_UNAVAILABLE HTTP_ERROR(503, SUBERR_NONE)
|
||||
#define HTTP_GATEWAY_TIMEOUT HTTP_ERROR(504, SUBERR_NONE)
|
||||
#define HTTP_VERSION_NOT_SUPPORTED HTTP_ERROR(505, SUBERR_NONE)
|
||||
|
||||
inline bool IsAsyncStatus(HTTP_CODE hcStatus)
|
||||
{
|
||||
return
|
||||
hcStatus == HTTP_SUCCESS_ASYNC ||
|
||||
hcStatus == HTTP_SUCCESS_ASYNC_DONE ||
|
||||
hcStatus == HTTP_SUCCESS_ASYNC_NOFLUSH ||
|
||||
hcStatus == HTTP_SUCCESS_ASYNC_NOFLUSH_DONE;
|
||||
}
|
||||
|
||||
inline bool IsAsyncContinueStatus(HTTP_CODE hcStatus)
|
||||
{
|
||||
return
|
||||
hcStatus == HTTP_SUCCESS_ASYNC ||
|
||||
hcStatus == HTTP_SUCCESS_ASYNC_NOFLUSH;
|
||||
}
|
||||
|
||||
inline bool IsAsyncDoneStatus(HTTP_CODE hcStatus)
|
||||
{
|
||||
return
|
||||
hcStatus == HTTP_SUCCESS_ASYNC_DONE ||
|
||||
hcStatus == HTTP_SUCCESS_ASYNC_NOFLUSH_DONE;
|
||||
}
|
||||
|
||||
inline bool IsAsyncFlushStatus(HTTP_CODE hcStatus)
|
||||
{
|
||||
return
|
||||
hcStatus == HTTP_SUCCESS_ASYNC ||
|
||||
hcStatus == HTTP_SUCCESS_ASYNC_DONE;
|
||||
}
|
||||
|
||||
inline bool IsAsyncNoFlushStatus(HTTP_CODE hcStatus)
|
||||
{
|
||||
return
|
||||
hcStatus == HTTP_SUCCESS_ASYNC_NOFLUSH ||
|
||||
hcStatus == HTTP_SUCCESS_ASYNC_NOFLUSH_DONE;
|
||||
}
|
||||
|
||||
ATL_NOINLINE inline HTTP_CODE AtlsHttpError(WORD wStatus, WORD wSubErr) throw()
|
||||
{
|
||||
return HTTP_ERROR(wStatus, wSubErr);
|
||||
}
|
||||
|
||||
}; // namespace ATL
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif // __ATLSERR_H__
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,202 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#ifndef __ATLSHAREDSVC_H__
|
||||
#define __ATLSHAREDSVC_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <atltime.h>
|
||||
#include <atlsoap.h>
|
||||
#pragma pack(push,_ATL_PACKING)
|
||||
namespace ATL{
|
||||
|
||||
#ifndef ATL_SHAREDBLOBCACHE_TIMEOUT
|
||||
#define ATL_SHAREDBLOBCACHE_TIMEOUT 36000000000 // in 100 nano second intervals
|
||||
// each entry will be free'd if
|
||||
// no access in 1 hour.
|
||||
#endif
|
||||
|
||||
// Interface used by to access the shared blob cache.
|
||||
[ uuid("AB4AF9CD-8DB1-4974-A617-CF0449578FB9"), object ]
|
||||
__interface ISharedBlobCache
|
||||
{
|
||||
[id(0)] STDMETHOD(AddItem)([in] BSTR szItemName, [in] BSTR szData);
|
||||
[id(1)] STDMETHOD(GetItem)([in] BSTR szItemName, [out,retval] BSTR *szData);
|
||||
};
|
||||
|
||||
class CSharedCache:
|
||||
public CBlobCache<CWorkerThread<>, CStdStatClass >,
|
||||
public IMemoryCacheClient,
|
||||
public ISharedBlobCache
|
||||
{
|
||||
typedef CBlobCache<CWorkerThread<>, CStdStatClass > basecache;
|
||||
public:
|
||||
|
||||
// IMemoryCacheClient method, frees data in the memory cache.
|
||||
STDMETHOD( Free )(const void *pvData)
|
||||
{
|
||||
if (pvData)
|
||||
{
|
||||
::SysFreeString((BSTR)pvData);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP AddItem(BSTR szItemName, BSTR szData)
|
||||
{
|
||||
|
||||
HRESULT hr = E_UNEXPECTED;
|
||||
|
||||
// We make a copy of the BSTR and stick it in the cache.
|
||||
// The BSTR will be freed in our IMemoryCacheClient::Free
|
||||
// implementation above.
|
||||
BSTR szEntry = SysAllocString(szData);
|
||||
if(szEntry)
|
||||
{
|
||||
USES_CONVERSION_EX;
|
||||
// create a time span and for the entry
|
||||
CFileTime tm = CFileTime::GetCurrentTime();
|
||||
CFileTimeSpan span;
|
||||
span.SetTimeSpan(ATL_SHAREDBLOBCACHE_TIMEOUT);
|
||||
tm += span;
|
||||
HCACHEITEM h;
|
||||
hr = basecache::Add(OLE2A_EX(szItemName, _ATL_SAFE_ALLOCA_DEF_THRESHOLD), szEntry, sizeof(BSTR),
|
||||
&tm, _AtlBaseModule.m_hInst, &h, static_cast<IMemoryCacheClient*>(this));
|
||||
|
||||
if (hr == S_OK)
|
||||
{
|
||||
// On successful add, we have to release our
|
||||
// reference on the entry.
|
||||
basecache::ReleaseEntry(h);
|
||||
}
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP GetItem(BSTR szItemName, BSTR *szData)
|
||||
{
|
||||
USES_CONVERSION_EX;
|
||||
HRESULT hr = E_UNEXPECTED;
|
||||
HCACHEITEM hEntry = NULL;
|
||||
|
||||
if (!szItemName || !szData)
|
||||
return hr;
|
||||
|
||||
hr = basecache::LookupEntry(OLE2A_EX(szItemName, _ATL_SAFE_ALLOCA_DEF_THRESHOLD), &hEntry);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
void *pData = NULL;
|
||||
DWORD dwSize = 0;
|
||||
hr = basecache::GetData(hEntry, &pData, &dwSize);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
// make a copy of the string
|
||||
*szData = ::SysAllocString((BSTR)pData);
|
||||
}
|
||||
basecache::ReleaseEntry(hEntry);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
|
||||
{
|
||||
HRESULT hr = E_NOINTERFACE;
|
||||
if (InlineIsEqualGUID(__uuidof(IMemoryCacheClient), riid)||
|
||||
InlineIsEqualGUID(__uuidof(IUnknown), riid))
|
||||
{
|
||||
*ppv = static_cast<void*>(static_cast<IMemoryCacheClient*>(this));
|
||||
hr = S_OK;
|
||||
}
|
||||
else if( InlineIsEqualGUID(__uuidof(ISharedBlobCache), riid))
|
||||
{
|
||||
*ppv = static_cast<void*>(static_cast<ISharedBlobCache*>(this));
|
||||
hr = S_OK;
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
ULONG STDMETHODCALLTYPE AddRef()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
ULONG STDMETHODCALLTYPE Release()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// This class implements the SOAP interface for the shared blob cache.
|
||||
[
|
||||
soap_handler(
|
||||
name="SharedBlobCache",
|
||||
namespace="http://www.microsoft.com/vc/atlserver/soap/SharedBlobCache",
|
||||
protocol="soap"
|
||||
),
|
||||
request_handler(
|
||||
name="SharedBlobCache",
|
||||
sdl="GenSharedBlobCacheWSDL"
|
||||
)
|
||||
]
|
||||
class CSharedCacheHandler:
|
||||
public ISharedBlobCache
|
||||
{
|
||||
public:
|
||||
[soap_method]
|
||||
STDMETHOD(AddItem)(BSTR szItemName, BSTR szData)
|
||||
{
|
||||
if (!m_spMemCache)
|
||||
return E_UNEXPECTED;
|
||||
return m_spMemCache->AddItem(szItemName, szData);
|
||||
}
|
||||
|
||||
[soap_method]
|
||||
STDMETHOD(GetItem)(BSTR szItemName, BSTR *szData)
|
||||
{
|
||||
if (!m_spMemCache)
|
||||
return E_UNEXPECTED;
|
||||
return m_spMemCache->GetItem(szItemName, szData);
|
||||
}
|
||||
|
||||
HTTP_CODE Initialize(IServiceProvider *pProvider)
|
||||
{
|
||||
ATLASSERT(pProvider); // should never be NULL
|
||||
if (!pProvider)
|
||||
return HTTP_ERROR(500, ISE_SUBERR_UNEXPECTED);
|
||||
|
||||
if (m_spMemCache)
|
||||
return HTTP_SUCCESS; // already initialized
|
||||
|
||||
pProvider->QueryService(__uuidof(ISharedBlobCache), &m_spMemCache);
|
||||
return m_spMemCache ? HTTP_SUCCESS : HTTP_ERROR(500, ISE_SUBERR_UNEXPECTED);
|
||||
}
|
||||
|
||||
// override HandleRequest to Initialize our m_spServiceProvider
|
||||
// and to handle authorizing the client.
|
||||
HTTP_CODE HandleRequest(AtlServerRequest *pRequestInfo, IServiceProvider *pProvider)
|
||||
{
|
||||
HTTP_CODE dwErr = Initialize(pProvider);
|
||||
if (dwErr != HTTP_SUCCESS)
|
||||
return dwErr;
|
||||
|
||||
dwErr = CSoapHandler<CSharedCacheHandler>::HandleRequest(pRequestInfo,
|
||||
pProvider);
|
||||
return dwErr;
|
||||
}
|
||||
CComPtr<ISharedBlobCache> m_spMemCache;
|
||||
};
|
||||
|
||||
} //ATL
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif // __ATLSHAREDSVC_H__
|
||||
@@ -1,802 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#ifndef __ATLSIFACE_H__
|
||||
#define __ATLSIFACE_H__
|
||||
|
||||
#pragma once
|
||||
#include <atlcoll.h>
|
||||
#include <httpext.h>
|
||||
#include <atlserr.h>
|
||||
#include <atlcom.h>
|
||||
#include <string.h>
|
||||
#include <atlpath.h>
|
||||
|
||||
#pragma pack(push,_ATL_PACKING)
|
||||
namespace ATL{
|
||||
|
||||
// Forward declarations of custom data types used in
|
||||
// interfaces declared in this file.
|
||||
struct AtlServerRequest;
|
||||
class CIsapiWorker;
|
||||
__interface IAtlMemMgr;
|
||||
class CCookie;
|
||||
|
||||
// Forward declarations of all interfaces declared in this file.
|
||||
__interface IWriteStream;
|
||||
__interface IHttpFile;
|
||||
__interface IHttpServerContext;
|
||||
__interface IHttpRequestLookup;
|
||||
__interface IRequestHandler;
|
||||
__interface ITagReplacer;
|
||||
__interface IIsapiExtension;
|
||||
__interface IPageCacheControl;
|
||||
__interface IRequestStats;
|
||||
__interface IBrowserCaps;
|
||||
__interface IBrowserCapsSvc;
|
||||
|
||||
|
||||
// ATLS Interface declarations.
|
||||
|
||||
// IWriteStream
|
||||
// Interface for writing to a stream.
|
||||
__interface IWriteStream
|
||||
{
|
||||
HRESULT WriteStream(LPCSTR szOut, int nLen, DWORD *pdwWritten);
|
||||
HRESULT FlushStream();
|
||||
};
|
||||
|
||||
// IHttpFile
|
||||
// This is an interface that provides for basic accessor
|
||||
// functionality for files (see CHttpRequestFile).
|
||||
__interface IHttpFile
|
||||
{
|
||||
LPCSTR GetParamName();
|
||||
LPCSTR GetFileName();
|
||||
LPCSTR GetFullFileName();
|
||||
LPCSTR GetContentType();
|
||||
LPCSTR GetTempFileName();
|
||||
ULONGLONG GetFileSize();
|
||||
void Free();
|
||||
};
|
||||
|
||||
// IHttpServerContext
|
||||
// This interface encapsulates the capabilities of the web server and provides information about
|
||||
// the current request being handled. See CServerContext for implementation.
|
||||
__interface ATL_NO_VTABLE __declspec(uuid("813F3F00-3881-11d3-977B-00C04F8EE25E"))
|
||||
IHttpServerContext : public IUnknown
|
||||
{
|
||||
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppv);
|
||||
ULONG STDMETHODCALLTYPE AddRef();
|
||||
ULONG STDMETHODCALLTYPE Release();
|
||||
|
||||
LPCSTR GetRequestMethod();
|
||||
LPCSTR GetQueryString();
|
||||
LPCSTR GetPathInfo();
|
||||
LPCSTR GetPathTranslated();
|
||||
LPCSTR GetScriptPathTranslated();
|
||||
DWORD GetTotalBytes();
|
||||
DWORD GetAvailableBytes();
|
||||
BYTE *GetAvailableData();
|
||||
LPCSTR GetContentType();
|
||||
BOOL GetServerVariable(__in_z LPCSTR pszVariableName,
|
||||
__out_ecount_part_opt(*pdwSize, *pdwSize) LPSTR pvBuffer, __inout DWORD *pdwSize);
|
||||
BOOL GetImpersonationToken(HANDLE * pToken);
|
||||
BOOL WriteClient(void *pvBuffer, DWORD *pdwBytes);
|
||||
BOOL AsyncWriteClient(void *pvBuffer, DWORD *pdwBytes);
|
||||
BOOL ReadClient(void *pvBuffer, DWORD *pdwSize);
|
||||
BOOL AsyncReadClient(void *pvBuffer, DWORD *pdwSize);
|
||||
BOOL SendRedirectResponse(LPCSTR pszRedirectUrl);
|
||||
BOOL SendResponseHeader(LPCSTR pszHeader, LPCSTR pszStatusCode,
|
||||
BOOL fKeepConn);
|
||||
BOOL DoneWithSession(DWORD dwHttpStatusCode);
|
||||
BOOL RequestIOCompletion(PFN_HSE_IO_COMPLETION pfn, DWORD *pdwContext);
|
||||
BOOL TransmitFile(HANDLE hFile, PFN_HSE_IO_COMPLETION pfn, void *pContext,
|
||||
LPCSTR szStatusCode, DWORD dwBytesToWrite, DWORD dwOffset,
|
||||
void *pvHead, DWORD dwHeadLen, void *pvTail,
|
||||
DWORD dwTailLen, DWORD dwFlags);
|
||||
BOOL AppendToLog(LPCSTR szMessage, DWORD* pdwLen);
|
||||
BOOL MapUrlToPathEx(LPCSTR szLogicalPath, DWORD dwLen, HSE_URL_MAPEX_INFO *pumInfo);
|
||||
};
|
||||
|
||||
// IHttpRequestLookup
|
||||
// This interface is designed to allow one map to chain to another map.
|
||||
// The interface is implemented by the CHttpThunkMap and CHttpRequest classes.
|
||||
// Pointers to this interface are passed around by CRequestHandlerT and CHtmlTagReplacer.
|
||||
// dwType - the type of item being requested
|
||||
__interface ATL_NO_VTABLE __declspec(uuid("A5990B44-FF74-4bfe-B66D-F9E7E9F42D42"))
|
||||
IHttpRequestLookup : public IUnknown
|
||||
{
|
||||
POSITION GetFirstQueryParam(LPCSTR *ppszName, LPCSTR *ppszValue);
|
||||
POSITION GetNextQueryParam(POSITION pos, LPCSTR *ppszName, LPCSTR *ppszValue);
|
||||
|
||||
POSITION GetFirstFormVar(LPCSTR *ppszName, LPCSTR *ppszValue);
|
||||
POSITION GetNextFormVar(POSITION pos, LPCSTR *ppszName, LPCSTR *ppszValue);
|
||||
|
||||
POSITION GetFirstFile(LPCSTR *ppszName, IHttpFile **ppFile);
|
||||
POSITION GetNextFile(POSITION pos, LPCSTR *ppszName, IHttpFile **ppFile);
|
||||
|
||||
HRESULT GetServerContext(IHttpServerContext **ppOut);
|
||||
};
|
||||
|
||||
|
||||
// IRequestHandler
|
||||
// This interface is impelemented by clients who want to be request handlers in an
|
||||
// atl server application. Server default implementations are provided in ATL, including
|
||||
// IRequestHandlerImpl (atlisapi.h) and CRequestHandlerT (atlstencil.h)
|
||||
__interface ATL_NO_VTABLE __declspec(uuid("D57F8D0C-751A-4223-92BC-0B29F65D2453"))
|
||||
IRequestHandler : public IUnknown
|
||||
{
|
||||
HTTP_CODE GetFlags(DWORD *pdwStatus);
|
||||
HTTP_CODE InitializeHandler(AtlServerRequest *pRequestInfo, IServiceProvider *pProvider);
|
||||
HTTP_CODE InitializeChild(AtlServerRequest *pRequestInfo, IServiceProvider *pProvider, IHttpRequestLookup *pLookup);
|
||||
HTTP_CODE HandleRequest(AtlServerRequest *pRequestInfo, IServiceProvider *pProvider);
|
||||
void UninitializeHandler();
|
||||
};
|
||||
|
||||
// ITagReplacer
|
||||
// This interface defines the methods necessary for server response file processing.
|
||||
__interface ATL_NO_VTABLE __declspec(uuid("8FF5E90C-8CE0-43aa-96C4-3BF930837512"))
|
||||
ITagReplacer : public IUnknown
|
||||
{
|
||||
HTTP_CODE FindReplacementOffset(LPCSTR szMethodName, DWORD *pdwMethodOffset,
|
||||
LPCSTR szObjectName, DWORD *pdwObjOffset, DWORD *pdwMap, void **ppvParam, IAtlMemMgr *pMemMgr);
|
||||
HTTP_CODE RenderReplacement(DWORD dwFnOffset, DWORD dwObjOffset, DWORD dwMap, void *pvParam);
|
||||
HRESULT GetContext(REFIID riid, void** ppv);
|
||||
IWriteStream *SetStream(IWriteStream *pStream);
|
||||
};
|
||||
|
||||
|
||||
struct CStencilState;
|
||||
|
||||
// IIsapiExtension
|
||||
// Tnis is the interface to the ISAPI extension of a running ATL Server web
|
||||
// application. Provides request handler clients with access to functions of the
|
||||
// ISAPI server.
|
||||
__interface __declspec(uuid("79DD4A27-D820-4fa6-954D-E1DFC2C05978"))
|
||||
IIsapiExtension : public IUnknown
|
||||
{
|
||||
BOOL DispatchStencilCall(AtlServerRequest *pRequestInfo);
|
||||
void RequestComplete(AtlServerRequest *pRequestInfo, DWORD hStatus, DWORD dwSubStatus);
|
||||
BOOL OnThreadAttach();
|
||||
void OnThreadTerminate();
|
||||
BOOL QueueRequest(AtlServerRequest *pRequestInfo);
|
||||
CIsapiWorker *GetThreadWorker();
|
||||
BOOL SetThreadWorker(CIsapiWorker *pWorker);
|
||||
HTTP_CODE LoadRequestHandler(LPCSTR szDllPath, LPCSTR szHandlerName, IHttpServerContext *pServerContext,
|
||||
HINSTANCE *phInstance, IRequestHandler **ppHandler);
|
||||
HRESULT AddService(REFGUID guidService, REFIID riid, IUnknown *punk, HINSTANCE hInstance);
|
||||
HRESULT RemoveService(REFGUID guidService, REFIID riid);
|
||||
HTTP_CODE LoadDispatchFile(LPCSTR szFileName, AtlServerRequest *pRequestInfo);
|
||||
|
||||
AtlServerRequest* CreateRequest();
|
||||
void FreeRequest(AtlServerRequest* pRequest);
|
||||
HTTP_CODE TransferRequest(
|
||||
AtlServerRequest *pRequest,
|
||||
IServiceProvider *pServiceProvider,
|
||||
IWriteStream *pWriteStream,
|
||||
IHttpRequestLookup *pLookup,
|
||||
LPCSTR szNewUrl,
|
||||
WORD nCodePage,
|
||||
bool bContinueAfterProcess,
|
||||
CStencilState *pState);
|
||||
};
|
||||
|
||||
// IPageCacheControl
|
||||
// This interface controls the cacheability of the current page
|
||||
__interface ATL_NO_VTABLE __declspec(uuid("9868BFC0-D44D-4154-931C-D186EC0C45D5"))
|
||||
IPageCacheControl : public IUnknown
|
||||
{
|
||||
HRESULT GetExpiration(FILETIME *pftExpiration);
|
||||
HRESULT SetExpiration(FILETIME ftExpiration);
|
||||
BOOL IsCached();
|
||||
BOOL Cache(BOOL bCache);
|
||||
};
|
||||
|
||||
// IRequestStats
|
||||
// Used to query request statistics from a running ATL server ISAPI application.
|
||||
__interface ATL_NO_VTABLE __declspec(uuid("2B75C68D-0DDF-48d6-B58A-CC7C2387A6F2"))
|
||||
IRequestStats : public IUnknown
|
||||
{
|
||||
long GetTotalRequests();
|
||||
long GetFailedRequests();
|
||||
long GetAvgResponseTime();
|
||||
long GetCurrWaiting();
|
||||
long GetMaxWaiting();
|
||||
long GetActiveThreads();
|
||||
};
|
||||
|
||||
// IBrowserCaps
|
||||
// Interface that provides information about a particular web brorwser.
|
||||
// See atlutil.h and the ATL Browser Capabilities service for information
|
||||
// about this interface's implementation
|
||||
__interface __declspec(uuid("3339FCE2-99BC-4985-A702-4ABC8304A995"))
|
||||
IBrowserCaps : public IUnknown
|
||||
{
|
||||
HRESULT GetPropertyString(BSTR bstrProperty, BSTR * pbstrOut);
|
||||
HRESULT GetBooleanPropertyValue(BSTR bstrProperty, BOOL* pbOut);
|
||||
HRESULT GetBrowserName(BSTR * pbstrName);
|
||||
HRESULT GetPlatform(BSTR * pbstrPlatform);
|
||||
HRESULT GetVersion(BSTR * pbstrVersion);
|
||||
HRESULT GetMajorVer(BSTR * pbstrMajorVer);
|
||||
HRESULT GetMinorVer(BSTR * pbstrMinorVer);
|
||||
HRESULT SupportsFrames(BOOL* pbFrames);
|
||||
HRESULT SupportsTables(BOOL* pbTables);
|
||||
HRESULT SupportsCookies(BOOL* pbCookies);
|
||||
HRESULT SupportsBackgroundSounds(BOOL* pbBackgroundSounds);
|
||||
HRESULT SupportsVBScript(BOOL* pbVBScript);
|
||||
HRESULT SupportsJavaScript(BOOL* pbJavaScript);
|
||||
HRESULT SupportsJavaApplets(BOOL* pbJavaApplets);
|
||||
HRESULT SupportsActiveXControls(BOOL* pbActiveXControls);
|
||||
HRESULT SupportsCDF(BOOL* pbCDF);
|
||||
HRESULT SupportsAuthenticodeUpdate(BOOL* pbAuthenticodeUpdate);
|
||||
HRESULT IsBeta(BOOL* pbIsBeta);
|
||||
HRESULT IsCrawler(BOOL* pbIsCrawler);
|
||||
HRESULT IsAOL(BOOL* pbIsAOL);
|
||||
HRESULT IsWin16(BOOL* pbIsWin16);
|
||||
HRESULT IsAK(BOOL* pbIsAK);
|
||||
HRESULT IsSK(BOOL* pbIsSK);
|
||||
HRESULT IsUpdate(BOOL* pbIsUpdate);
|
||||
};
|
||||
|
||||
// IBrowserCapsSvc.
|
||||
// Interface on the browser caps service. Used by clients to query a running
|
||||
// instance of the browser capabilities service for information about a user's web
|
||||
// browser. See atlutil.h for implementation of the browser capabilities services.
|
||||
__interface __declspec(uuid("391E7418-863B-430e-81BB-1312ED2FF3E9"))
|
||||
IBrowserCapsSvc : public IUnknown
|
||||
{
|
||||
HRESULT GetCaps(IHttpServerContext * pContext, IBrowserCaps ** ppOut);
|
||||
HRESULT GetCapsUserAgent(BSTR bstrAgent, IBrowserCaps ** ppOut);
|
||||
};
|
||||
|
||||
class CBrowserCapsSvc : public IBrowserCapsSvc,
|
||||
public CComObjectRootEx<CComSingleThreadModel>
|
||||
{
|
||||
public:
|
||||
virtual ~CBrowserCapsSvc()
|
||||
{
|
||||
}
|
||||
|
||||
BEGIN_COM_MAP(CBrowserCapsSvc)
|
||||
COM_INTERFACE_ENTRY(IBrowserCapsSvc)
|
||||
END_COM_MAP()
|
||||
|
||||
__success(SUCCEEDED(return)) __checkReturn HRESULT GetCaps(__in IHttpServerContext * pContext, __deref_out_opt IBrowserCaps ** ppOut)
|
||||
{
|
||||
if (!pContext)
|
||||
return E_POINTER;
|
||||
|
||||
if (!ppOut)
|
||||
return E_POINTER;
|
||||
|
||||
*ppOut = NULL;
|
||||
|
||||
char szUserAgent[256];
|
||||
DWORD dwSize = sizeof(szUserAgent);
|
||||
if (!pContext->GetServerVariable("HTTP_USER_AGENT", szUserAgent, &dwSize))
|
||||
return E_FAIL;
|
||||
|
||||
return GetCapsUserAgent(CComBSTR(szUserAgent), ppOut);
|
||||
}
|
||||
|
||||
__success(SUCCEEDED(return)) __checkReturn HRESULT GetCapsUserAgent(__in BSTR bstrAgent, __deref_out IBrowserCaps ** ppOut)
|
||||
{
|
||||
if (::SysStringLen(bstrAgent) == 0 || ppOut == NULL)
|
||||
{
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*ppOut = NULL;
|
||||
|
||||
BrowserCaps* pCaps = NULL;
|
||||
|
||||
_ATLTRY
|
||||
{
|
||||
CW2CT szUserAgent(bstrAgent);
|
||||
|
||||
if (!m_mapAgent.Lookup(szUserAgent, pCaps))
|
||||
{
|
||||
pCaps = NULL;
|
||||
for (size_t i=0; i<m_caps.GetCount(); i++)
|
||||
{
|
||||
BrowserCaps& caps = m_caps[i];
|
||||
if (IsEqualAgentString(caps.m_strUserAgent, szUserAgent))
|
||||
{
|
||||
pCaps = ∩︀
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_ATLCATCHALL()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 6014)
|
||||
if (pCaps != NULL)
|
||||
{
|
||||
CComObjectNoLock<CBrowserCaps> *pRet = NULL;
|
||||
|
||||
ATLTRY(pRet = new CComObjectNoLock<CBrowserCaps>);
|
||||
|
||||
if (!pRet)
|
||||
return E_OUTOFMEMORY;
|
||||
pRet->AddRef();
|
||||
|
||||
HRESULT hr = pRet->Initialize(pCaps);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
pRet->Release();
|
||||
return hr;
|
||||
}
|
||||
|
||||
*ppOut = pRet;
|
||||
return S_OK;
|
||||
}
|
||||
#pragma warning(pop)
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
__checkReturn HRESULT Initialize(__in HINSTANCE hInstance) throw()
|
||||
{
|
||||
// tries loading browscap.ini from the same directory as the module
|
||||
if (hInstance != NULL)
|
||||
{
|
||||
_ATLTRY
|
||||
{
|
||||
CPath strBrowscapPath;
|
||||
|
||||
LPTSTR sz = strBrowscapPath.m_strPath.GetBuffer(MAX_PATH);
|
||||
UINT nChars = ::GetModuleFileName(hInstance, sz, MAX_PATH);
|
||||
strBrowscapPath.m_strPath.ReleaseBuffer(nChars);
|
||||
if (nChars != 0 &&
|
||||
nChars != MAX_PATH &&
|
||||
strBrowscapPath.RemoveFileSpec())
|
||||
{
|
||||
strBrowscapPath += _T("\\browscap.ini");
|
||||
if (SUCCEEDED(Load(strBrowscapPath)))
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
_ATLCATCHALL()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
// falls back to the system browscap.ini if previous Load failed
|
||||
return Load();
|
||||
}
|
||||
|
||||
HRESULT Uninitialize()
|
||||
{
|
||||
Clear();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
static bool IsEqualAgentString(__in LPCTSTR szPattern, __in LPCTSTR szInput)
|
||||
{
|
||||
while (*szPattern && *szInput && (*szPattern == *szInput || *szPattern == '?'))
|
||||
{
|
||||
szPattern++;
|
||||
szInput++;
|
||||
}
|
||||
|
||||
if (*szPattern == *szInput)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*szPattern == '*')
|
||||
{
|
||||
szPattern++;
|
||||
if (!*szPattern)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
while(*szInput)
|
||||
{
|
||||
if (IsEqualAgentString(szPattern, szInput))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
szInput++;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
__checkReturn HRESULT Load(__in_opt LPCTSTR szPath = NULL)
|
||||
{
|
||||
_ATLTRY
|
||||
{
|
||||
Clear();
|
||||
|
||||
CString strBrowscapPath(szPath);
|
||||
|
||||
// use default load path if a path isn't specified
|
||||
if (strBrowscapPath.IsEmpty())
|
||||
{
|
||||
LPTSTR sz = strBrowscapPath.GetBuffer(MAX_PATH);
|
||||
UINT nChars = ::GetSystemDirectory(sz, MAX_PATH);
|
||||
strBrowscapPath.ReleaseBuffer(nChars);
|
||||
if (nChars == 0 || nChars == MAX_PATH)
|
||||
return E_FAIL;
|
||||
|
||||
strBrowscapPath += _T("\\inetsrv\\browscap.ini");
|
||||
}
|
||||
|
||||
size_t nCurrent = 16384;
|
||||
CHeapPtr<TCHAR> data;
|
||||
|
||||
if (!data.Allocate(nCurrent))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
// load the list of all the user agents
|
||||
bool bRetrieved = false;
|
||||
|
||||
do
|
||||
{
|
||||
DWORD dwRetrieved = ::GetPrivateProfileSectionNames(data, (DWORD) nCurrent, strBrowscapPath);
|
||||
if (dwRetrieved == 0)
|
||||
{
|
||||
return AtlHresultFromWin32(ERROR_FILE_NOT_FOUND);
|
||||
}
|
||||
else if (dwRetrieved < nCurrent-2)
|
||||
{
|
||||
bRetrieved = true;
|
||||
}
|
||||
else if(SIZE_MAX/2<nCurrent)
|
||||
{
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
else if (!data.Reallocate(nCurrent *= 2))
|
||||
{
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
} while (!bRetrieved);
|
||||
|
||||
// figure out how many user agents there are
|
||||
// and set them in the structure
|
||||
LPTSTR sz = data;
|
||||
int nSections = 0;
|
||||
while (*sz)
|
||||
{
|
||||
nSections++;
|
||||
sz += (lstrlen(sz)+1);
|
||||
}
|
||||
|
||||
if (!m_caps.SetCount(nSections))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
sz = data;
|
||||
nSections = 0;
|
||||
while (*sz)
|
||||
{
|
||||
BrowserCaps& caps = m_caps[nSections++];
|
||||
caps.m_strUserAgent = sz;
|
||||
m_mapAgent[caps.m_strUserAgent] = ∩︀
|
||||
sz += (caps.m_strUserAgent.GetLength()+1);
|
||||
}
|
||||
|
||||
// for each user agent, load the properties
|
||||
for (size_t i=0; i<m_caps.GetCount(); i++)
|
||||
{
|
||||
bRetrieved = false;
|
||||
BrowserCaps& caps = m_caps[i];
|
||||
caps.m_pParent = NULL;
|
||||
|
||||
do
|
||||
{
|
||||
DWORD dwRetrieved = ::GetPrivateProfileSection(caps.m_strUserAgent, data, (DWORD) nCurrent, strBrowscapPath);
|
||||
if (dwRetrieved == 0)
|
||||
{
|
||||
return AtlHresultFromWin32(ERROR_FILE_NOT_FOUND);
|
||||
}
|
||||
else if (dwRetrieved < nCurrent-2)
|
||||
{
|
||||
bRetrieved = true;
|
||||
}
|
||||
else if(SIZE_MAX/2<nCurrent)
|
||||
{
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
else if (!data.Reallocate(nCurrent *= 2))
|
||||
{
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
} while (!bRetrieved);
|
||||
|
||||
sz = data;
|
||||
while (*sz)
|
||||
{
|
||||
CString str = sz;
|
||||
int nChar = str.Find('=');
|
||||
if (nChar != -1)
|
||||
{
|
||||
CString strPropName = str.Left(nChar);
|
||||
CString strPropVal = str.Mid(nChar+1);
|
||||
strPropName.Trim();
|
||||
strPropVal.Trim();
|
||||
caps.m_props.SetAt(strPropName, strPropVal);
|
||||
|
||||
// if it's the parent property, set up the parent pointer
|
||||
if (strPropName.CompareNoCase(_T("parent")) == 0)
|
||||
{
|
||||
BrowserCaps* pParent = NULL;
|
||||
if (m_mapAgent.Lookup(strPropVal, pParent))
|
||||
caps.m_pParent = pParent;
|
||||
}
|
||||
}
|
||||
sz += (str.GetLength()+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
_ATLCATCHALL()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
m_caps.RemoveAll();
|
||||
m_mapAgent.RemoveAll();
|
||||
}
|
||||
|
||||
friend class CBrowserCaps;
|
||||
|
||||
struct BrowserCaps
|
||||
{
|
||||
CString m_strUserAgent; // user agent string to match against (with wildcards)
|
||||
BrowserCaps* m_pParent;
|
||||
CAtlMap<CString, CString, CStringElementTraitsI<CString>, CStringElementTraits<CString> > m_props;
|
||||
};
|
||||
|
||||
// map from UserAgent string to caps
|
||||
// used for non-wildcard lookup and parent lookup
|
||||
CAtlMap<CString, BrowserCaps*, CStringElementTraits<CString> > m_mapAgent;
|
||||
|
||||
// all of the caps
|
||||
CAtlArray<BrowserCaps> m_caps;
|
||||
|
||||
class CBrowserCaps : public IBrowserCaps, public CComObjectRootEx<CComSingleThreadModel>
|
||||
{
|
||||
public:
|
||||
|
||||
BEGIN_COM_MAP(CBrowserCaps)
|
||||
COM_INTERFACE_ENTRY(IBrowserCaps)
|
||||
END_COM_MAP()
|
||||
|
||||
CBrowserCaps()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT Initialize(__in CBrowserCapsSvc::BrowserCaps * pCaps)
|
||||
{
|
||||
m_pCaps = pCaps;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
__checkReturn HRESULT GetPropertyString(__in BSTR bstrProperty, __out BSTR * pbstrOut)
|
||||
{
|
||||
_ATLTRY
|
||||
{
|
||||
ATLASSUME(m_pCaps);
|
||||
if (!m_pCaps)
|
||||
return E_UNEXPECTED;
|
||||
|
||||
if (!pbstrOut)
|
||||
return E_POINTER;
|
||||
|
||||
*pbstrOut = NULL;
|
||||
|
||||
CString strName(bstrProperty);
|
||||
CString strVal;
|
||||
|
||||
CBrowserCapsSvc::BrowserCaps * pCaps = m_pCaps;
|
||||
while (pCaps)
|
||||
{
|
||||
if (pCaps->m_props.Lookup(strName, strVal))
|
||||
{
|
||||
CComBSTR bstrVal(strVal);
|
||||
*pbstrOut = bstrVal.Detach();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
pCaps = pCaps->m_pParent;
|
||||
}
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
_ATLCATCHALL()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
__checkReturn HRESULT GetBooleanPropertyValue(__in BSTR bstrProperty, __out BOOL* pbOut)
|
||||
{
|
||||
if (!pbOut)
|
||||
return E_POINTER;
|
||||
|
||||
CComBSTR bstrOut;
|
||||
HRESULT hr = GetPropertyString(bstrProperty, &bstrOut);
|
||||
if (FAILED(hr) || S_FALSE == hr)
|
||||
return hr;
|
||||
|
||||
if (_wcsicmp(bstrOut, L"true") == 0)
|
||||
*pbOut = TRUE;
|
||||
else
|
||||
*pbOut = FALSE;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
__checkReturn HRESULT GetBrowserName(__out BSTR * pbstrName)
|
||||
{
|
||||
return GetPropertyString(CComBSTR(L"browser"), pbstrName);
|
||||
}
|
||||
|
||||
__checkReturn HRESULT GetPlatform(__out BSTR * pbstrPlatform)
|
||||
{
|
||||
return GetPropertyString(CComBSTR(L"platform"), pbstrPlatform);
|
||||
}
|
||||
|
||||
__checkReturn HRESULT GetVersion(__out BSTR * pbstrVersion)
|
||||
{
|
||||
return GetPropertyString(CComBSTR(L"version"), pbstrVersion);
|
||||
}
|
||||
|
||||
__checkReturn HRESULT GetMajorVer(__out BSTR * pbstrMajorVer)
|
||||
{
|
||||
return GetPropertyString(CComBSTR(L"majorver"), pbstrMajorVer);
|
||||
}
|
||||
|
||||
__checkReturn HRESULT GetMinorVer(__out BSTR * pbstrMinorVer)
|
||||
{
|
||||
return GetPropertyString(CComBSTR(L"minorver"), pbstrMinorVer);
|
||||
}
|
||||
|
||||
__checkReturn HRESULT SupportsFrames(__out BOOL* pbFrames)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"frames"), pbFrames);
|
||||
}
|
||||
|
||||
__checkReturn HRESULT SupportsTables(__out BOOL* pbTables)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"tables"), pbTables);
|
||||
}
|
||||
__checkReturn HRESULT SupportsCookies(__out BOOL* pbCookies)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"cookies"), pbCookies);
|
||||
}
|
||||
__checkReturn HRESULT SupportsBackgroundSounds(__out BOOL* pbBackgroundSounds)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"backgroundsounds"), pbBackgroundSounds);
|
||||
}
|
||||
__checkReturn HRESULT SupportsVBScript(__out BOOL* pbVBScript)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"vbscript"), pbVBScript);
|
||||
}
|
||||
__checkReturn HRESULT SupportsJavaScript(__out BOOL* pbJavaScript)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"javascript"), pbJavaScript);
|
||||
}
|
||||
__checkReturn HRESULT SupportsJavaApplets(__out BOOL* pbJavaApplets)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"javaapplets"), pbJavaApplets);
|
||||
}
|
||||
__checkReturn HRESULT SupportsActiveXControls(__out BOOL* pbActiveXControls)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"ActiveXControls"), pbActiveXControls);
|
||||
}
|
||||
__checkReturn HRESULT SupportsCDF(__out BOOL* pbCDF)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"CDF"), pbCDF);
|
||||
}
|
||||
__checkReturn HRESULT SupportsAuthenticodeUpdate(__out BOOL* pbAuthenticodeUpdate)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"AuthenticodeUpdate"), pbAuthenticodeUpdate);
|
||||
}
|
||||
__checkReturn HRESULT IsBeta(__out BOOL* pbIsBeta)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"beta"), pbIsBeta);
|
||||
}
|
||||
__checkReturn HRESULT IsCrawler(__out BOOL* pbIsCrawler)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"Crawler"), pbIsCrawler);
|
||||
}
|
||||
__checkReturn HRESULT IsAOL(__out BOOL* pbIsAOL)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"AOL"), pbIsAOL);
|
||||
}
|
||||
__checkReturn HRESULT IsWin16(__out BOOL* pbIsWin16)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"Win16"), pbIsWin16);
|
||||
}
|
||||
__checkReturn HRESULT IsAK(__out BOOL* pbIsAK)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"AK"), pbIsAK);
|
||||
}
|
||||
__checkReturn HRESULT IsSK(__out BOOL* pbIsSK)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"SK"), pbIsSK);
|
||||
}
|
||||
__checkReturn HRESULT IsUpdate(__out BOOL* pbIsUpdate)
|
||||
{
|
||||
return GetBooleanPropertyValue(CComBSTR(L"Update"), pbIsUpdate);
|
||||
}
|
||||
|
||||
private:
|
||||
CBrowserCapsSvc::BrowserCaps * m_pCaps;
|
||||
};
|
||||
};
|
||||
|
||||
typedef DWORD_PTR HSESSIONENUM;
|
||||
|
||||
// ISession
|
||||
// Interface on a single client session. Used to access variables in the client
|
||||
// session in the session state services. See atlsession.h for implementation of
|
||||
// this interface.
|
||||
__interface __declspec(uuid("DEB69BE3-7AC9-4a13-9519-266C1EA3AB39"))
|
||||
ISession : public IUnknown
|
||||
{
|
||||
STDMETHOD(SetVariable)(LPCSTR szName, VARIANT NewVal);
|
||||
STDMETHOD(GetVariable)(LPCSTR szName, VARIANT *pVal);
|
||||
STDMETHOD(GetCount)(long *pnCount);
|
||||
STDMETHOD(RemoveVariable)(LPCSTR szName);
|
||||
STDMETHOD(RemoveAllVariables)();
|
||||
STDMETHOD(BeginVariableEnum)(POSITION *pPOS, HSESSIONENUM *phEnumHandle);
|
||||
STDMETHOD(GetNextVariable)(POSITION *pPOS, VARIANT *pVal, HSESSIONENUM hEnum, LPSTR szName, DWORD dwLen);
|
||||
STDMETHOD(CloseEnum)(HSESSIONENUM hEnumHandle);
|
||||
STDMETHOD(IsExpired)();
|
||||
STDMETHOD(SetTimeout)(unsigned __int64 dwNewTimeout);
|
||||
}; //ISession
|
||||
|
||||
|
||||
// ISessionStateService
|
||||
// Interface on the session state service for an ISAPI application. Request
|
||||
// handler objects will use this interface to access user sessions. See
|
||||
// atlsession.h for implementation of this interface.
|
||||
__interface __declspec(uuid("C5740C4F-0C6D-4b43-92C4-2AF778F35DDE"))
|
||||
ISessionStateService : public IUnknown
|
||||
{
|
||||
STDMETHOD(CreateNewSession)(LPSTR szNewID, DWORD *pdwSize, ISession** ppSession);
|
||||
STDMETHOD(CreateNewSessionByName)(LPSTR szNewID, ISession** ppSession);
|
||||
STDMETHOD(GetSession)(LPCSTR szID, ISession **ppSession);
|
||||
STDMETHOD(CloseSession)(LPCSTR szID);
|
||||
};
|
||||
|
||||
// ISessionStateControl
|
||||
// Interface used by session state service to get information about the service.
|
||||
// Currently you can get the count of active sessions and the current default
|
||||
// timeout for a session.
|
||||
__interface __declspec(uuid("6C7F5F56-6CBD-49ee-9797-4C837D4C527A"))
|
||||
ISessionStateControl : public IUnknown
|
||||
{
|
||||
STDMETHOD(SetSessionTimeout)(unsigned __int64 nTimeout);
|
||||
STDMETHOD(GetSessionTimeout)(unsigned __int64 *pnTimeout);
|
||||
STDMETHOD(GetSessionCount)(DWORD *pnSessionCount);
|
||||
};
|
||||
|
||||
}; // namespace ATL
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif // __ATLSIFACE_H__
|
||||
@@ -1,926 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#ifndef __ATLSMTPCONNECTION_H__
|
||||
#define __ATLSMTPCONNECTION_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _ATL_NO_DEFAULT_LIBS
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
#endif // !_ATL_NO_DEFAULT_LIBS
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <tchar.h>
|
||||
#include <atlstr.h>
|
||||
#include <atlcoll.h>
|
||||
#include <atlfile.h>
|
||||
#include <atlmime.h>
|
||||
#include <atlspriv.h>
|
||||
#include <atlsmtputil.h>
|
||||
#include <atlsocket.h>
|
||||
|
||||
// SMTP Return Codes
|
||||
#define ATLSMTP_MAIL_SUCCESS 250
|
||||
#define ATLSMTP_RCPT_SUCCESS 250
|
||||
#define ATLSMTP_RCPT_NOT_LOCAL 251
|
||||
#define ATLSMTP_DATA_INTERMEDIATE 354
|
||||
|
||||
#define ATLSMTP_CONN_SUCC "220"
|
||||
#define ATLSMTP_HELO_SUCC "250"
|
||||
#define ATLSMTP_MAIL_SUCC "250"
|
||||
#define ATLSMTP_RCPT_SUCC "250"
|
||||
#define ATLSMTP_RCPT_NLOC "251"
|
||||
#define ATLSMTP_DATA_INTM "354"
|
||||
#define ATLSMTP_DATA_SUCC "250"
|
||||
#define ATLSMTP_RSET_SUCC "250"
|
||||
|
||||
// SMTP flags
|
||||
#define ATLSMTP_DUMP_SENDER 1
|
||||
#define ATLSMTP_DUMP_RECIPS 2
|
||||
#define ATLSMTP_FOR_SEND 4
|
||||
|
||||
|
||||
struct CSMTPWSAStartup
|
||||
{
|
||||
private:
|
||||
bool m_bInit;
|
||||
|
||||
public:
|
||||
CSMTPWSAStartup() throw()
|
||||
:m_bInit(false)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
~CSMTPWSAStartup() throw()
|
||||
{
|
||||
Uninit();
|
||||
}
|
||||
|
||||
bool Init() throw()
|
||||
{
|
||||
if (m_bInit)
|
||||
return true;
|
||||
|
||||
WSADATA wsadata;
|
||||
if (WSAStartup(ATLSMTP_WSA_VERSION, &wsadata))
|
||||
return false;
|
||||
m_bInit = true;
|
||||
ATLASSERT(wsadata.wHighVersion >= 2);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Uninit() throw()
|
||||
{
|
||||
if (m_bInit)
|
||||
if (WSACleanup())
|
||||
return false;
|
||||
m_bInit = false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
__declspec(selectany) CSMTPWSAStartup _g_smtp_init;
|
||||
|
||||
#pragma pack(push,_ATL_PACKING)
|
||||
namespace ATL {
|
||||
|
||||
class CSMTPConnection
|
||||
{
|
||||
protected:
|
||||
|
||||
// the socket
|
||||
SOCKET m_hSocket;
|
||||
|
||||
// the OVERLAPPED struct
|
||||
OVERLAPPED m_Overlapped;
|
||||
|
||||
public:
|
||||
|
||||
CSMTPConnection() throw()
|
||||
:m_hSocket(INVALID_SOCKET)
|
||||
{
|
||||
// initialize the OVERLAPPED struct
|
||||
memset(&m_Overlapped, 0, sizeof(OVERLAPPED));
|
||||
}
|
||||
|
||||
~CSMTPConnection() throw()
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
|
||||
// Attempt to connect to the socket
|
||||
// lpszHostName - the host name to connect to
|
||||
BOOL Connect(LPCTSTR lpszHostName, DWORD dwTimeout = 10000) throw()
|
||||
{
|
||||
ATLASSERT(lpszHostName != NULL);
|
||||
|
||||
// If we're already connected
|
||||
if (Connected())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!_g_smtp_init.Init())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CSocketAddr address;
|
||||
if (address.FindAddr(lpszHostName, IPPORT_SMTP, 0, PF_UNSPEC, SOCK_STREAM, 0))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ADDRINFOT *pAI;
|
||||
|
||||
BOOL bRet = FALSE;
|
||||
int nIndex = 0;
|
||||
while ((pAI = address.GetAddrInfo(nIndex++)) != NULL)
|
||||
{
|
||||
// create the socket
|
||||
m_hSocket = WSASocket(pAI->ai_family, pAI->ai_socktype, pAI->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
|
||||
|
||||
if (m_hSocket == INVALID_SOCKET)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bRet = FALSE;
|
||||
WSAEVENT hEventConnect = WSACreateEvent();
|
||||
if (hEventConnect != NULL)
|
||||
{
|
||||
if (SOCKET_ERROR != WSAEventSelect(m_hSocket, hEventConnect, FD_CONNECT))
|
||||
{
|
||||
if (WSAConnect(m_hSocket, pAI->ai_addr, (int)pAI->ai_addrlen,
|
||||
NULL, NULL, NULL, NULL))
|
||||
{
|
||||
if (WSAGetLastError() == WSAEWOULDBLOCK)
|
||||
{
|
||||
DWORD dwWait = WaitForSingleObject((HANDLE) hEventConnect, dwTimeout);
|
||||
if (dwWait == WAIT_OBJECT_0)
|
||||
{
|
||||
// make sure there were no connection errors.
|
||||
WSANETWORKEVENTS wse;
|
||||
ZeroMemory(&wse, sizeof(wse));
|
||||
WSAEnumNetworkEvents(m_hSocket, NULL, &wse);
|
||||
if (wse.iErrorCode[FD_CONNECT_BIT]==0)
|
||||
{
|
||||
bRet = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we're done with the event
|
||||
WSACloseEvent(hEventConnect);
|
||||
}
|
||||
if (bRet)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
shutdown(m_hSocket, SD_BOTH);
|
||||
closesocket(m_hSocket);
|
||||
m_hSocket = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
|
||||
// Create an event for asynchronous I/O
|
||||
if (bRet)
|
||||
{
|
||||
ATLASSUME(m_Overlapped.hEvent == NULL);
|
||||
m_Overlapped.hEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
|
||||
if (m_Overlapped.hEvent == NULL)
|
||||
{
|
||||
bRet = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
char szBuf[ATLSMTP_MAX_LINE_LENGTH+1];
|
||||
int nBufLen = ATLSMTP_MAX_LINE_LENGTH;
|
||||
if (bRet)
|
||||
{
|
||||
// See if the connect returns success
|
||||
bRet = AtlSmtpReadData((HANDLE)m_hSocket, szBuf, &nBufLen, &m_Overlapped);
|
||||
if (bRet)
|
||||
{
|
||||
if (strncmp(szBuf, ATLSMTP_CONN_SUCC, ATLSMTP_RETCODE_LEN))
|
||||
{
|
||||
bRet = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
char szLocalHost[ATLSMTP_MAX_SERVER_NAME_LENGTH+1];
|
||||
|
||||
// gethostname should return 0 on success
|
||||
if (bRet && gethostname(szLocalHost, ATLSMTP_MAX_SERVER_NAME_LENGTH))
|
||||
{
|
||||
bRet = FALSE;
|
||||
}
|
||||
|
||||
// Send HELO command and get reply
|
||||
if (bRet)
|
||||
{
|
||||
nBufLen = sprintf_s(szBuf, ATLSMTP_MAX_LINE_LENGTH+1, "HELO %s\r\n", szLocalHost);
|
||||
if (nBufLen > 0)
|
||||
{
|
||||
bRet = AtlSmtpSendAndCheck((HANDLE)m_hSocket, szBuf, nBufLen, szBuf, &nBufLen,
|
||||
ATLSMTP_MAX_LINE_LENGTH, ATLSMTP_HELO_SUCC, &m_Overlapped);
|
||||
}
|
||||
else
|
||||
{
|
||||
bRet = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bRet)
|
||||
{
|
||||
if (m_Overlapped.hEvent != NULL)
|
||||
CloseHandle(m_Overlapped.hEvent);
|
||||
shutdown(m_hSocket, SD_BOTH);
|
||||
closesocket(m_hSocket);
|
||||
m_hSocket = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
// Disconnect the socket
|
||||
inline BOOL Disconnect() throw()
|
||||
{
|
||||
if (!Connected())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// shutdown should return 0 on success
|
||||
if (shutdown(m_hSocket, SD_BOTH))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// closesocket should return 0 on success
|
||||
if (closesocket(m_hSocket))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// close the handle to the overlapped event
|
||||
CloseHandle(m_Overlapped.hEvent);
|
||||
m_hSocket = INVALID_SOCKET;
|
||||
memset((void*)&m_Overlapped, 0, sizeof(OVERLAPPED));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Are we connected?
|
||||
inline BOOL Connected() throw()
|
||||
{
|
||||
return (m_hSocket != INVALID_SOCKET ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
// Send a message from a file
|
||||
// lpszFileName - the file containing the message
|
||||
// lpszRecipients - the recipients to send to (optional - if not specified, the recipients specified
|
||||
// in the file will be used
|
||||
// lpszSender - the sender (optional - if not specified, the recipients specified in the file
|
||||
// will be used
|
||||
BOOL SendMessage(LPCTSTR lpszFileName, LPCTSTR lpszRecipients = NULL, LPCTSTR lpszSender = NULL) throw()
|
||||
{
|
||||
if (!Connected())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//Try to open the file
|
||||
CAtlFile readFile;
|
||||
if (FAILED(readFile.Create(lpszFileName, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL)))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
char szBuf[ATLSMTP_MAX_LINE_LENGTH+1];
|
||||
int nBufLen = ATLSMTP_MAX_LINE_LENGTH;
|
||||
BOOL bDumpedSender = FALSE;
|
||||
|
||||
//If the caller specifies the sender, rather than having an existing one in the file...
|
||||
if (lpszSender)
|
||||
{
|
||||
nBufLen = sprintf_s(szBuf, ATLSMTP_MAX_LINE_LENGTH+1,
|
||||
"MAIL FROM:<%s>\r\n", (LPCSTR) CT2CA(lpszSender));
|
||||
if ((nBufLen < 0) ||
|
||||
(!AtlSmtpSendAndCheck((HANDLE)m_hSocket, szBuf, nBufLen, szBuf, &nBufLen, ATLSMTP_MAX_LINE_LENGTH,
|
||||
ATLSMTP_MAIL_SUCC, &m_Overlapped)))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
bDumpedSender = TRUE;
|
||||
}
|
||||
nBufLen = ATLSMTP_MAX_LINE_LENGTH;
|
||||
|
||||
#ifdef ATLSMTP_DOUBLE_BUFFERED
|
||||
char buffer1[ATLSMTP_READBUFFER_SIZE];
|
||||
char buffer2[ATLSMTP_READBUFFER_SIZE];
|
||||
char* currBuffer = buffer1;
|
||||
char* prevBuffer = NULL;
|
||||
|
||||
int nCurrBuffer = 0;
|
||||
DWORD dwPrevLength = 0;
|
||||
DWORD dwWritten = 0;
|
||||
#else
|
||||
char bakBuffer[ATLSMTP_READBUFFER_SIZE];
|
||||
char* currBuffer = bakBuffer;
|
||||
|
||||
#endif // ATLSMTP_DOUBLE_BUFFERED
|
||||
DWORD dwRead = 0;
|
||||
DWORD dwBytesInBuffer = 0;
|
||||
DWORD dwBufPos = 0;
|
||||
|
||||
//first handle the MAIL FROM and RCPT TO commands
|
||||
BOOL bDumpedRecipients = FALSE;
|
||||
BOOL bRet = TRUE;
|
||||
while (bRet)
|
||||
{
|
||||
int nRetCode = 0;
|
||||
|
||||
//if we have dumped the sender, and we have extra recipients to send,
|
||||
//and we haven't alredy done so, do it
|
||||
if (lpszRecipients && !bDumpedRecipients && bDumpedSender)
|
||||
{
|
||||
bRet = DumpRecipients((HANDLE)m_hSocket, CT2A(lpszRecipients), &m_Overlapped, ATLSMTP_FOR_SEND);
|
||||
}
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
dwRead = 0;
|
||||
BOOL bFullLine = FALSE;
|
||||
bRet = ReadLine(readFile, currBuffer, szBuf, &dwBytesInBuffer, &dwBufPos,
|
||||
ATLSMTP_READBUFFER_SIZE, ATLSMTP_MAX_LINE_LENGTH, &dwRead, &bFullLine);
|
||||
if (dwRead == 0 || bFullLine == FALSE)
|
||||
bRet = FALSE;
|
||||
}
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
bRet = AtlSmtpSendAndWait((HANDLE)m_hSocket, szBuf, (int)(dwRead), &m_Overlapped);
|
||||
}
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
nBufLen = ATLSMTP_MAX_LINE_LENGTH;
|
||||
bRet = AtlSmtpReadData((HANDLE)m_hSocket, szBuf, &nBufLen, &m_Overlapped);
|
||||
}
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
nRetCode = atoi(szBuf);
|
||||
//if the command is equal to ATLSMTP_MAIL_SUCC (or RCPT_SUCC: they are equivalent)
|
||||
if (nRetCode == ATLSMTP_MAIL_SUCCESS || nRetCode == ATLSMTP_RCPT_NOT_LOCAL || nRetCode == ATLSMTP_RCPT_SUCCESS)
|
||||
{
|
||||
bDumpedSender = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
//If the command is equal to the data intermediate success code,
|
||||
//break out of the loop
|
||||
if (nRetCode == ATLSMTP_DATA_INTERMEDIATE)
|
||||
break;
|
||||
}
|
||||
|
||||
//otherwise, we got an error code
|
||||
CancelMessage();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
dwRead = dwBytesInBuffer;
|
||||
currBuffer+= dwBufPos;
|
||||
DWORD dwErr = 0;
|
||||
do
|
||||
{
|
||||
dwErr = 0;
|
||||
|
||||
//Try to send the data
|
||||
#ifdef ATLSMTP_DOUBLE_BUFFERED
|
||||
if (!AtlSmtpSendOverlapped((HANDLE)m_hSocket, currBuffer, dwRead, prevBuffer, dwPrevLength, &m_Overlapped))
|
||||
{
|
||||
bRet = FALSE;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
if (!AtlSmtpSendAndWait((HANDLE)m_hSocket, currBuffer, dwRead, &m_Overlapped))
|
||||
{
|
||||
bRet = FALSE;
|
||||
break;
|
||||
}
|
||||
#endif // ATLSMTP_DOUBLE_BUFFERED
|
||||
|
||||
//swap the current and previous buffer
|
||||
#ifdef ATLSMTP_DOUBLE_BUFFERED
|
||||
prevBuffer = currBuffer;
|
||||
currBuffer = (nCurrBuffer == 0 ? buffer2 : buffer1);
|
||||
nCurrBuffer = (nCurrBuffer == 0 ? 1 : 0);
|
||||
dwPrevLength = dwBytesInBuffer;
|
||||
#else
|
||||
currBuffer = bakBuffer;
|
||||
#endif // ATLSMTP_DOUBLE_BUFFERED
|
||||
|
||||
if (FAILED(readFile.Read(currBuffer, ATLSMTP_READBUFFER_SIZE, dwRead)))
|
||||
{
|
||||
bRet = FALSE;
|
||||
break;
|
||||
}
|
||||
} while (dwRead != 0);
|
||||
|
||||
//ensure that the last of the data is sent
|
||||
#ifdef ATLSMTP_DOUBLE_BUFFERED
|
||||
if (!GetOverlappedResult((HANDLE)m_hSocket, &m_Overlapped, &dwWritten, TRUE))
|
||||
{
|
||||
if ((dwErr = GetLastError()) != ERROR_IO_PENDING && dwErr != ERROR_IO_INCOMPLETE)
|
||||
bRet = FALSE;
|
||||
else if (dwWritten < dwPrevLength)
|
||||
bRet = AtlSmtpSendAndWait((HANDLE)m_hSocket, prevBuffer+dwWritten, dwPrevLength-dwWritten, &m_Overlapped);
|
||||
}
|
||||
#endif // ATLSMTP_DOUBLE_BUFFERED
|
||||
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
// End the message with a CRLF.CRLF
|
||||
nBufLen = sprintf_s(szBuf, _countof(szBuf), "\r\n.\r\n");
|
||||
if (!AtlSmtpSendAndCheck((HANDLE)m_hSocket, szBuf, nBufLen,
|
||||
szBuf, &nBufLen, ATLSMTP_MAX_LINE_LENGTH, ATLSMTP_DATA_SUCC, &m_Overlapped))
|
||||
{
|
||||
bRet = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
// Send the message
|
||||
// msg - the CMimeMessage to send
|
||||
// lpszSender - the sender
|
||||
inline BOOL SendMessage(CMimeMessage& msg, LPCTSTR lpszRecipients = NULL, LPCTSTR lpszSender = NULL) throw()
|
||||
{
|
||||
if (!Connected())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
char szBuf[ATLSMTP_MAX_LINE_LENGTH+1];
|
||||
|
||||
//Send MAIL FROM command and get reply
|
||||
int nBufLen = sprintf_s(szBuf, ATLSMTP_MAX_LINE_LENGTH+1, "MAIL FROM:<%s>\r\n",
|
||||
(lpszSender ? (LPCSTR) CT2CA(lpszSender) : msg.GetSender()));
|
||||
if ((nBufLen < 0) ||
|
||||
(!AtlSmtpSendAndCheck((HANDLE)m_hSocket, szBuf, nBufLen,
|
||||
szBuf, &nBufLen, ATLSMTP_MAX_LINE_LENGTH, ATLSMTP_MAIL_SUCC, &m_Overlapped)))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL bRet = TRUE;
|
||||
if (!lpszRecipients)
|
||||
{
|
||||
LPSTR lpszRecipientsA = NULL;
|
||||
DWORD dwLen = msg.GetRequiredRecipientsStringLength();
|
||||
lpszRecipientsA = static_cast<LPSTR>(calloc(sizeof(char),dwLen));
|
||||
if (!lpszRecipientsA || msg.GetRecipientsString(lpszRecipientsA, &dwLen) == FALSE)
|
||||
{
|
||||
bRet = FALSE;
|
||||
}
|
||||
if (bRet)
|
||||
bRet = DumpRecipients((HANDLE)m_hSocket, lpszRecipientsA, &m_Overlapped, ATLSMTP_FOR_SEND);
|
||||
free(lpszRecipientsA);
|
||||
}
|
||||
else
|
||||
{
|
||||
bRet = DumpRecipients((HANDLE)m_hSocket, CT2CA(lpszRecipients),
|
||||
&m_Overlapped, ATLSMTP_FOR_SEND);
|
||||
}
|
||||
|
||||
//Begin the data output
|
||||
if (bRet)
|
||||
{
|
||||
nBufLen = sprintf_s(szBuf, _countof(szBuf), "DATA\r\n");
|
||||
bRet = AtlSmtpSendAndCheck((HANDLE)m_hSocket, szBuf, nBufLen,
|
||||
szBuf, &nBufLen, ATLSMTP_MAX_LINE_LENGTH, ATLSMTP_DATA_INTM, &m_Overlapped);
|
||||
}
|
||||
|
||||
if (!bRet)
|
||||
CancelMessage();
|
||||
|
||||
//Attempt to write the data to the socket
|
||||
if (bRet)
|
||||
{
|
||||
bRet = msg.WriteData((HANDLE)m_hSocket, &m_Overlapped, NULL, ATLSMTP_FORMAT_SMTP);
|
||||
}
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
//End the message with a <CRLF>.<CRLF>
|
||||
nBufLen = sprintf_s(szBuf, _countof(szBuf), "\r\n.\r\n");
|
||||
if (!AtlSmtpSendAndCheck((HANDLE)m_hSocket, szBuf, nBufLen,
|
||||
szBuf, &nBufLen, ATLSMTP_MAX_LINE_LENGTH, ATLSMTP_DATA_SUCC, &m_Overlapped))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
// Send a chunk of raw data
|
||||
inline BOOL SendRaw(LPCTSTR lpszRawData, DWORD dwLen, LPCTSTR lpszRecipients, LPCTSTR lpszSender) throw()
|
||||
{
|
||||
ATLASSERT(lpszRawData != NULL);
|
||||
ATLASSERT(lpszRecipients != NULL);
|
||||
ATLASSERT(lpszSender != NULL);
|
||||
|
||||
if (!Connected())
|
||||
return FALSE;
|
||||
|
||||
char szBuf[ATLSMTP_MAX_LINE_LENGTH+1];
|
||||
|
||||
//Send MAIL FROM command and get reply
|
||||
int nBufLen = sprintf_s(szBuf, ATLSMTP_MAX_LINE_LENGTH+1,
|
||||
"MAIL FROM:<%s>\r\n", (LPCSTR) CT2CA(lpszSender));
|
||||
if ((nBufLen < 0) ||
|
||||
(!AtlSmtpSendAndCheck((HANDLE)m_hSocket, szBuf, nBufLen,
|
||||
szBuf, &nBufLen, ATLSMTP_MAX_LINE_LENGTH, ATLSMTP_MAIL_SUCC, &m_Overlapped)))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL bRet = DumpRecipients((HANDLE)m_hSocket, CT2CA(lpszRecipients),
|
||||
&m_Overlapped, ATLSMTP_FOR_SEND);
|
||||
|
||||
// Begin the data output
|
||||
if (bRet)
|
||||
{
|
||||
nBufLen = sprintf_s(szBuf, _countof(szBuf), "DATA\r\n");
|
||||
bRet = AtlSmtpSendAndCheck((HANDLE)m_hSocket, szBuf, nBufLen,
|
||||
szBuf, &nBufLen, ATLSMTP_MAX_LINE_LENGTH, ATLSMTP_DATA_INTM, &m_Overlapped);
|
||||
}
|
||||
|
||||
if (!bRet)
|
||||
CancelMessage();
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
bRet = AtlSmtpSendAndWait((HANDLE)m_hSocket, (LPSTR)(lpszRawData), dwLen, &m_Overlapped);
|
||||
}
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
//End the message with a <CRLF>.<CRLF>
|
||||
nBufLen = sprintf_s(szBuf, _countof(szBuf), "\r\n.\r\n");
|
||||
if (!AtlSmtpSendAndCheck((HANDLE)m_hSocket, szBuf, nBufLen,
|
||||
szBuf, &nBufLen, ATLSMTP_MAX_LINE_LENGTH, ATLSMTP_DATA_SUCC, &m_Overlapped))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
inline BOOL SendSimple(LPCTSTR lpszRecipients, LPCTSTR lpszSender, LPCTSTR lpszSubject, LPCTSTR lpszBody, int nTextLen = -1) throw()
|
||||
{
|
||||
CMimeMessage msg;
|
||||
BOOL bRet = msg.SetSubject(lpszSubject);
|
||||
if (bRet)
|
||||
bRet = msg.AddText(lpszBody, nTextLen);
|
||||
|
||||
CFixedStringT<CString, MAX_PATH> strRecip;
|
||||
LPCTSTR szTmp = lpszRecipients;
|
||||
LPCTSTR szTmp2 = lpszRecipients;
|
||||
while (*szTmp && bRet)
|
||||
{
|
||||
if (AtlSmtpIsRecipientDelimiter((char) *szTmp2))
|
||||
{
|
||||
_ATLTRY
|
||||
{
|
||||
strRecip.SetString(szTmp, (int)(szTmp2-szTmp));
|
||||
bRet = msg.AddRecipient((LPCTSTR) strRecip);
|
||||
|
||||
if (*szTmp2)
|
||||
{
|
||||
while (*szTmp2 && AtlSmtpIsRecipientDelimiter((char) *szTmp2))
|
||||
{
|
||||
szTmp2++;
|
||||
}
|
||||
}
|
||||
szTmp = szTmp2;
|
||||
}
|
||||
_ATLCATCHALL()
|
||||
{
|
||||
bRet = FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
szTmp2++;
|
||||
}
|
||||
}
|
||||
|
||||
if (bRet)
|
||||
bRet = SendMessage(msg, lpszRecipients, lpszSender);
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
// Save a MIME message to a file
|
||||
// lpszFileName - the file name
|
||||
// lpszRecipients - the recipients string (optional)
|
||||
// lpszSender - the sender (optional)
|
||||
// dwFlags - the flags (optional)
|
||||
inline BOOL WriteToFile(LPCTSTR lpszFileName, CMimeMessage& msg, LPCTSTR lpszRecipients = NULL,
|
||||
LPCTSTR lpszSender = NULL, DWORD dwFlags = 0) throw()
|
||||
{
|
||||
//Try to create/open the file
|
||||
HANDLE hFile = CreateFile(lpszFileName, GENERIC_WRITE, 0, NULL,
|
||||
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL);
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Use CHandle to close the file handle
|
||||
// (CAtlFile does not allow for overlapped I/O)
|
||||
CHandle hdlFile(hFile);
|
||||
|
||||
//Create and initialize the OVERLAPPED struct
|
||||
OVERLAPPED writeOverlapped;
|
||||
memset((void*)&writeOverlapped, 0, sizeof(OVERLAPPED));
|
||||
writeOverlapped.hEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
|
||||
if (writeOverlapped.hEvent == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Use CHandle to close the event handle
|
||||
CHandle hdlEvent(writeOverlapped.hEvent);
|
||||
|
||||
char szBuf[ATLSMTP_MAX_LINE_LENGTH+1];
|
||||
BOOL bRet = TRUE;
|
||||
|
||||
int nBufLen = 0;
|
||||
|
||||
//if writing to file for purposes of sending, write out the
|
||||
//commands as well
|
||||
if (lpszSender || (dwFlags & ATLSMTP_DUMP_SENDER))
|
||||
{
|
||||
nBufLen = sprintf_s(szBuf, ATLSMTP_MAX_LINE_LENGTH+1, "MAIL FROM:<%s>\r\n",
|
||||
(lpszSender ? (LPCSTR) CT2CA(lpszSender) : msg.GetSender()));
|
||||
if (nBufLen > 0)
|
||||
{
|
||||
bRet = AtlSmtpSendAndWait(hFile, szBuf, nBufLen, &writeOverlapped);
|
||||
}
|
||||
else
|
||||
{
|
||||
bRet = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (bRet && (lpszRecipients || (dwFlags & ATLSMTP_DUMP_RECIPS)))
|
||||
{
|
||||
if (!lpszRecipients)
|
||||
{
|
||||
LPSTR lpszRecipientsA = NULL;
|
||||
DWORD dwLen = msg.GetRequiredRecipientsStringLength();
|
||||
lpszRecipientsA = static_cast<LPSTR>(calloc(sizeof(char),dwLen));
|
||||
if (!lpszRecipientsA || msg.GetRecipientsString(lpszRecipientsA, &dwLen) == FALSE)
|
||||
{
|
||||
bRet = FALSE;
|
||||
}
|
||||
if (bRet)
|
||||
bRet = DumpRecipients(hFile, lpszRecipientsA, &writeOverlapped);
|
||||
free(lpszRecipientsA);
|
||||
}
|
||||
else
|
||||
{
|
||||
bRet = DumpRecipients(hFile, CT2CA(lpszRecipients), &writeOverlapped);
|
||||
}
|
||||
}
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
nBufLen = sprintf_s(szBuf, _countof(szBuf), "DATA\r\n");
|
||||
bRet = AtlSmtpSendAndWait(hFile, szBuf, nBufLen, &writeOverlapped);
|
||||
}
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
bRet = msg.WriteData(hFile, &writeOverlapped, NULL, ATLSMTP_FORMAT_SMTP);
|
||||
}
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
// disallow copy construction
|
||||
CSMTPConnection(const CSMTPConnection&) throw()
|
||||
{
|
||||
ATLASSERT(FALSE);
|
||||
}
|
||||
|
||||
// disallow assignment
|
||||
const CSMTPConnection& operator=(const CSMTPConnection&) throw()
|
||||
{
|
||||
ATLASSERT(FALSE);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Tell the server we are aborting the message
|
||||
inline BOOL CancelMessage() throw()
|
||||
{
|
||||
char szBuf[ATLSMTP_MAX_LINE_LENGTH+1];
|
||||
int nBufLen = 0;
|
||||
nBufLen = sprintf_s(szBuf, _countof(szBuf), "RSET\r\n");
|
||||
if (!AtlSmtpSendAndCheck((HANDLE)m_hSocket, szBuf, nBufLen, szBuf, &nBufLen, ATLSMTP_MAX_LINE_LENGTH,
|
||||
ATLSMTP_RSET_SUCC, &m_Overlapped))
|
||||
{
|
||||
Disconnect();
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Dump the recipients to hFile
|
||||
// lpszRecipients - the recipients string
|
||||
// pOverlapped - the OVERALAPPED struct
|
||||
// dwFlags - the flags
|
||||
inline BOOL DumpRecipients(HANDLE hFile, LPCSTR lpszRecipients, LPOVERLAPPED pOverlapped, DWORD dwFlags = 0)
|
||||
{
|
||||
ATLENSURE(lpszRecipients != NULL);
|
||||
ATLASSERT(pOverlapped != NULL);
|
||||
|
||||
char rcptBuf[ATLSMTP_MAX_LINE_LENGTH-12+1];
|
||||
char szBuf[ATLSMTP_MAX_LINE_LENGTH+1];
|
||||
LPSTR tmpBuf = rcptBuf;
|
||||
char ch;
|
||||
BOOL bRet = TRUE;
|
||||
int nMaxLength = ATLSMTP_MAX_LINE_LENGTH;
|
||||
int nRetCode = 0;
|
||||
size_t nCnt = 0;
|
||||
do
|
||||
{
|
||||
ch = *lpszRecipients;
|
||||
if (ch)
|
||||
lpszRecipients++;
|
||||
if (AtlSmtpIsRecipientDelimiter(ch))
|
||||
{
|
||||
*tmpBuf = 0;
|
||||
int nBufLen = sprintf_s(szBuf, ATLSMTP_MAX_LINE_LENGTH,
|
||||
"RCPT TO:<%s>\r\n", rcptBuf);
|
||||
if (nBufLen > 0)
|
||||
{
|
||||
bRet = AtlSmtpSendAndWait(hFile, szBuf, nBufLen, pOverlapped);
|
||||
}
|
||||
else
|
||||
{
|
||||
bRet = FALSE;
|
||||
}
|
||||
|
||||
if (bRet && (dwFlags & ATLSMTP_FOR_SEND))
|
||||
{
|
||||
bRet = AtlSmtpReadData(hFile, szBuf, &nMaxLength, pOverlapped);
|
||||
nRetCode = atoi(szBuf);
|
||||
if (!bRet || (nRetCode != ATLSMTP_RCPT_SUCCESS && nRetCode != ATLSMTP_RCPT_NOT_LOCAL))
|
||||
{
|
||||
bRet = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
tmpBuf = rcptBuf;
|
||||
nCnt = 0;
|
||||
nMaxLength = ATLSMTP_MAX_LINE_LENGTH;
|
||||
while (isspace(static_cast<unsigned char>(*lpszRecipients)))
|
||||
lpszRecipients++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (nCnt >= sizeof(rcptBuf)-1)
|
||||
{
|
||||
// recipient string too long
|
||||
bRet = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
*tmpBuf++ = ch;
|
||||
nCnt++;
|
||||
} while (ch != '\0');
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
// Implementation - used from ReadLine
|
||||
// fills pBuf with up to dwMaxLen bytes
|
||||
BOOL FillBuffer(__in HANDLE hFile, __out_ecount_part(dwMaxLen, *pdwLen) LPSTR pBuf, __in DWORD dwMaxLen, __out LPDWORD pdwLen) throw()
|
||||
{
|
||||
ATLASSERT(hFile != INVALID_HANDLE_VALUE);
|
||||
ATLASSERT(pdwLen != NULL);
|
||||
|
||||
DWORD dwRead = 0;
|
||||
DWORD dwTotalRead = 0;
|
||||
int nRet = 0;
|
||||
|
||||
do
|
||||
{
|
||||
nRet = ReadFile(hFile, pBuf, dwMaxLen-dwTotalRead, &dwRead, NULL);
|
||||
if (!nRet && GetLastError() != ERROR_HANDLE_EOF)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (dwRead == 0)
|
||||
break;
|
||||
|
||||
dwTotalRead+= dwRead;
|
||||
} while (dwTotalRead < dwMaxLen);
|
||||
|
||||
*pdwLen = dwTotalRead;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Implementation
|
||||
// Read a line (terminated by LF) from hFile
|
||||
BOOL ReadLine(__in HANDLE hFile, __out_ecount_part_z(dwMaxSrcLen, *pdwSrcLen) LPSTR pSrc, __out_ecount_part_z(dwMaxDestLen, *pdwRead) LPSTR pDest, __inout LPDWORD pdwSrcLen, __inout LPDWORD pdwBufPos, __in DWORD dwMaxSrcLen,
|
||||
__in DWORD dwMaxDestLen, __out_opt LPDWORD pdwRead=NULL, __out_opt LPBOOL pbFullLine=NULL)
|
||||
{
|
||||
ATLENSURE(hFile != INVALID_HANDLE_VALUE);
|
||||
ATLENSURE(pSrc != NULL);
|
||||
ATLENSURE(pDest != NULL);
|
||||
ATLENSURE(pdwSrcLen != NULL);
|
||||
ATLENSURE(pdwBufPos != NULL);
|
||||
|
||||
BOOL bRet = TRUE;
|
||||
DWORD dwLen = 0;
|
||||
DWORD dwBufPos = 0;
|
||||
DWORD dwSrcLen = *pdwSrcLen;
|
||||
LPSTR pSrcCurrent = pSrc + *pdwBufPos;
|
||||
|
||||
while (bRet && dwLen < dwMaxDestLen)
|
||||
{
|
||||
if (dwSrcLen == 0)
|
||||
{
|
||||
if (!FillBuffer(hFile, pSrc, dwMaxSrcLen, pdwSrcLen) || *pdwSrcLen == 0)
|
||||
break;
|
||||
|
||||
dwBufPos = 0;
|
||||
*pdwBufPos = 0;
|
||||
dwSrcLen = *pdwSrcLen;
|
||||
pSrcCurrent = pSrc;
|
||||
}
|
||||
|
||||
--dwSrcLen;
|
||||
*pDest = *pSrcCurrent++;
|
||||
dwLen++;
|
||||
dwBufPos++;
|
||||
if (*pDest == '\n')
|
||||
{
|
||||
break;
|
||||
}
|
||||
pDest++;
|
||||
}
|
||||
|
||||
*pdwSrcLen = dwSrcLen;
|
||||
|
||||
if (pbFullLine)
|
||||
{
|
||||
if (*pDest != '\n')
|
||||
*pbFullLine = FALSE;
|
||||
else
|
||||
*pbFullLine = TRUE;
|
||||
}
|
||||
|
||||
if (pdwRead)
|
||||
*pdwRead = dwLen;
|
||||
|
||||
*pdwBufPos += dwBufPos;
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
}; // class CSMTPConnection
|
||||
|
||||
} // namespace ATL
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif // __ATLSMTPCONNECTION_H__
|
||||
@@ -1,220 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#ifndef __ATLSMTPUTIL_H__
|
||||
#define __ATLSMTPUTIL_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#if (defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_))
|
||||
#error <atlsmtputil.h> requires <winsock2.h> -- include <winsock2.h> before you include <windows.h> or <winsock.h>
|
||||
#endif
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <tchar.h>
|
||||
#include <atlstr.h>
|
||||
#include <winnls.h>
|
||||
#include <atlspriv.h>
|
||||
|
||||
//=======================================================================
|
||||
//defines for SMTPMail module
|
||||
//=======================================================================
|
||||
|
||||
//If overlapped I/O is desired, need 2.0 or greater
|
||||
#define ATLSMTP_WSA_VERSION ATL_WINSOCK_VER
|
||||
|
||||
//The maximum number of characters on a SMTP line
|
||||
#define ATLSMTP_MAX_LINE_LENGTH 1000
|
||||
|
||||
#define ATLSMTP_MAX_SERVER_NAME_LENGTH 256
|
||||
|
||||
//Encoding schemes
|
||||
#define ATLSMTP_BASE64_ENCODE 0
|
||||
#define ATLSMTP_UUENCODE 1
|
||||
#define ATLSMTP_QP_ENCODE 2
|
||||
|
||||
//I/O Defines
|
||||
#define ATLSMTP_READBUFFER_SIZE 4096
|
||||
#define ATLSMTP_GET_LINES 100
|
||||
|
||||
|
||||
//Miscellaneous defines
|
||||
#define ATLSMTP_SEND_FILE 1
|
||||
#define ATLSMTP_FORMAT_SMTP 8
|
||||
|
||||
#define ATLSMTP_RETCODE_LEN 3
|
||||
|
||||
|
||||
#pragma pack(push,_ATL_PACKING)
|
||||
namespace ATL
|
||||
{
|
||||
|
||||
//=======================================================================
|
||||
// Miscellaneous Utility Functions
|
||||
//=======================================================================
|
||||
//A list of recipients in a string must by separated by one
|
||||
//of the following characters
|
||||
inline BOOL AtlSmtpIsRecipientDelimiter(char ch) throw()
|
||||
{
|
||||
return (ch == ',' || ch == ';' || ch == ' ' || ch == '\0');
|
||||
}
|
||||
|
||||
//Send data to hFile and wait for it to finish sending
|
||||
inline BOOL AtlSmtpSendAndWait(HANDLE hFile, LPCSTR lpData, int nDataLength, LPOVERLAPPED pOverlapped) throw()
|
||||
{
|
||||
ATLASSERT(lpData != NULL);
|
||||
ATLENSURE_RETURN_VAL(pOverlapped != NULL, FALSE);
|
||||
|
||||
DWORD dwWritten = 0, dwErr = 0;
|
||||
int nRet = 0, nBufPos = 0;
|
||||
|
||||
//write all the data
|
||||
do
|
||||
{
|
||||
//Write a chunk of data, offsetting the buffer and amount to write by what's already
|
||||
//been written
|
||||
nRet = WriteFile(hFile, (void*)(lpData+nBufPos), nDataLength-nBufPos, &dwWritten, pOverlapped);
|
||||
if (!nRet && (dwErr = GetLastError()) != ERROR_IO_INCOMPLETE && dwErr != ERROR_IO_PENDING)
|
||||
return FALSE;
|
||||
|
||||
//Get the result of the write operation (wait for it)
|
||||
nRet = GetOverlappedResult(hFile, pOverlapped, &dwWritten, TRUE);
|
||||
if (!nRet)
|
||||
return FALSE;
|
||||
|
||||
//Need to update offsets when writing to a file
|
||||
pOverlapped->Offset += dwWritten;
|
||||
nBufPos += dwWritten;
|
||||
|
||||
} while (nBufPos < nDataLength);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
//Read up to nDestLen bytes from hFile, keep reading while there's more data and there's
|
||||
//room in the buffer
|
||||
inline BOOL AtlSmtpReadData(__in HANDLE hFile, __out_ecount_part_z(*pnDestLen, *pnDestLen) LPSTR lpData, __inout int* pnDestLen, __in LPOVERLAPPED pOverlapped)
|
||||
{
|
||||
ATLASSERT(lpData != NULL);
|
||||
ATLASSERT(pnDestLen != NULL);
|
||||
ATLENSURE(pOverlapped != NULL);
|
||||
|
||||
DWORD dwRead = 0, dwErr = 0;
|
||||
int nBufPos = 0;
|
||||
do
|
||||
{
|
||||
//REad a chunk of data, offsetting the buffer and amount to read by what's already been read
|
||||
int nRet = ReadFile(hFile, (void*)(lpData+nBufPos), (*pnDestLen)-nBufPos, &dwRead, pOverlapped);
|
||||
if (!nRet && (dwErr = GetLastError()) != ERROR_MORE_DATA && dwErr != ERROR_IO_PENDING && dwErr != ERROR_IO_INCOMPLETE)
|
||||
return FALSE;
|
||||
|
||||
//Get the result of the read operation (wait for it)
|
||||
nRet = GetOverlappedResult(hFile, pOverlapped, &dwRead, TRUE);
|
||||
if (!nRet)
|
||||
return FALSE;
|
||||
|
||||
//Handle offsets when reading from a file
|
||||
pOverlapped->Offset += dwRead;
|
||||
nBufPos += dwRead;
|
||||
} while (nBufPos < *pnDestLen && dwErr == ERROR_MORE_DATA);
|
||||
*pnDestLen = nBufPos;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
//Used in sending encoded data
|
||||
//lpData is the data to be sent now
|
||||
//lpPrev is a pointer to the buffer that the previous call was made on
|
||||
//This allows the new buffer (lpData) to be filled while lpPrev is being sent
|
||||
//If all the data in lpPrev had not finished sending, we complete the send and wait
|
||||
inline BOOL AtlSmtpSendOverlapped(HANDLE hFile, LPCSTR lpData, int nDataLength, LPCSTR lpPrev, DWORD dwPrevLength, LPOVERLAPPED pOverlapped)
|
||||
{
|
||||
ATLASSERT(lpData != NULL);
|
||||
ATLENSURE(pOverlapped != NULL);
|
||||
|
||||
DWORD dwWritten = 0, dwErr = 0, dwBufPos = 0;
|
||||
int nRet = 0;
|
||||
|
||||
//Get the results of the previous call (if any)
|
||||
if (lpPrev && (!GetOverlappedResult(hFile, pOverlapped, &dwWritten, FALSE) || dwWritten < dwPrevLength))
|
||||
{
|
||||
//If any error but IO_INCOMPLETE, return failure
|
||||
if ((dwErr = GetLastError()) != ERROR_SUCCESS && dwErr != ERROR_IO_INCOMPLETE && dwErr != ERROR_IO_PENDING)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
//Finish writing lpPrev if we need to
|
||||
while (dwBufPos < dwPrevLength)
|
||||
{
|
||||
//Get the result of the previous write (wait for it)
|
||||
nRet = GetOverlappedResult(hFile, pOverlapped, &dwWritten, TRUE);
|
||||
if (!nRet || (dwBufPos += dwWritten) == dwPrevLength)
|
||||
{
|
||||
if ((dwErr = GetLastError()) != ERROR_IO_INCOMPLETE && dwErr != ERROR_IO_PENDING)
|
||||
break;
|
||||
}
|
||||
|
||||
//If we are writing to a file, we need to update the offsets
|
||||
pOverlapped->Offset += dwWritten;
|
||||
if(dwBufPos>dwPrevLength)
|
||||
{
|
||||
/* shouldn't happen */
|
||||
ATLASSERT(false);
|
||||
break;
|
||||
}
|
||||
nRet = WriteFile(hFile, (void*)(lpPrev+dwBufPos), dwPrevLength-dwBufPos, &dwWritten, pOverlapped);
|
||||
|
||||
//If any error but IO_PENDING and IO_INCOMPLETE, break
|
||||
if (!nRet && (dwErr = GetLastError()) != ERROR_IO_PENDING && dwErr != ERROR_IO_INCOMPLETE)
|
||||
break;
|
||||
}
|
||||
if (dwBufPos < dwPrevLength)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//Now that all the previous data has been sent, start sending the current data
|
||||
nRet = WriteFile(hFile, (void*)lpData, nDataLength, &dwWritten, pOverlapped);
|
||||
GetOverlappedResult(hFile, pOverlapped, &dwWritten, FALSE);
|
||||
|
||||
pOverlapped->Offset += dwWritten;
|
||||
|
||||
//If any error but IO_PENDING
|
||||
if (!nRet && (dwErr = GetLastError()) != ERROR_IO_PENDING && dwErr != ERROR_IO_INCOMPLETE)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
//Send a SMTP command and read the response
|
||||
//return TRUE if it matches szResponse, FALSE otherwise
|
||||
inline BOOL AtlSmtpSendAndCheck(__in HANDLE hFile, __in LPCSTR lpData, __in int nDataLength, __out_ecount_part(nMaxResponseLength, *pnResponseLength) LPSTR lpResponse, __out int* pnResponseLength, __in int nMaxResponseLength,
|
||||
__in_z LPCSTR szResponse, __in LPOVERLAPPED pOverlapped) throw()
|
||||
{
|
||||
ATLASSERT(lpData != NULL);
|
||||
ATLASSERT(lpResponse != NULL);
|
||||
ATLASSERT(pnResponseLength != NULL);
|
||||
|
||||
BOOL bRet = AtlSmtpSendAndWait(hFile, lpData, nDataLength, pOverlapped);
|
||||
if (bRet)
|
||||
{
|
||||
*pnResponseLength = nMaxResponseLength;
|
||||
bRet = AtlSmtpReadData(hFile, lpResponse, pnResponseLength, pOverlapped);
|
||||
}
|
||||
if (!bRet || strncmp((char*)lpResponse, szResponse, ATLSMTP_RETCODE_LEN))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
} // namespace ATL
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif // __ATLSMTPUTIL_H__
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,361 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ZEvtSyncSocket
|
||||
// ************ This is an implementation only class ************
|
||||
// Class ZEvtSyncSocket is a non-supported, implementation only
|
||||
// class used by the ATL HTTP client class CAtlHttpClient. Do not
|
||||
// use this class in your code. Use of this class is not supported by Microsoft.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __ATLSPRIV_INL__
|
||||
#define __ATLSPRIV_INL__
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4312)
|
||||
|
||||
inline ZEvtSyncSocket::ZEvtSyncSocket()
|
||||
{
|
||||
m_dwCreateFlags = WSA_FLAG_OVERLAPPED;
|
||||
m_hEventRead = m_hEventWrite = m_hEventConnect = NULL;
|
||||
m_socket = INVALID_SOCKET;
|
||||
m_bConnected = false;
|
||||
m_dwLastError = 0;
|
||||
m_dwSocketTimeout = ATL_SOCK_TIMEOUT;
|
||||
g_HttpInit.Init();
|
||||
}
|
||||
|
||||
inline ZEvtSyncSocket::~ZEvtSyncSocket()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
inline ZEvtSyncSocket::operator SOCKET()
|
||||
{
|
||||
return m_socket;
|
||||
}
|
||||
|
||||
inline void ZEvtSyncSocket::Close()
|
||||
{
|
||||
if (m_socket != INVALID_SOCKET)
|
||||
{
|
||||
m_bConnected = false;
|
||||
closesocket(m_socket);
|
||||
m_socket = INVALID_SOCKET;
|
||||
Term();
|
||||
}
|
||||
}
|
||||
|
||||
inline void ZEvtSyncSocket::Term()
|
||||
{
|
||||
if (m_hEventRead)
|
||||
{
|
||||
WSACloseEvent(m_hEventRead);
|
||||
m_hEventRead = NULL;
|
||||
}
|
||||
if (m_hEventWrite)
|
||||
{
|
||||
WSACloseEvent(m_hEventWrite);
|
||||
m_hEventWrite = NULL;
|
||||
}
|
||||
if (m_hEventConnect)
|
||||
{
|
||||
WSACloseEvent(m_hEventConnect);
|
||||
m_hEventConnect = NULL;
|
||||
}
|
||||
m_socket = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
inline bool ZEvtSyncSocket::Create(const ADDRINFOT* pAI, WORD wFlags)
|
||||
{
|
||||
return Create(pAI->ai_family, pAI->ai_socktype, pAI->ai_protocol, wFlags);
|
||||
}
|
||||
|
||||
inline bool ZEvtSyncSocket::Create(int af, int st, int proto, WORD wFlags)
|
||||
{
|
||||
bool bRet = true;
|
||||
if (m_socket != INVALID_SOCKET)
|
||||
{
|
||||
m_dwLastError = WSAEALREADY;
|
||||
return false; // Must close this socket first
|
||||
}
|
||||
|
||||
m_socket = WSASocket(af, st, proto, NULL, 0,
|
||||
wFlags | m_dwCreateFlags);
|
||||
if (m_socket == INVALID_SOCKET)
|
||||
{
|
||||
m_dwLastError = ::WSAGetLastError();
|
||||
bRet = false;
|
||||
}
|
||||
else
|
||||
bRet = Init(m_socket, NULL);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
inline bool ZEvtSyncSocket::Connect(LPCTSTR szAddr, unsigned short nPort) throw()
|
||||
{
|
||||
if (m_bConnected)
|
||||
return true;
|
||||
|
||||
bool bRet = true;
|
||||
CSocketAddr address;
|
||||
// Find address information
|
||||
if ((m_dwLastError = address.FindAddr(szAddr, nPort, 0, PF_UNSPEC, SOCK_STREAM, 0)) != ERROR_SUCCESS)
|
||||
{
|
||||
bRet = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
bRet = Connect(address.GetAddrInfo());
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
|
||||
inline bool ZEvtSyncSocket::Connect(const ADDRINFOT *pAI)
|
||||
{
|
||||
if (m_socket == INVALID_SOCKET && !Create(pAI))
|
||||
return false;
|
||||
|
||||
return Connect((SOCKADDR*)pAI->ai_addr, (int)pAI->ai_addrlen);
|
||||
}
|
||||
|
||||
inline bool ZEvtSyncSocket::Connect(const SOCKADDR* psa, int len)
|
||||
{
|
||||
if (m_bConnected)
|
||||
return true; // already connected
|
||||
|
||||
DWORD dwLastError;
|
||||
bool bRet = true;
|
||||
|
||||
// if you try to connect the socket without
|
||||
// creating it first it's reasonable to automatically
|
||||
// try the create for you.
|
||||
if (m_socket == INVALID_SOCKET)
|
||||
return false;
|
||||
|
||||
if (WSAConnect(m_socket,
|
||||
psa, len,
|
||||
NULL, NULL, NULL, NULL))
|
||||
{
|
||||
dwLastError = WSAGetLastError();
|
||||
if (dwLastError != WSAEWOULDBLOCK)
|
||||
{
|
||||
m_dwLastError = dwLastError;
|
||||
bRet = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
dwLastError = WaitForSingleObject((HANDLE)m_hEventConnect, m_dwSocketTimeout);
|
||||
if (dwLastError == WAIT_OBJECT_0)
|
||||
{
|
||||
// make sure there were no connection errors.
|
||||
WSANETWORKEVENTS wse;
|
||||
ZeroMemory(&wse, sizeof(wse));
|
||||
WSAEnumNetworkEvents(m_socket, NULL, &wse);
|
||||
if (wse.iErrorCode[FD_CONNECT_BIT]!=0)
|
||||
{
|
||||
m_dwLastError = (DWORD)(wse.iErrorCode[FD_CONNECT_BIT]);
|
||||
bRet = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
bRet = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
m_bConnected = bRet;
|
||||
return bRet;
|
||||
}
|
||||
|
||||
inline bool ZEvtSyncSocket::Write(WSABUF *pBuffers, int nCount, DWORD *pdwSize)
|
||||
{
|
||||
// if we aren't already connected we'll wait to see if the connect
|
||||
// event happens
|
||||
if (WAIT_OBJECT_0 != WaitForSingleObject((HANDLE)m_hEventConnect , m_dwSocketTimeout))
|
||||
{
|
||||
m_dwLastError = WSAENOTCONN;
|
||||
return false; // not connected
|
||||
}
|
||||
|
||||
// make sure we aren't already writing
|
||||
if (WAIT_TIMEOUT == WaitForSingleObject((HANDLE)m_hEventWrite, 0))
|
||||
{
|
||||
m_dwLastError = WSAEINPROGRESS;
|
||||
return false; // another write on is blocking this socket
|
||||
}
|
||||
|
||||
bool bRet = true;
|
||||
*pdwSize = 0;
|
||||
WSAOVERLAPPED o;
|
||||
m_csWrite.Lock();
|
||||
o.hEvent = m_hEventWrite;
|
||||
WSAResetEvent(o.hEvent);
|
||||
if (WSASend(m_socket, pBuffers, nCount, pdwSize, 0, &o, 0))
|
||||
{
|
||||
DWORD dwLastError = WSAGetLastError();
|
||||
if (dwLastError != WSA_IO_PENDING)
|
||||
{
|
||||
m_dwLastError = dwLastError;
|
||||
bRet = false;
|
||||
}
|
||||
}
|
||||
|
||||
// wait for write to complete
|
||||
if (bRet)
|
||||
{
|
||||
if (WaitForSingleObject((HANDLE)m_hEventWrite, m_dwSocketTimeout) == WAIT_OBJECT_0)
|
||||
{
|
||||
DWORD dwFlags = 0;
|
||||
if (WSAGetOverlappedResult(m_socket, &o, pdwSize, FALSE, &dwFlags))
|
||||
bRet = true;
|
||||
else
|
||||
{
|
||||
m_dwLastError = ::GetLastError();
|
||||
bRet = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
bRet = false;
|
||||
}
|
||||
|
||||
m_csWrite.Unlock();
|
||||
return bRet;
|
||||
}
|
||||
|
||||
inline bool ZEvtSyncSocket::Write(const unsigned char *pBuffIn, DWORD *pdwSize)
|
||||
{
|
||||
WSABUF buff;
|
||||
buff.buf = (char*)pBuffIn;
|
||||
buff.len = *pdwSize;
|
||||
return Write(&buff, 1, pdwSize);
|
||||
}
|
||||
|
||||
inline bool ZEvtSyncSocket::Read(const unsigned char *pBuff, DWORD *pdwSize)
|
||||
{
|
||||
// if we aren't already connected we'll wait to see if the connect
|
||||
// event happens
|
||||
if (WAIT_OBJECT_0 != WaitForSingleObject((HANDLE)m_hEventConnect , m_dwSocketTimeout))
|
||||
{
|
||||
m_dwLastError = WSAENOTCONN;
|
||||
return false; // not connected
|
||||
}
|
||||
|
||||
if (WAIT_ABANDONED == WaitForSingleObject((HANDLE)m_hEventRead, 0))
|
||||
{
|
||||
m_dwLastError = WSAEINPROGRESS;
|
||||
return false; // another write on is blocking this socket
|
||||
}
|
||||
|
||||
bool bRet = true;
|
||||
WSABUF buff;
|
||||
buff.buf = (char*)pBuff;
|
||||
buff.len = *pdwSize;
|
||||
*pdwSize = 0;
|
||||
DWORD dwFlags = 0;
|
||||
WSAOVERLAPPED o;
|
||||
ZeroMemory(&o, sizeof(o));
|
||||
|
||||
// protect against re-entrency
|
||||
m_csRead.Lock();
|
||||
o.hEvent = m_hEventRead;
|
||||
WSAResetEvent(o.hEvent);
|
||||
if (WSARecv(m_socket, &buff, 1, pdwSize, &dwFlags, &o, 0))
|
||||
{
|
||||
DWORD dwLastError = WSAGetLastError();
|
||||
if (dwLastError != WSA_IO_PENDING)
|
||||
{
|
||||
m_dwLastError = dwLastError;
|
||||
bRet = false;
|
||||
}
|
||||
}
|
||||
|
||||
// wait for the read to complete
|
||||
if (bRet)
|
||||
{
|
||||
if (WAIT_OBJECT_0 == WaitForSingleObject((HANDLE)o.hEvent, m_dwSocketTimeout))
|
||||
{
|
||||
dwFlags = 0;
|
||||
if (WSAGetOverlappedResult(m_socket, &o, pdwSize, FALSE, &dwFlags))
|
||||
bRet = true;
|
||||
else
|
||||
{
|
||||
m_dwLastError = ::GetLastError();
|
||||
bRet = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
bRet = false;
|
||||
}
|
||||
|
||||
m_csRead.Unlock();
|
||||
return bRet;
|
||||
}
|
||||
|
||||
inline bool ZEvtSyncSocket::Init(SOCKET hSocket, void * /*pData=NULL*/)
|
||||
{
|
||||
ATLASSERT(hSocket != INVALID_SOCKET);
|
||||
|
||||
if (hSocket == INVALID_SOCKET)
|
||||
{
|
||||
m_dwLastError = WSAENOTSOCK;
|
||||
return false;
|
||||
}
|
||||
|
||||
m_socket = hSocket;
|
||||
|
||||
// Allocate Events. On error, any open event handles will be closed
|
||||
// in the destructor
|
||||
if (NULL != (m_hEventRead = WSACreateEvent()))
|
||||
if (NULL != (m_hEventWrite = WSACreateEvent()))
|
||||
if (NULL != (m_hEventConnect = WSACreateEvent()))
|
||||
{
|
||||
if (!WSASetEvent(m_hEventWrite) || !WSASetEvent(m_hEventRead))
|
||||
{
|
||||
m_dwLastError = ::GetLastError();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (SOCKET_ERROR != WSAEventSelect(m_socket, m_hEventRead, FD_READ))
|
||||
if (SOCKET_ERROR != WSAEventSelect(m_socket, m_hEventWrite, FD_WRITE))
|
||||
if (SOCKET_ERROR != WSAEventSelect(m_socket, m_hEventConnect, FD_CONNECT))
|
||||
return true;
|
||||
}
|
||||
m_dwLastError = ::GetLastError();
|
||||
return false;
|
||||
}
|
||||
|
||||
inline DWORD ZEvtSyncSocket::GetSocketTimeout() throw()
|
||||
{
|
||||
return m_dwSocketTimeout;
|
||||
}
|
||||
|
||||
inline DWORD ZEvtSyncSocket::SetSocketTimeout(DWORD dwNewTimeout) throw()
|
||||
{
|
||||
DWORD dwOldTimeout = m_dwSocketTimeout;
|
||||
m_dwSocketTimeout = dwNewTimeout;
|
||||
return dwOldTimeout;
|
||||
}
|
||||
|
||||
inline bool ZEvtSyncSocket::SupportsScheme(ATL_URL_SCHEME scheme) throw()
|
||||
{
|
||||
// default only supports HTTP
|
||||
return scheme == ATL_URL_SCHEME_HTTP ? true : false;
|
||||
}
|
||||
|
||||
|
||||
#pragma warning(pop)
|
||||
|
||||
#endif // __ATLSPRIV_INL__
|
||||
@@ -1,146 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#include <winresrc.h>
|
||||
#include "atlsrvres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ATLSRV_BAD_REQUEST "<html><head><title>Bad Request</title></head><body>Bad Request</body></html>"
|
||||
IDS_ATLSRV_AUTH_REQUIRED
|
||||
"<html><head><title>Authorization Required</title></head><body>Authorization is required</body></html>"
|
||||
IDS_ATLSRV_FORBIDDEN "<html><head><title>Forbidden</title></head><body>Forbidden</body></html>"
|
||||
IDS_ATLSRV_NOT_FOUND "<html><head><title>Not Found</title></head><body>Not Found</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR "<html><head><title>Server Error</title></head><body>Server Error</body></html>"
|
||||
IDS_ATLSRV_NOT_IMPLEMENTED
|
||||
"<html><head><title>Not Implemented</title></head><body>Not Implemented</body></html>"
|
||||
IDS_ATLSRV_BAD_GATEWAY "<html><head><title>Bad Gateway</title></head><body>Bad Gateway</body></html>"
|
||||
IDS_ATLSRV_SERVICE_NOT_AVAILABLE
|
||||
"<html><head><title>Service Not Available</title></head><body>Service Not Available</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADSRF "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>SRF file could not be loaded.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HNDLFAIL "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>The requested SRF file was loaded but could not be successfully processed.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SYSOBJFAIL "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>A Windows system object could not be created.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_READFILEFAIL "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>A File read operation failed.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADFILEFAIL "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>The specified file could not be opened.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADLIB "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>LoadLibrary failed.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERIF "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>Failed to retrieve the request handler interface.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_OUTOFMEM "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>Server is out of memory.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_UNEXPECTED "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>The server encountered an unexpected error.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILPARSEFAIL "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>The server encountered an unexpected error while trying to parse the requested stencil.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILLOADFAIL "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>The server failed to load the requested stencil. The stencil file may be damaged or missing on this web server.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERNOTFOUND "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>One of the handlers named in a handler tag for the requested stencil could not be found in the specified handler .dll.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADHANDLERTAG "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>This stencil contains a handler tag that could not be properly parsed by the stencil processor or does not contain a handler tag at all. Check the requested stencil for proper stencil syntax.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_NOHANDLERTAG "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>The requested stencil does not contain a handler tag.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGMETHODNAME "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>A replacement tag was encountered in the requested stencil that had a replacement name that was too long. The maximum length of the replacment name must be less than or equal to the ATL_MAX_METHOD_NAME constant defined in atlstencil.h</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGHANDLERNAME "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>A replacement tag that uses the id.tagname syntax was encountered in the requested stencil that had a handler name that was too long. The maximum length of the handler name must be less than or equal to the ATL_MAX_METHOD_NAME constant defined in atlstencil.h</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_IMPERSONATIONFAILED "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>An attempt to impersonate the client making the request failed.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_ISAPISTARTUPFAILED "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>The ISAPI extension used to service this request failed to load correctly due to an unknown error.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SOAPNOSOAPACTION "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>SOAP request did not provide SOAPACTION header.</body></html>"
|
||||
|
||||
IDS_ATLSRV_CRITICAL_HEAPCREATEFAILED "Request heap creation failed"
|
||||
IDS_ATLSRV_CRITICAL_WORKERINITFAILED "Worker Thread initialization failed"
|
||||
IDS_ATLSRV_CRITICAL_CRITSECINITFAILED "Critical section initialization failed"
|
||||
IDS_ATLSRV_CRITICAL_THREADPOOLFAILED "Thread pool initialization failed"
|
||||
IDS_ATLSRV_CRITICAL_DLLCACHEFAILED "DLL cache initialization failed"
|
||||
IDS_ATLSRV_CRITICAL_PAGECACHEFAILED "Page cache initialization failed"
|
||||
IDS_ATLSRV_CRITICAL_STENCILCACHEFAILED "Stencil cache initialization failed"
|
||||
IDS_ATLSRV_CRITICAL_SESSIONSTATEFAILED "Session state service initialization failed"
|
||||
IDS_ATLSRV_CRITICAL_BLOBCACHEFAILED "Blob cache initialization failed"
|
||||
IDS_ATLSRV_CRITICAL_FILECACHEFAILED "File cache initialization failed"
|
||||
|
||||
IDS_PERFMON_CACHE "ATL Server:Cache"
|
||||
IDS_PERFMON_CACHE_HELP "Information about the ATL Server cache"
|
||||
IDS_PERFMON_HITCOUNT "Cache Hit Count"
|
||||
IDS_PERFMON_HITCOUNT_HELP "Number of cache hits"
|
||||
IDS_PERFMON_MISSCOUNT "Cache Miss Count"
|
||||
IDS_PERFMON_MISSCOUNT_HELP "Number of cache misses"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS "Cache Current Allocations"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS_HELP "Current Memory allocated for cache"
|
||||
IDS_PERFMON_MAXALLOCATIONS "Cache Max Allocations"
|
||||
IDS_PERFMON_MAXALLOCATIONS_HELP "Maximum memory allocated for cache"
|
||||
IDS_PERFMON_CURRENTENTRIES "Cache Current Entries"
|
||||
IDS_PERFMON_CURRENTENTRIES_HELP "Current number of cache entries"
|
||||
IDS_PERFMON_MAXENTRIES "Cache Max Entries"
|
||||
IDS_PERFMON_MAXENTRIES_HELP "Maximum number of cache entries"
|
||||
IDS_PERFMON_HITCOUNTRATE "Cache Hit Count Rate"
|
||||
IDS_PERFMON_HITCOUNTRATE_HELP "Number of hit counts per second"
|
||||
IDS_PERFMON_REQUEST "ATL Server:Request"
|
||||
IDS_PERFMON_REQUEST_HELP "Statistics about the requests coming into the server"
|
||||
IDS_PERFMON_REQUEST_TOTAL "Server Total Requests"
|
||||
IDS_PERFMON_REQUEST_TOTAL_HELP "The total number of requests"
|
||||
IDS_PERFMON_REQUEST_FAILED "Server Failed Requests"
|
||||
IDS_PERFMON_REQUEST_FAILED_HELP "The number of failed requests"
|
||||
IDS_PERFMON_REQUEST_RATE "Server Requests /sec"
|
||||
IDS_PERFMON_REQUEST_RATE_HELP "Number of requests per second"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME "Average Response Time"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME_HELP "Average time spent handling a request"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING "Current Queued Requests"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING_HELP "Current number of requests waiting to be handled"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING "Maximum Queued Requests"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING_HELP "Maximum number of requests waiting to be handled"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS "Active Threads"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS_HELP "The number of threads actively handling requests"
|
||||
END
|
||||
|
||||
|
||||
#ifndef ATL_NO_DEFAULT_STENCIL_RESOURCE
|
||||
dllmgr.srf HTML "res\\dllmgr.srf"
|
||||
stencilmgr.srf HTML "res\\stencilmgr.srf"
|
||||
threadmgr.srf HTML "res\\threadmgr.srf"
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Stencil parse error support
|
||||
//
|
||||
#ifdef ATL_DEBUG_STENCILS
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_STENCIL_ERROR_STENCIL
|
||||
"{{codepage 0}}<h1><font color=#ff0000> While trying to parse a stencil file, the following errors occurred:</font></h1>\r\n{{while GetNextError}}<table border=1 width=50%>\r\n<tr><td width=25%>Error type</td><td>{{GetErrorText}}</td></tr>\r\n<tr><td>Line number</td><td>{{GetErrorLineNumber}}</td></tr>\r\n<tr><td>Error text</td><td><pre>{{GetErrorLine}}</pre></td></tr>\r\n</table>\r\n{{endwhile}}<br>Stencil output follows:\r\n<hr>"
|
||||
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_IF "{{if}} without {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_ELSE "{{else}} without {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_WHILE "{{while}} without {{endwhile}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDWHILE "{{endwhile}} without {{while}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ELSE "{{else}} without {{if}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDIF "{{endif}} without {{if}} or {{else}}"
|
||||
|
||||
IDS_STENCIL_INVALID_HANDLER "Invalid handler tag"
|
||||
IDS_STENCIL_NULLPARAM "NULL parameter to ParseReplacements"
|
||||
IDS_STENCIL_INVALIDSTRING "Empty or negative string passed to ParseReplacements"
|
||||
IDS_STENCIL_EMBEDDED_NULL "Embedded null character in stencil"
|
||||
IDS_STENCIL_UNMATCHED_TAG_START "Unmatched {{"
|
||||
IDS_STENCIL_MISMATCHED_TAG_START "Mismatched {{"
|
||||
IDS_STENCIL_BAD_PARAMETER "Bad parameter"
|
||||
IDS_STENCIL_METHODNAME_TOO_LONG "Method name too long"
|
||||
IDS_STENCIL_HANDLERNAME_TOO_LONG "Handler name too long"
|
||||
IDS_STENCIL_INVALID_SUBHANDLER "Invalid subhandler tag"
|
||||
IDS_STENCIL_UNRESOLVED_REPLACEMENT "Unresolved replacement : '%s'"
|
||||
|
||||
IDS_STENCIL_INCLUDE_ERROR "Could not open included file"
|
||||
IDS_STENCIL_INCLUDE_INVALID "Included file is not a disk file"
|
||||
|
||||
IDS_STENCIL_MLANG_COCREATE "Couldn't create CMultiLanguage"
|
||||
IDS_STENCIL_MLANG_LCID "Error getting lcid"
|
||||
IDS_STENCIL_MLANG_GETLOCALE "GetLocaleInfo failed"
|
||||
IDS_STENCIL_MLANG_GETCHARSET "GetCharsetInfo failed"
|
||||
|
||||
IDS_STENCIL_OUTOFMEMORY "Out of memory"
|
||||
IDS_STENCIL_UNEXPECTED "Unexpected error"
|
||||
END
|
||||
|
||||
#endif
|
||||
@@ -1,150 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
// Used by atlsrv.rc
|
||||
//
|
||||
#ifndef ATLSRV_RESID_BASE
|
||||
#define ATLSRV_RESID_BASE 0x6000
|
||||
#endif
|
||||
|
||||
#ifndef PERFMON_RESID_BASE
|
||||
#define PERFMON_RESID_BASE 0x6100
|
||||
#endif
|
||||
|
||||
#ifndef STENCIL_RESID_BASE
|
||||
#define STENCIL_RESID_BASE 0x6200
|
||||
#endif
|
||||
|
||||
#define IDS_ATLSRV_BAD_REQUEST (ATLSRV_RESID_BASE+1)
|
||||
#define IDS_ATLSRV_AUTH_REQUIRED (ATLSRV_RESID_BASE+2)
|
||||
#define IDS_ATLSRV_FORBIDDEN (ATLSRV_RESID_BASE+3)
|
||||
#define IDS_ATLSRV_NOT_FOUND (ATLSRV_RESID_BASE+4)
|
||||
#define IDS_ATLSRV_SERVER_ERROR (ATLSRV_RESID_BASE+5)
|
||||
#define IDS_ATLSRV_NOT_IMPLEMENTED (ATLSRV_RESID_BASE+6)
|
||||
#define IDS_ATLSRV_BAD_GATEWAY (ATLSRV_RESID_BASE+7)
|
||||
#define IDS_ATLSRV_SERVICE_NOT_AVAILABLE (ATLSRV_RESID_BASE+8)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_BADSRF (ATLSRV_RESID_BASE+9)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_HNDLFAIL (ATLSRV_RESID_BASE+10)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_SYSOBJFAIL (ATLSRV_RESID_BASE+11)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_READFILEFAIL (ATLSRV_RESID_BASE+12)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_LOADLIB (ATLSRV_RESID_BASE+13)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_HANDLERIF (ATLSRV_RESID_BASE+14)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_OUTOFMEM (ATLSRV_RESID_BASE+15)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_UNEXPECTED (ATLSRV_RESID_BASE+16)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_STENCILPARSEFAIL (ATLSRV_RESID_BASE+17)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_STENCILLOADFAIL (ATLSRV_RESID_BASE+18)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_HANDLERNOTFOUND (ATLSRV_RESID_BASE+19)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_BADHANDLERTAG (ATLSRV_RESID_BASE+20)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_NOHANDLERTAG (ATLSRV_RESID_BASE+21)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_LONGMETHODNAME (ATLSRV_RESID_BASE+22)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_LONGHANDLERNAME (ATLSRV_RESID_BASE+23)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_IMPERSONATIONFAILED (ATLSRV_RESID_BASE+24)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_ISAPISTARTUPFAILED (ATLSRV_RESID_BASE+25)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_LOADFILEFAIL (ATLSRV_RESID_BASE+26)
|
||||
#define IDS_ATLSRV_CRITICAL_LOGMESSAGE (ATLSRV_RESID_BASE+27)
|
||||
#define IDS_ATLSRV_CRITICAL_HEAPCREATEFAILED (ATLSRV_RESID_BASE+28)
|
||||
#define IDS_ATLSRV_CRITICAL_WORKERINITFAILED (ATLSRV_RESID_BASE+29)
|
||||
#define IDS_ATLSRV_CRITICAL_CRITSECINITFAILED (ATLSRV_RESID_BASE+30)
|
||||
#define IDS_ATLSRV_CRITICAL_THREADPOOLFAILED (ATLSRV_RESID_BASE+31)
|
||||
#define IDS_ATLSRV_CRITICAL_DLLCACHEFAILED (ATLSRV_RESID_BASE+32)
|
||||
#define IDS_ATLSRV_CRITICAL_PAGECACHEFAILED (ATLSRV_RESID_BASE+33)
|
||||
#define IDS_ATLSRV_CRITICAL_STENCILCACHEFAILED (ATLSRV_RESID_BASE+34)
|
||||
#define IDS_ATLSRV_CRITICAL_SESSIONSTATEFAILED (ATLSRV_RESID_BASE+35)
|
||||
#define IDS_ATLSRV_CRITICAL_BLOBCACHEFAILED (ATLSRV_RESID_BASE+36)
|
||||
#define IDS_ATLSRV_CRITICAL_FILECACHEFAILED (ATLSRV_RESID_BASE+37)
|
||||
#define IDS_ATLSRV_SERVER_ERROR_SOAPNOSOAPACTION (ATLSRV_RESID_BASE+38)
|
||||
|
||||
#define IDS_PERFMON_CACHE (PERFMON_RESID_BASE+1)
|
||||
#define IDS_PERFMON_CACHE_HELP (PERFMON_RESID_BASE+2)
|
||||
#define IDS_PERFMON_HITCOUNT (PERFMON_RESID_BASE+3)
|
||||
#define IDS_PERFMON_HITCOUNT_HELP (PERFMON_RESID_BASE+4)
|
||||
#define IDS_PERFMON_MISSCOUNT (PERFMON_RESID_BASE+5)
|
||||
#define IDS_PERFMON_MISSCOUNT_HELP (PERFMON_RESID_BASE+6)
|
||||
#define IDS_PERFMON_CURRENTALLOCATIONS (PERFMON_RESID_BASE+7)
|
||||
#define IDS_PERFMON_CURRENTALLOCATIONS_HELP (PERFMON_RESID_BASE+8)
|
||||
#define IDS_PERFMON_MAXALLOCATIONS (PERFMON_RESID_BASE+9)
|
||||
#define IDS_PERFMON_MAXALLOCATIONS_HELP (PERFMON_RESID_BASE+10)
|
||||
#define IDS_PERFMON_CURRENTENTRIES (PERFMON_RESID_BASE+11)
|
||||
#define IDS_PERFMON_CURRENTENTRIES_HELP (PERFMON_RESID_BASE+12)
|
||||
#define IDS_PERFMON_MAXENTRIES (PERFMON_RESID_BASE+13)
|
||||
#define IDS_PERFMON_MAXENTRIES_HELP (PERFMON_RESID_BASE+14)
|
||||
#define IDS_PERFMON_HITCOUNTRATE (PERFMON_RESID_BASE+15)
|
||||
#define IDS_PERFMON_HITCOUNTRATE_HELP (PERFMON_RESID_BASE+16)
|
||||
|
||||
#define IDS_PERFMON_REQUEST (PERFMON_RESID_BASE+17)
|
||||
#define IDS_PERFMON_REQUEST_HELP (PERFMON_RESID_BASE+18)
|
||||
#define IDS_PERFMON_REQUEST_TOTAL (PERFMON_RESID_BASE+19)
|
||||
#define IDS_PERFMON_REQUEST_TOTAL_HELP (PERFMON_RESID_BASE+20)
|
||||
#define IDS_PERFMON_REQUEST_FAILED (PERFMON_RESID_BASE+21)
|
||||
#define IDS_PERFMON_REQUEST_FAILED_HELP (PERFMON_RESID_BASE+22)
|
||||
#define IDS_PERFMON_REQUEST_RATE (PERFMON_RESID_BASE+23)
|
||||
#define IDS_PERFMON_REQUEST_RATE_HELP (PERFMON_RESID_BASE+24)
|
||||
#define IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME (PERFMON_RESID_BASE+25)
|
||||
#define IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME_HELP (PERFMON_RESID_BASE+26)
|
||||
#define IDS_PERFMON_REQUEST_CURR_WAITING (PERFMON_RESID_BASE+27)
|
||||
#define IDS_PERFMON_REQUEST_CURR_WAITING_HELP (PERFMON_RESID_BASE+28)
|
||||
#define IDS_PERFMON_REQUEST_MAX_WAITING (PERFMON_RESID_BASE+29)
|
||||
#define IDS_PERFMON_REQUEST_MAX_WAITING_HELP (PERFMON_RESID_BASE+30)
|
||||
#define IDS_PERFMON_REQUEST_ACTIVE_THREADS (PERFMON_RESID_BASE+31)
|
||||
#define IDS_PERFMON_REQUEST_ACTIVE_THREADS_HELP (PERFMON_RESID_BASE+32)
|
||||
|
||||
|
||||
//
|
||||
// Stencil parse error support
|
||||
//
|
||||
|
||||
// the error stencil
|
||||
#define IDS_STENCIL_ERROR_STENCIL (STENCIL_RESID_BASE+1)
|
||||
|
||||
// parse errors
|
||||
#define IDS_STENCIL_UNCLOSEDBLOCK_IF (STENCIL_RESID_BASE+2)
|
||||
#define IDS_STENCIL_UNCLOSEDBLOCK_ELSE (STENCIL_RESID_BASE+3)
|
||||
#define IDS_STENCIL_UNCLOSEDBLOCK_WHILE (STENCIL_RESID_BASE+4)
|
||||
#define IDS_STENCIL_UNOPENEDBLOCK_ENDWHILE (STENCIL_RESID_BASE+5)
|
||||
#define IDS_STENCIL_UNOPENEDBLOCK_ELSE (STENCIL_RESID_BASE+6)
|
||||
#define IDS_STENCIL_UNOPENEDBLOCK_ENDIF (STENCIL_RESID_BASE+7)
|
||||
|
||||
#define IDS_STENCIL_INVALID_HANDLER (STENCIL_RESID_BASE+8)
|
||||
#define IDS_STENCIL_NULLPARAM (STENCIL_RESID_BASE+9)
|
||||
#define IDS_STENCIL_INVALIDSTRING (STENCIL_RESID_BASE+10)
|
||||
#define IDS_STENCIL_EMBEDDED_NULL (STENCIL_RESID_BASE+11)
|
||||
#define IDS_STENCIL_UNMATCHED_TAG_START (STENCIL_RESID_BASE+12)
|
||||
#define IDS_STENCIL_MISMATCHED_TAG_START (STENCIL_RESID_BASE+13)
|
||||
#define IDS_STENCIL_BAD_PARAMETER (STENCIL_RESID_BASE+14)
|
||||
#define IDS_STENCIL_METHODNAME_TOO_LONG (STENCIL_RESID_BASE+15)
|
||||
#define IDS_STENCIL_HANDLERNAME_TOO_LONG (STENCIL_RESID_BASE+16)
|
||||
#define IDS_STENCIL_INCLUDE_ERROR (STENCIL_RESID_BASE+17)
|
||||
#define IDS_STENCIL_INCLUDE_INVALID (STENCIL_RESID_BASE+18)
|
||||
#define IDS_STENCIL_INVALID_SUBHANDLER (STENCIL_RESID_BASE+19)
|
||||
#define IDS_STENCIL_UNRESOLVED_REPLACEMENT (STENCIL_RESID_BASE+20)
|
||||
|
||||
// mlang errors
|
||||
#define IDS_STENCIL_MLANG_COCREATE (STENCIL_RESID_BASE+21)
|
||||
#define IDS_STENCIL_MLANG_LCID (STENCIL_RESID_BASE+22)
|
||||
#define IDS_STENCIL_MLANG_GETLOCALE (STENCIL_RESID_BASE+23)
|
||||
#define IDS_STENCIL_MLANG_GETCHARSET (STENCIL_RESID_BASE+24)
|
||||
|
||||
// misceallaneous
|
||||
#define IDS_STENCIL_OUTOFMEMORY (STENCIL_RESID_BASE+25)
|
||||
#define IDS_STENCIL_UNEXPECTED (STENCIL_RESID_BASE+26)
|
||||
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,146 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#include <winresrc.h>
|
||||
#include "atlsrvres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ATLSRV_BAD_REQUEST "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_AUTH_REQUIRED
|
||||
"<html><head><title>Ҫ<><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤</title></head><body>Ҫ<><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤</body></html>"
|
||||
IDS_ATLSRV_FORBIDDEN "<html><head><title><3E><>ֹ</title></head><body><3E><>ֹ</body></html>"
|
||||
IDS_ATLSRV_NOT_FOUND "<html><head><title>δ<>ҵ<EFBFBD></title></head><body>δ<>ҵ<EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_NOT_IMPLEMENTED
|
||||
"<html><head><title>δʵ<CEB4><CAB5></title></head><body>δʵ<CEB4><CAB5></body></html>"
|
||||
IDS_ATLSRV_BAD_GATEWAY "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVICE_NOT_AVAILABLE
|
||||
"<html><head><title><3E><><EFBFBD><EFBFBD><F1B2BBBF><EFBFBD></title></head><body><3E><><EFBFBD><EFBFBD><F1B2BBBF><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADSRF "<html><head><title>Server Error</title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD> SRF <20>ļ<EFBFBD><C4BC><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HNDLFAIL "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SRF <20>Ѽ<EFBFBD><D1BC>أ<EFBFBD><D8A3><EFBFBD><EFBFBD><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SYSOBJFAIL "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD> Windows ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_READFILEFAIL "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܡ<EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADFILEFAIL "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P>ָ<><D6B8><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><DEB7><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADLIB "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P>LoadLibrary ʧ<>ܡ<EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERIF "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>ʧ<EFBFBD>ܡ<EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_OUTOFMEM "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ治<DAB4>㡣</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_UNEXPECTED "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILPARSEFAIL "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILLOADFAIL "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD>ܼ<EFBFBD><DCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD>塣<EFBFBD><E5A1A3>ģ<EFBFBD><C4A3><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F0BBB5BB><EFBFBD><EFBFBD>ڸ<EFBFBD> Web <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERNOTFOUND "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> .dll <20><>δ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADHANDLERTAG "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><DEB7><EFBFBD>ģ<EFBFBD>崦<EFBFBD><E5B4A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǣ<EFBFBD><C7A3><EFBFBD><EFBFBD>߸<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>а<EFBFBD><D0B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǡ<EFBFBD><C7A1><EFBFBD><EFBFBD>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD>壬<EFBFBD>˽<EFBFBD><CBBD><EFBFBD>ȷ<EFBFBD><C8B7>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFB7A8></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_NOHANDLERTAG "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>û<EFBFBD>а<EFBFBD><D0B0><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǡ<EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGMETHODNAME "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>з<EFBFBD><D0B7><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>滻<EFBFBD><E6BBBB><EFBFBD>ǣ<EFBFBD><C7A3><EFBFBD><EFBFBD>滻<EFBFBD><E6BBBB><EFBFBD>ǵ<EFBFBD><C7B5>滻<EFBFBD><E6BBBB><EFBFBD>ƹ<EFBFBD><C6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>滻<EFBFBD><E6BBBB><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>ȱ<F3B3A4B6><C8B1><EFBFBD>С<EFBFBD>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD> atlstencil.h <20>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>ij<EFBFBD><C4B3><EFBFBD> ATL_MAX_METHOD_NAME</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGHANDLERNAME "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>з<EFBFBD><D0B7><EFBFBD>һ<EFBFBD><D2BB>ʹ<EFBFBD><CAB9> id.tagname <20><EFBFBD><EFB7A8><EFBFBD>滻<EFBFBD><E6BBBB><EFBFBD>ǡ<EFBFBD><C7A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>ȱ<F3B3A4B6><C8B1><EFBFBD>С<EFBFBD>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD> atlstencil.h <20>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>ij<EFBFBD><C4B3><EFBFBD> ATL_MAX_METHOD_NAME</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_IMPERSONATIONFAILED "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P>ģ<><C4A3><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>ʧ<EFBFBD>ܡ<EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_ISAPISTARTUPFAILED "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>δ֪<CEB4><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ISAPI <20><>չ<EFBFBD><EFBFBD><DEB7><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD>ء<EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SOAPNOSOAPACTION "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>SOAP request did not provide SOAPACTION header.</body></html>"
|
||||
|
||||
IDS_ATLSRV_CRITICAL_HEAPCREATEFAILED "<22><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD>ʧ<EFBFBD><CAA7>"
|
||||
IDS_ATLSRV_CRITICAL_WORKERINITFAILED "<22><><EFBFBD><EFBFBD><EFBFBD>̳߳<DFB3>ʼ<EFBFBD><CABC>ʧ<EFBFBD><CAA7>"
|
||||
IDS_ATLSRV_CRITICAL_CRITSECINITFAILED "<22>ٽ<EFBFBD><D9BD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ʧ<EFBFBD><CAA7>"
|
||||
IDS_ATLSRV_CRITICAL_THREADPOOLFAILED "<22>̳߳س<CCB3>ʼ<EFBFBD><CABC>ʧ<EFBFBD><CAA7>"
|
||||
IDS_ATLSRV_CRITICAL_DLLCACHEFAILED "DLL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ʧ<EFBFBD><CAA7>"
|
||||
IDS_ATLSRV_CRITICAL_PAGECACHEFAILED "Page <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ʧ<EFBFBD><CAA7>"
|
||||
IDS_ATLSRV_CRITICAL_STENCILCACHEFAILED "ģ<>建<EFBFBD><E5BBBA><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ʧ<EFBFBD><CAA7>"
|
||||
IDS_ATLSRV_CRITICAL_SESSIONSTATEFAILED "<22>Ự״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ʧ<EFBFBD><CAA7>"
|
||||
IDS_ATLSRV_CRITICAL_BLOBCACHEFAILED "Blob <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ʧ<EFBFBD><CAA7>"
|
||||
IDS_ATLSRV_CRITICAL_FILECACHEFAILED "<22>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ʧ<EFBFBD><CAA7>"
|
||||
|
||||
IDS_PERFMON_CACHE "ATL Server:<3A><><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_CACHE_HELP "ATL Server <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ"
|
||||
IDS_PERFMON_HITCOUNT "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_HITCOUNT_HELP "<22><><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ"
|
||||
IDS_PERFMON_MISSCOUNT "<22><><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_MISSCOUNT_HELP "δ<><CEB4><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS "<22><><EFBFBD>浱ǰ<E6B5B1><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS_HELP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>ǰ<EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>С"
|
||||
IDS_PERFMON_MAXALLOCATIONS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_MAXALLOCATIONS_HELP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>С"
|
||||
IDS_PERFMON_CURRENTENTRIES "<22><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_CURRENTENTRIES_HELP "<22><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ"
|
||||
IDS_PERFMON_MAXENTRIES "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_MAXENTRIES_HELP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ"
|
||||
IDS_PERFMON_HITCOUNTRATE "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_HITCOUNTRATE_HELP "ÿ<><C3BF><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST "ATL Server:<3A><><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_HELP "<22><><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3><EFBFBD><EFBFBD>Ϣ"
|
||||
IDS_PERFMON_REQUEST_TOTAL "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_TOTAL_HELP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_FAILED "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_FAILED_HELP "ʧ<>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ"
|
||||
IDS_PERFMON_REQUEST_RATE "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><>"
|
||||
IDS_PERFMON_REQUEST_RATE_HELP "ÿ<><C3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME "ƽ<><C6BD><EFBFBD><EFBFBD>Ӧʱ<D3A6><CAB1>"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME_HELP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><C6BD>ʱ<EFBFBD><CAB1>"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING "<22><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING_HELP "<22><>ǰ<EFBFBD>ȴ<EFBFBD><C8B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING_HELP "<22>ȴ<EFBFBD><C8B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS "<22><EFBFBD>߳<EFBFBD><DFB3><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS_HELP "<22><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļ<C4BB>߳<EFBFBD><DFB3><EFBFBD>"
|
||||
END
|
||||
|
||||
|
||||
#ifndef ATL_NO_DEFAULT_STENCIL_RESOURCE
|
||||
dllmgr.srf HTML "res\\dllmgr.srf"
|
||||
stencilmgr.srf HTML "res\\stencilmgr.srf"
|
||||
threadmgr.srf HTML "res\\threadmgr.srf"
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Stencil parse error support
|
||||
//
|
||||
#ifdef ATL_DEBUG_STENCILS
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_STENCIL_ERROR_STENCIL
|
||||
"{{codepage 0}}<h1><font color=#ff0000><3E><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>ļ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD><C2B4><EFBFBD><EFBFBD><EFBFBD></font></h1>\r\n{{while GetNextError}}<table border=1 width=50%>\r\n<tr><td width=25%><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td><td>{{GetErrorText}}</td></tr>\r\n<tr><td><3E>к<EFBFBD></td><td>{{GetErrorLineNumber}}</td></tr>\r\n<tr><td><3E><><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD></td><td><pre>{{GetErrorLine}}</pre></td></tr>\r\n</table>\r\n{{endwhile}}<br>ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>\r\n<hr>"
|
||||
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_IF "{{if}} ȱ<><C8B1> {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_ELSE "{{else}} ȱ<><C8B1> {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_WHILE "{{while}} ȱ<><C8B1> {{endwhile}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDWHILE "{{endwhile}} ȱ<><C8B1> {{while}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ELSE "{{else}} ȱ<><C8B1> {{if}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDIF "{{endif}} ȱ<><C8B1> {{if}} or {{else}}"
|
||||
|
||||
IDS_STENCIL_INVALID_HANDLER "<22><>Ч<EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_STENCIL_NULLPARAM "ParseReplacements Ϊ Null <20><><EFBFBD><EFBFBD>"
|
||||
IDS_STENCIL_INVALIDSTRING "<22><><EFBFBD>ݸ<EFBFBD> ParseReplacements <20><><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>Ϊ<EFBFBD>ջ<EFBFBD><D5BB><EFBFBD>Ϊ<EFBFBD><CEAA>"
|
||||
IDS_STENCIL_EMBEDDED_NULL "Ƕ<><C7B6><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>еĿ<D0B5><C4BF>ַ<EFBFBD>"
|
||||
IDS_STENCIL_UNMATCHED_TAG_START "<22><>ƥ<EFBFBD><C6A5> {{"
|
||||
IDS_STENCIL_MISMATCHED_TAG_START "ƥ<><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> {{"
|
||||
IDS_STENCIL_BAD_PARAMETER "<22><><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>"
|
||||
IDS_STENCIL_METHODNAME_TOO_LONG "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƹ<EFBFBD><C6B9><EFBFBD>"
|
||||
IDS_STENCIL_HANDLERNAME_TOO_LONG "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƹ<EFBFBD><C6B9><EFBFBD>"
|
||||
IDS_STENCIL_INVALID_SUBHANDLER "<22><>Ч<EFBFBD><D0A7><EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_STENCIL_UNRESOLVED_REPLACEMENT "<22><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>滻 : '%s'"
|
||||
|
||||
IDS_STENCIL_INCLUDE_ERROR "<22><EFBFBD><DEB7><EFBFBD><F2BFAAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"
|
||||
IDS_STENCIL_INCLUDE_INVALID "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>Ǵ<EFBFBD><C7B4><EFBFBD><EFBFBD>ļ<EFBFBD>"
|
||||
|
||||
IDS_STENCIL_MLANG_COCREATE "<22><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD> CMultiLanguage"
|
||||
IDS_STENCIL_MLANG_LCID "<22><>ȡ lcid <20><><EFBFBD><EFBFBD>"
|
||||
IDS_STENCIL_MLANG_GETLOCALE "GetLocaleInfo ʧ<><CAA7>"
|
||||
IDS_STENCIL_MLANG_GETCHARSET "GetCharsetInfo ʧ<><CAA7>"
|
||||
|
||||
IDS_STENCIL_OUTOFMEMORY "<22>ڴ治<DAB4><E6B2BB>"
|
||||
IDS_STENCIL_UNEXPECTED "<22>쳣<EFBFBD><ECB3A3><EFBFBD><EFBFBD>"
|
||||
END
|
||||
|
||||
#endif
|
||||
@@ -1,146 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#include <winresrc.h>
|
||||
#include "atlsrvres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ATLSRV_BAD_REQUEST "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD>T<EFBFBD><54><EFBFBD>n<EFBFBD>D</title></head><body><3E><><EFBFBD><EFBFBD><EFBFBD>T<EFBFBD><54><EFBFBD>n<EFBFBD>D</body></html>"
|
||||
IDS_ATLSRV_AUTH_REQUIRED
|
||||
"<html><head><title><3E>ݭn<DDAD><6E><EFBFBD>v</title></head><body><3E>ݭn<DDAD><6E><EFBFBD>v</body></html>"
|
||||
IDS_ATLSRV_FORBIDDEN "<html><head><title><3E>T<EFBFBD><54><EFBFBD>ϥ<EFBFBD></title></head><body><3E>T<EFBFBD><54><EFBFBD>ϥ<EFBFBD></body></html>"
|
||||
IDS_ATLSRV_NOT_FOUND "<html><head><title><3E>䤣<EFBFBD><E4A4A3></title></head><body><3E>䤣<EFBFBD><E4A4A3></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</body></html>"
|
||||
IDS_ATLSRV_NOT_IMPLEMENTED
|
||||
"<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD>@</title></head><body><3E><><EFBFBD><EFBFBD><EFBFBD>@</body></html>"
|
||||
IDS_ATLSRV_BAD_GATEWAY "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD>T<EFBFBD><54><EFBFBD>h<EFBFBD>D</title></head><body><3E><><EFBFBD><EFBFBD><EFBFBD>T<EFBFBD><54><EFBFBD>h<EFBFBD>D</body></html>"
|
||||
IDS_ATLSRV_SERVICE_NOT_AVAILABLE
|
||||
"<html><head><title><3E>L<EFBFBD>k<EFBFBD><6B><EFBFBD>o<EFBFBD>A<EFBFBD><41></title></head><body><3E>L<EFBFBD>k<EFBFBD><6B><EFBFBD>o<EFBFBD>A<EFBFBD><41></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADSRF "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E>L<EFBFBD>k<EFBFBD><6B><EFBFBD>J SRF <20>ɡC</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HNDLFAIL "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E>w<EFBFBD>g<EFBFBD><67><EFBFBD>J<EFBFBD>n<EFBFBD>D<EFBFBD><44> SRF <20>ɡA<C9A1><41><EFBFBD>L<EFBFBD>k<EFBFBD><6B><EFBFBD>\<5C>B<EFBFBD>z<EFBFBD>C</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SYSOBJFAIL "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E>L<EFBFBD>k<EFBFBD>إ<EFBFBD> Windows <20>t<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>C</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_READFILEFAIL "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E>ɮ<EFBFBD>Ū<EFBFBD><C5AA><EFBFBD>@<40>~<7E>w<EFBFBD><77><EFBFBD>ѡC</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADFILEFAIL "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E>L<EFBFBD>k<EFBFBD>}<7D>ҫ<EFBFBD><D2AB>w<EFBFBD><77><EFBFBD>ɮסC</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADLIB "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P>LoadLibrary <20>w<EFBFBD><77><EFBFBD>ѡC</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERIF "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E>L<EFBFBD>k<EFBFBD>^<5E><><EFBFBD>n<EFBFBD>D<EFBFBD><44><EFBFBD>B<EFBFBD>z<EFBFBD>`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>C</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_OUTOFMEM "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E><><EFBFBD>A<EFBFBD><41><EFBFBD>O<EFBFBD><4F><EFBFBD>餣<EFBFBD><E9A4A3><EFBFBD>C</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_UNEXPECTED "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E><><EFBFBD>A<EFBFBD><41><EFBFBD>o<EFBFBD>ͥ<EFBFBD><CDA5>w<EFBFBD><77><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~<7E>C</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILPARSEFAIL "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E><><EFBFBD>խ<EFBFBD><D5AD>R<EFBFBD>n<EFBFBD>D<EFBFBD><44><EFBFBD>ҪO<D2AA>ɡA<C9A1><41><EFBFBD>A<EFBFBD><41><EFBFBD>o<EFBFBD>ͥ<EFBFBD><CDA5>w<EFBFBD><77><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~<7E>C</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILLOADFAIL "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E><><EFBFBD>A<EFBFBD><41><EFBFBD>L<EFBFBD>k<EFBFBD><6B><EFBFBD>J<EFBFBD>n<EFBFBD>D<EFBFBD><44><EFBFBD>ҪO<D2AA>C<EFBFBD>ҪO<D2AA>ɥi<C9A5><69><EFBFBD>w<EFBFBD>l<EFBFBD><6C><EFBFBD>Τ<EFBFBD><CEA4>b<EFBFBD><62> Web <20><><EFBFBD>A<EFBFBD><41><EFBFBD>W<EFBFBD>C</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERNOTFOUND "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E>b<EFBFBD><62><EFBFBD>w<EFBFBD><77> handler .dll <20><><EFBFBD>A<EFBFBD>䤣<EFBFBD><E4A4A3><EFBFBD>b<EFBFBD>n<EFBFBD>D<EFBFBD>ҪO<D2AA><4F><EFBFBD>B<EFBFBD>z<EFBFBD>`<60><><EFBFBD>аO<D0B0><4F><EFBFBD>R<EFBFBD>W<EFBFBD><57><EFBFBD>Y<EFBFBD>ӳB<D3B3>z<EFBFBD>`<60><><EFBFBD>C</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADHANDLERTAG "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E><><EFBFBD>ҪO<D2AA>]<5D>t<EFBFBD>ҪO<D2AA>B<EFBFBD>z<EFBFBD><7A><EFBFBD>L<EFBFBD>k<EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>R<EFBFBD><52><EFBFBD>B<EFBFBD>z<EFBFBD>`<60><><EFBFBD>аO<D0B0>A<EFBFBD>Υ<EFBFBD><CEA5>]<5D>t<EFBFBD><74><EFBFBD><EFBFBD><EFBFBD>B<EFBFBD>z<EFBFBD>`<60><><EFBFBD>аO<D0B0>C<EFBFBD><43><EFBFBD>ˬd<CBAC>n<EFBFBD>D<EFBFBD><44><EFBFBD>ҪO<D2AA>O<EFBFBD>_<EFBFBD>ϥξA<CEBE>X<EFBFBD><58><EFBFBD>ҪO<D2AA>y<EFBFBD>k<EFBFBD>C</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_NOHANDLERTAG "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E>n<EFBFBD>D<EFBFBD><44><EFBFBD>ҪO<D2AA><4F><EFBFBD>]<5D>t<EFBFBD>B<EFBFBD>z<EFBFBD>`<60><><EFBFBD>аO<D0B0>C</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGMETHODNAME "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E>b<EFBFBD>n<EFBFBD>D<EFBFBD><44><EFBFBD>ҪO<D2AA><4F><EFBFBD>o<EFBFBD>{<7B><><EFBFBD>N<EFBFBD>аO<D0B0><4F><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD>W<EFBFBD>٤Ӫ<D9A4><D3AA>C<EFBFBD><43><EFBFBD>N<EFBFBD>W<EFBFBD>ٳ̪<D9B3><CCAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ץ<EFBFBD><D7A5><EFBFBD><EFBFBD>p<EFBFBD><70><EFBFBD>ε<EFBFBD><CEB5><EFBFBD><EFBFBD>b atlstencil.h <20><><EFBFBD>ҩw<D2A9>q<EFBFBD><71> ATL_MAX_METHOD_NAME <20>`<60>ơC</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGHANDLERNAME "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E>b<EFBFBD>n<EFBFBD>D<EFBFBD>ҪO<D2AA><4F><EFBFBD>ϥ<EFBFBD> id.tagname <20>y<EFBFBD>k<EFBFBD><6B><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD>аO<D0B0><4F><EFBFBD>B<EFBFBD>z<EFBFBD>`<60><><EFBFBD>W<EFBFBD>٤Ӫ<D9A4><D3AA>C<EFBFBD>B<EFBFBD>z<EFBFBD>`<60><><EFBFBD>W<EFBFBD>ٳ̪<D9B3><CCAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ץ<EFBFBD><D7A5><EFBFBD><EFBFBD>p<EFBFBD><70><EFBFBD>ε<EFBFBD><CEB5><EFBFBD><EFBFBD>b atlstencil.h <20><><EFBFBD>ҩw<D2A9>q<EFBFBD><71> ATL_MAX_METHOD_NAME <20>`<60>ơC</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_IMPERSONATIONFAILED "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E><><EFBFBD>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>Τ<EFBFBD><CEA4>ݳy<DDB3><79><EFBFBD>n<EFBFBD>D<EFBFBD><44><EFBFBD>ѡC</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_ISAPISTARTUPFAILED "<html><head><title><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</title></head><body><H1><3E><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>~</H1><P><3E>]<5D><><EFBFBD>o<EFBFBD>ͥ<EFBFBD><CDA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~<7E>A<EFBFBD>L<EFBFBD>k<EFBFBD><6B><EFBFBD>T<EFBFBD><54><EFBFBD>J<EFBFBD>ΨӪA<D3AA>Ȧ<EFBFBD><C8A6>n<EFBFBD>D<EFBFBD><44> ISAPI <20>X<EFBFBD>R<EFBFBD>{<7B><><EFBFBD>C</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SOAPNOSOAPACTION "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>SOAP request did not provide SOAPACTION header.</body></html>"
|
||||
|
||||
IDS_ATLSRV_CRITICAL_HEAPCREATEFAILED "<22>n<EFBFBD>D<EFBFBD><44><EFBFBD>n<EFBFBD>إߥ<D8A5><DFA5><EFBFBD>"
|
||||
IDS_ATLSRV_CRITICAL_WORKERINITFAILED "<22>I<EFBFBD><49><EFBFBD>u<EFBFBD>@<40><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>l<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>"
|
||||
IDS_ATLSRV_CRITICAL_CRITSECINITFAILED "<22><><EFBFBD><EFBFBD><EFBFBD>Ϭq<CFAC><71><EFBFBD>l<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>"
|
||||
IDS_ATLSRV_CRITICAL_THREADPOOLFAILED "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϫ<EFBFBD><CFAA>l<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>"
|
||||
IDS_ATLSRV_CRITICAL_DLLCACHEFAILED "DLL <20>֨<EFBFBD><D6A8><EFBFBD><EFBFBD>l<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>"
|
||||
IDS_ATLSRV_CRITICAL_PAGECACHEFAILED "<22><><EFBFBD><EFBFBD><EFBFBD>֨<EFBFBD><D6A8><EFBFBD><EFBFBD>l<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>"
|
||||
IDS_ATLSRV_CRITICAL_STENCILCACHEFAILED "<22>ҪO<D2AA>֨<EFBFBD><D6A8><EFBFBD><EFBFBD>l<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>"
|
||||
IDS_ATLSRV_CRITICAL_SESSIONSTATEFAILED "<22>u<EFBFBD>@<40><><EFBFBD>q<EFBFBD><71><EFBFBD>A<EFBFBD>A<EFBFBD>Ȫ<EFBFBD><C8AA>l<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>"
|
||||
IDS_ATLSRV_CRITICAL_BLOBCACHEFAILED "Blob <20>֨<EFBFBD><D6A8><EFBFBD><EFBFBD>l<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>"
|
||||
IDS_ATLSRV_CRITICAL_FILECACHEFAILED "<22>ɮק֨<D7A7><D6A8><EFBFBD><EFBFBD>l<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>"
|
||||
|
||||
IDS_PERFMON_CACHE "ATL Server:<3A>֨<EFBFBD>"
|
||||
IDS_PERFMON_CACHE_HELP "<22><><EFBFBD><EFBFBD> ATL Server <20>֨<EFBFBD><D6A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>T"
|
||||
IDS_PERFMON_HITCOUNT "<22>֨<EFBFBD><D6A8>s<EFBFBD>Φ<EFBFBD><CEA6><EFBFBD>"
|
||||
IDS_PERFMON_HITCOUNT_HELP "<22>֨<EFBFBD><D6A8>s<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_MISSCOUNT "<22>֨<EFBFBD><D6A8><EFBFBD><EFBFBD>|<7C><><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_MISSCOUNT_HELP "<22>֨<EFBFBD><D6A8><EFBFBD><EFBFBD>|<7C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS "<22>֨<EFBFBD><D6A8>ثe<D8AB>t<EFBFBD>m"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS_HELP "<22>֨<EFBFBD><D6A8>ثe<D8AB><65><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>m"
|
||||
IDS_PERFMON_MAXALLOCATIONS "<22>֨<EFBFBD><D6A8>t<EFBFBD>m<EFBFBD>W<EFBFBD><57>"
|
||||
IDS_PERFMON_MAXALLOCATIONS_HELP "<22>֨<EFBFBD><D6A8><EFBFBD><EFBFBD>̤j<CCA4>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>m"
|
||||
IDS_PERFMON_CURRENTENTRIES "<22>֨<EFBFBD><D6A8>ثe<D8AB><65><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_CURRENTENTRIES_HELP "<22>ثe<D8AB><65><EFBFBD>֨<EFBFBD><D6A8><EFBFBD><EFBFBD>ؼ<EFBFBD>"
|
||||
IDS_PERFMON_MAXENTRIES "<22>֨<EFBFBD><D6A8><EFBFBD><EFBFBD>ؤW<D8A4><57>"
|
||||
IDS_PERFMON_MAXENTRIES_HELP "<22>֨<EFBFBD><D6A8><EFBFBD><EFBFBD>ت<EFBFBD><D8AA>̤j<CCA4><6A>"
|
||||
IDS_PERFMON_HITCOUNTRATE "<22>֨<EFBFBD><D6A8>s<EFBFBD>βv"
|
||||
IDS_PERFMON_HITCOUNTRATE_HELP "<22>C<EFBFBD><43><EFBFBD>֨<EFBFBD><D6A8>s<EFBFBD>Ϊ<EFBFBD><CEAA>ƥ<EFBFBD>"
|
||||
IDS_PERFMON_REQUEST "ATL Server:<3A>n<EFBFBD>D"
|
||||
IDS_PERFMON_REQUEST_HELP "<22><><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>J<EFBFBD><4A><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><41><EFBFBD>n<EFBFBD>D<EFBFBD><44><EFBFBD>έp<CEAD><70><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_TOTAL "<22><><EFBFBD>A<EFBFBD><41><EFBFBD>n<EFBFBD>D<EFBFBD>`<60><>"
|
||||
IDS_PERFMON_REQUEST_TOTAL_HELP "<22>n<EFBFBD>D<EFBFBD><44><EFBFBD>`<60><>"
|
||||
IDS_PERFMON_REQUEST_FAILED "<22><><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>ѭn<D1AD>D"
|
||||
IDS_PERFMON_REQUEST_FAILED_HELP "<22><><EFBFBD>ѭn<D1AD>D<EFBFBD><44><EFBFBD>ƥ<EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_RATE "<22><><EFBFBD>A<EFBFBD><41><EFBFBD>n<EFBFBD>D /<2F><>"
|
||||
IDS_PERFMON_REQUEST_RATE_HELP "<22>C<EFBFBD><43><EFBFBD>n<EFBFBD>D<EFBFBD>ƥ<EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME "<22><><EFBFBD><EFBFBD><EFBFBD>^<5E><><EFBFBD>ɶ<EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME_HELP "<22>B<EFBFBD>z<EFBFBD>n<EFBFBD>D<EFBFBD>Ҫ<EFBFBD><D2AA>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɶ<EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING "<22>ثe<D8AB>w<EFBFBD>ƤJ<C6A4><4A><EFBFBD>C<EFBFBD><43><EFBFBD>n<EFBFBD>D"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING_HELP "<22>ثe<D8AB><65><EFBFBD>ԳB<D4B3>z<EFBFBD><7A><EFBFBD>n<EFBFBD>D<EFBFBD>ƥ<EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING "<22><><EFBFBD>C<EFBFBD>n<EFBFBD>D<EFBFBD>W<EFBFBD><57>"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING_HELP "<22><><EFBFBD>ԳB<D4B3>z<EFBFBD>n<EFBFBD>D<EFBFBD><44><EFBFBD>̤j<CCA4><6A>"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS "<22>@<40>Τ<EFBFBD><CEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS_HELP "<22><><EFBFBD>b<EFBFBD>B<EFBFBD>z<EFBFBD>n<EFBFBD>D<EFBFBD><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD>"
|
||||
END
|
||||
|
||||
|
||||
#ifndef ATL_NO_DEFAULT_STENCIL_RESOURCE
|
||||
dllmgr.srf HTML "res\\dllmgr.srf"
|
||||
stencilmgr.srf HTML "res\\stencilmgr.srf"
|
||||
threadmgr.srf HTML "res\\threadmgr.srf"
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Stencil parse error support
|
||||
//
|
||||
#ifdef ATL_DEBUG_STENCILS
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_STENCIL_ERROR_STENCIL
|
||||
"{{codepage 0}}<h1><font color=#ff0000> <20><><EFBFBD><EFBFBD><EFBFBD>խ<EFBFBD><D5AD>R<EFBFBD>ҪO<D2AA>ɮɡA<C9A1>o<EFBFBD>ͤU<CDA4>C<EFBFBD><43><EFBFBD>~:</font></h1>\r\n{{while GetNextError}}<table border=1 width=50%>\r\n<tr><td width=25%><3E><><EFBFBD>~<7E><><EFBFBD><EFBFBD></td><td>{{GetErrorText}}</td></tr>\r\n<tr><td><3E>渹</td><td>{{GetErrorLineNumber}}</td></tr>\r\n<tr><td><3E><><EFBFBD>~<7E><><EFBFBD>r</td><td><pre>{{GetErrorLine}}</pre></td></tr>\r\n</table>\r\n{{endwhile}}<br><3E><><EFBFBD>᪺<EFBFBD>ҪO<D2AA><4F><EFBFBD>X:\r\n<hr>"
|
||||
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_IF "<22><> {{if}} <20><><EFBFBD>S<EFBFBD><53> {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_ELSE "<22><> {{else}} <20><><EFBFBD>S<EFBFBD><53> {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_WHILE "<22><> {{while}} <20><><EFBFBD>S<EFBFBD><53> {{endwhile}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDWHILE "<22><> {{endwhile}} <20><><EFBFBD>S<EFBFBD><53> {{while}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ELSE "<22><> {{else}} <20><><EFBFBD>S<EFBFBD><53> {{if}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDIF "<22><> {{endif}} <20><><EFBFBD>S<EFBFBD><53> {{if}} <20><> {{else}}"
|
||||
|
||||
IDS_STENCIL_INVALID_HANDLER "<22>L<EFBFBD>Ī<EFBFBD><C4AA>B<EFBFBD>z<EFBFBD>`<60><><EFBFBD>аO"
|
||||
IDS_STENCIL_NULLPARAM "ParseReplacements <20><> NULL <20>Ѽ<EFBFBD>"
|
||||
IDS_STENCIL_INVALIDSTRING "<22>ǻ<EFBFBD><C7BB><EFBFBD> ParseReplacements <20><><EFBFBD>Ū<EFBFBD><C5AA>έt<CEAD>Ȧr<C8A6><72>"
|
||||
IDS_STENCIL_EMBEDDED_NULL "<22>ҪO<D2AA><4F><EFBFBD>O<EFBFBD>J<EFBFBD><4A> Null <20>r<EFBFBD><72>"
|
||||
IDS_STENCIL_UNMATCHED_TAG_START "<22><><EFBFBD>۲Ū<DBB2> {{"
|
||||
IDS_STENCIL_MISMATCHED_TAG_START "<22><><EFBFBD>۲Ū<DBB2> {{"
|
||||
IDS_STENCIL_BAD_PARAMETER "<22><><EFBFBD><EFBFBD><EFBFBD>T<EFBFBD><54><EFBFBD>Ѽ<EFBFBD>"
|
||||
IDS_STENCIL_METHODNAME_TOO_LONG "<22><><EFBFBD>k<EFBFBD>W<EFBFBD>٤Ӫ<D9A4>"
|
||||
IDS_STENCIL_HANDLERNAME_TOO_LONG "<22>B<EFBFBD>z<EFBFBD>`<60><><EFBFBD>W<EFBFBD>٤Ӫ<D9A4>"
|
||||
IDS_STENCIL_INVALID_SUBHANDLER "<22>L<EFBFBD>Ī<EFBFBD><C4AA>l<EFBFBD>B<EFBFBD>z<EFBFBD>`<60><><EFBFBD>аO"
|
||||
IDS_STENCIL_UNRESOLVED_REPLACEMENT "<22>L<EFBFBD>k<EFBFBD>ѪR<D1AA><52><EFBFBD><EFBFBD><EFBFBD>N : '%s'"
|
||||
|
||||
IDS_STENCIL_INCLUDE_ERROR "<22>L<EFBFBD>k<EFBFBD>}<7D>ҥ]<5D>t<EFBFBD><74><EFBFBD>ɮ<EFBFBD>"
|
||||
IDS_STENCIL_INCLUDE_INVALID "<22>]<5D>t<EFBFBD><74><EFBFBD>ɮפ<C9AE><D7A4>O<EFBFBD>Ϻ<EFBFBD><CFBA>ɮ<EFBFBD>"
|
||||
|
||||
IDS_STENCIL_MLANG_COCREATE "<22>L<EFBFBD>k<EFBFBD>إ<EFBFBD> CMultiLanguage"
|
||||
IDS_STENCIL_MLANG_LCID "<22><><EFBFBD>o lcid <20>o<EFBFBD>Ϳ<EFBFBD><CDBF>~"
|
||||
IDS_STENCIL_MLANG_GETLOCALE "GetLocaleInfo <20><><EFBFBD><EFBFBD>"
|
||||
IDS_STENCIL_MLANG_GETCHARSET "GetCharsetInfo <20><><EFBFBD><EFBFBD>"
|
||||
|
||||
IDS_STENCIL_OUTOFMEMORY "<22>O<EFBFBD><4F><EFBFBD>餣<EFBFBD><E9A4A3>"
|
||||
IDS_STENCIL_UNEXPECTED "<22><><EFBFBD>w<EFBFBD><77><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~"
|
||||
END
|
||||
|
||||
#endif
|
||||
@@ -1,146 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#include <winresrc.h>
|
||||
#include "atlsrvres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ATLSRV_BAD_REQUEST "<html><head><title>Ung<6E>ltige Anforderung</title></head><body>Ung<6E>ltige Anforderung</body></html>"
|
||||
IDS_ATLSRV_AUTH_REQUIRED
|
||||
"<html><head><title>Authorisierung erforderlich</title></head><body>Authorisierung erforderlich</body></html>"
|
||||
IDS_ATLSRV_FORBIDDEN "<html><head><title>Unzul<75>ssig</title></head><body>Unzul<75>ssig</body></html>"
|
||||
IDS_ATLSRV_NOT_FOUND "<html><head><title>Nicht gefunden</title></head><body>Nicht gefunden</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR "<html><head><title>Serverfehler</title></head><body>Serverfehler</body></html>"
|
||||
IDS_ATLSRV_NOT_IMPLEMENTED
|
||||
"<html><head><title>Nicht implementiert</title></head><body>Nicht implementiert</body></html>"
|
||||
IDS_ATLSRV_BAD_GATEWAY "<html><head><title>Ung<6E>ltiger Gateway</title></head><body>Ung<6E>ltiger Gateway</body></html>"
|
||||
IDS_ATLSRV_SERVICE_NOT_AVAILABLE
|
||||
"<html><head><title>Dienst nicht verf<72>gbar</title></head><body>Dienst nicht verf<72>gbar</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADSRF "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>SRF-Datei konnte nicht geladen werden.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HNDLFAIL "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Die angeforderte SRF-Datei wurde geladen, aber konnte nicht verarbeitet werden.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SYSOBJFAIL "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Ein Windows-Systemobjekt konnte nicht erstellt werden.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_READFILEFAIL "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Ein Dateilesevorgang ist fehlgeschlagen.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADFILEFAIL "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Die angegebene Datei konnte nicht ge<67>ffnet werden.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADLIB "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>LoadLibrary fehlgeschlagen.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERIF "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Die Anforderungshandlerschnittstelle konnte nicht abgerufen werden.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_OUTOFMEM "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Auf dem Server ist nicht gen<65>gend Arbeitsspeicher verf<72>gbar.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_UNEXPECTED "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Auf dem Server ist ein unerwarteter Fehler aufgetreten.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILPARSEFAIL "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Beim Bearbeiten des angeforderten Stencils ist ein unerwarteter Fehler auf dem Server aufgetreten.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILLOADFAIL "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Der Server konnte den angeforderten Stencil nicht laden. Die Stencildatei ist m<>glicherweise besch<63>digt oder nicht auf dem Webserver vorhanden.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERNOTFOUND "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Ein in einem Handlertag benannter Handler f<>r den angeforderten Stencil konnte nicht im angegebenen Handler gefunden werden .dll.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADHANDLERTAG "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Der Stencil enth<74>lt ein Handlertag, das vom Stencilprozessor nicht richtig bearbeitet werden konnte und kein Handlertag enth<74>lt. <20>berpr<70>fen Sie die Stencilsyntax f<>r den angeforderten Stencil.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_NOHANDLERTAG "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Der angeforderte Stencil enth<74>lt kein Handlertag.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGMETHODNAME "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Im angeforderten Stencil wurde ein Ersetzungstag mit einem zu langen Namen gefunden. Die maximale L<>nge des Ersetzungsnamen muss kleiner oder gleich der ATL_MAX_METHOD_NAME-Konstante sein, die in atlstencil.h definiert ist.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGHANDLERNAME "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Im angeforderten Stencil wurde ein Ersetzungstag mit einem zu langen Handlernamen gefunden, der die id.tagname-Syntax verwendet. Die maximale L<>nge des Handlernamens muss kleiner oder gleich der ATL_MAX_METHOD_NAME-Konstante sein, die in atlstencil.h definiert ist.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_IMPERSONATIONFAILED "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Die Anforderung ist fehlgeschlagen, da versucht wurde, den Client zu imitieren.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_ISAPISTARTUPFAILED "<html><head><title>Serverfehler</title></head><body><H1>Serverfehler</H1><P>Die ISAPI-Erweiterung f<>r die Anforderung konnte nicht geladen werden, da ein unbekannter Fehler aufgetreten ist.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SOAPNOSOAPACTION "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>SOAP request did not provide SOAPACTION header.</body></html>"
|
||||
|
||||
IDS_ATLSRV_CRITICAL_HEAPCREATEFAILED "Anforderungsheap konnte nicht erstellt werden"
|
||||
IDS_ATLSRV_CRITICAL_WORKERINITFAILED "Workerthread konnte nicht initialisiert werden"
|
||||
IDS_ATLSRV_CRITICAL_CRITSECINITFAILED "Kritischer Abschnitt konnte nicht initialisiert werden"
|
||||
IDS_ATLSRV_CRITICAL_THREADPOOLFAILED "Threadpool konnte nicht initialisiert werden"
|
||||
IDS_ATLSRV_CRITICAL_DLLCACHEFAILED "DLL-Cache konnte nicht initialisiert werden"
|
||||
IDS_ATLSRV_CRITICAL_PAGECACHEFAILED "Seitencache konnte nicht initialisiert werden"
|
||||
IDS_ATLSRV_CRITICAL_STENCILCACHEFAILED "Stencilcache konnte nicht initialisiert werden"
|
||||
IDS_ATLSRV_CRITICAL_SESSIONSTATEFAILED "Sitzungsstatusdienst konnte nicht initialisiert werden"
|
||||
IDS_ATLSRV_CRITICAL_BLOBCACHEFAILED "Blobcache konnte nicht initialisiert werden"
|
||||
IDS_ATLSRV_CRITICAL_FILECACHEFAILED "Dateicache konnte nicht initialisiert werden"
|
||||
|
||||
IDS_PERFMON_CACHE "ATL-Server:Cache"
|
||||
IDS_PERFMON_CACHE_HELP "Informationen <20>ber den ATL-Servercache"
|
||||
IDS_PERFMON_HITCOUNT "Cachetrefferanzahl"
|
||||
IDS_PERFMON_HITCOUNT_HELP "Anzahl der Cachetreffer"
|
||||
IDS_PERFMON_MISSCOUNT "Fehlgeschlagene Cachezugriffe"
|
||||
IDS_PERFMON_MISSCOUNT_HELP "Anzahl der fehlgeschlagenen Cachezugriffe"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS "Aktuelle Cachezuordnungen"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS_HELP "Aktuelle Speicherzuordnung f<>r den Cache"
|
||||
IDS_PERFMON_MAXALLOCATIONS "Max. Cachezuordnungen"
|
||||
IDS_PERFMON_MAXALLOCATIONS_HELP "Maximale Speicherzuordnung f<>r den Cache"
|
||||
IDS_PERFMON_CURRENTENTRIES "Aktuelle Cacheeintr<74>ge"
|
||||
IDS_PERFMON_CURRENTENTRIES_HELP "Aktuelle Anzahl der Cacheeintr<74>ge"
|
||||
IDS_PERFMON_MAXENTRIES "Max. Cacheeintr<74>ge"
|
||||
IDS_PERFMON_MAXENTRIES_HELP "Maximale Anzahl der Cacheeintr<74>ge"
|
||||
IDS_PERFMON_HITCOUNTRATE "Cachetrefferanzahl"
|
||||
IDS_PERFMON_HITCOUNTRATE_HELP "Anzahl der Treffer pro Sekunde"
|
||||
IDS_PERFMON_REQUEST "ATL-Server:Request"
|
||||
IDS_PERFMON_REQUEST_HELP "Statistik <20>ber die eingehenden Serveranforderungen"
|
||||
IDS_PERFMON_REQUEST_TOTAL "Serveranforderungen insgesamt"
|
||||
IDS_PERFMON_REQUEST_TOTAL_HELP "Gesamtanzahl der Anforderungen"
|
||||
IDS_PERFMON_REQUEST_FAILED "Fehlgeschlagene Serveranforderungen"
|
||||
IDS_PERFMON_REQUEST_FAILED_HELP "Anzahl der fehlgeschlagenen Anforderungen"
|
||||
IDS_PERFMON_REQUEST_RATE "Serveranforderungen /Sek."
|
||||
IDS_PERFMON_REQUEST_RATE_HELP "Anzahl der Anforderungen pro Sekunde"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME "Durchschnittliche Antwortzeit"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME_HELP "Durchschnittliche Bearbeitungszeit"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING "Aktuelle Anforderungen in der Warteschlange"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING_HELP "Die aktuvelle Anzahl der Anforderungen, die auf die Bearbeitung warten"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING "Maximale Anforderungen in der Warteschlange"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING_HELP "Die maximale Anzahl der Anforderungen, die auf die Bearbeitung warten"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS "AKtive Threads"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS_HELP "Die Anzahl der Threads, die Anforderungen bearbeiten"
|
||||
END
|
||||
|
||||
|
||||
#ifndef ATL_NO_DEFAULT_STENCIL_RESOURCE
|
||||
dllmgr.srf HTML "res\\dllmgr.srf"
|
||||
stencilmgr.srf HTML "res\\stencilmgr.srf"
|
||||
threadmgr.srf HTML "res\\threadmgr.srf"
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Stencil parse error support
|
||||
//
|
||||
#ifdef ATL_DEBUG_STENCILS
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_STENCIL_ERROR_STENCIL
|
||||
"{{codepage 0}}<h1><font color=#ff0000>Beim Bearbeiten einer Stencildatei sind folgende Fehler aufgetreten:</font></h1>\r\n{{while GetNextError}}<table border=1 width=50%>\r\n<tr><td width=25%>Fehlertyp</td><td>{{GetErrorText}}</td></tr>\r\n<tr><td>Zeilennummer</td><td>{{GetErrorLineNumber}}</td></tr>\r\n<tr><td>Fehlertext</td><td><pre>{{GetErrorLine}}</pre></td></tr>\r\n</table>\r\n{{endwhile}}<br>Stencilausgabe:\r\n<hr>"
|
||||
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_IF "{{if}} ohne {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_ELSE "{{else}} ohne {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_WHILE "{{while}} ohne {{endwhile}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDWHILE "{{endwhile}} ohne {{while}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ELSE "{{else}} ohne {{if}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDIF "{{endif}} ohne {{if}} oder {{else}}"
|
||||
|
||||
IDS_STENCIL_INVALID_HANDLER "Ung<6E>ltiges Handlertag"
|
||||
IDS_STENCIL_NULLPARAM "NULL-Parameter f<>r ParseReplacements"
|
||||
IDS_STENCIL_INVALIDSTRING "An ParseReplacements wurde eine leere oder negative Zeichenfolge <20>bergeben"
|
||||
IDS_STENCIL_EMBEDDED_NULL "Eingebettetes Nullzeichen in Stencil"
|
||||
IDS_STENCIL_UNMATCHED_TAG_START "Unterschiedlich {{"
|
||||
IDS_STENCIL_MISMATCHED_TAG_START "Nicht <20>bereinstimmend {{"
|
||||
IDS_STENCIL_BAD_PARAMETER "Ung<6E>ltiger Parameter"
|
||||
IDS_STENCIL_METHODNAME_TOO_LONG "Methodenname zu lang"
|
||||
IDS_STENCIL_HANDLERNAME_TOO_LONG "Handlername zu lang"
|
||||
IDS_STENCIL_INVALID_SUBHANDLER "Ung<6E>ltiges Unterhandlertag"
|
||||
IDS_STENCIL_UNRESOLVED_REPLACEMENT "Nicht aufgel<65>ste Ersetzung : '%s'"
|
||||
|
||||
IDS_STENCIL_INCLUDE_ERROR "Die einbezogene Datei konnte nicht ge<67>ffnet werden"
|
||||
IDS_STENCIL_INCLUDE_INVALID "Die einbezogene Datei ist keine Datentr<74>gerdatei"
|
||||
|
||||
IDS_STENCIL_MLANG_COCREATE "CMultiLanguage konnte nicht erstellt werden"
|
||||
IDS_STENCIL_MLANG_LCID "Beim Abfragen der lcid ist ein Fehler aufgetreten"
|
||||
IDS_STENCIL_MLANG_GETLOCALE "GetLocaleInfo fehlgeschlagen"
|
||||
IDS_STENCIL_MLANG_GETCHARSET "GetCharsetInfo fehlgeschlagen"
|
||||
|
||||
IDS_STENCIL_OUTOFMEMORY "Nicht gen<65>gend Speicher verf<72>gbar"
|
||||
IDS_STENCIL_UNEXPECTED "Unerwarteter Fehler"
|
||||
END
|
||||
|
||||
#endif
|
||||
@@ -1,146 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#include <winresrc.h>
|
||||
#include "atlsrvres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ATLSRV_BAD_REQUEST "<html><head><title>Solicitud incorrecta</title></head><body>Solicitud incorrecta</body></html>"
|
||||
IDS_ATLSRV_AUTH_REQUIRED
|
||||
"<html><head><title>Autorizaci<63>n requerida</title></head><body>Se necesita autorizaci<63>n</body></html>"
|
||||
IDS_ATLSRV_FORBIDDEN "<html><head><title>Prohibido</title></head><body>Prohibido</body></html>"
|
||||
IDS_ATLSRV_NOT_FOUND "<html><head><title>No se encontr<74></title></head><body>No se encontr<74></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR "<html><head><title>Error del servidor</title></head><body>Error del servidor</body></html>"
|
||||
IDS_ATLSRV_NOT_IMPLEMENTED
|
||||
"<html><head><title>No implementado</title></head><body>No implementado</body></html>"
|
||||
IDS_ATLSRV_BAD_GATEWAY "<html><head><title>Puerta de enlace no v<>lida</title></head><body>Puerta de enlace no v<>lida</body></html>"
|
||||
IDS_ATLSRV_SERVICE_NOT_AVAILABLE
|
||||
"<html><head><title>Servicio no disponible</title></head><body>Servicio no disponible</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADSRF "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>No se puede cargar el archivo SRF.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HNDLFAIL "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>El archivo SRF solicitado se carg<72> pero no se pudo procesar correctamente.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SYSOBJFAIL "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>No se puede crear un objeto del sistema Windows.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_READFILEFAIL "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>Error en la operaci<63>n de lectura de archivo.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADFILEFAIL "<html><head><title>Error en el servidor</title></head><body><H1>Error en el servidor</H1><P>No se puede abrir el archivo especificado.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADLIB "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>Error de LoadLibrary.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERIF "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>Error al recuperar la interfaz del controlador de solicitudes.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_OUTOFMEM "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>El servidor no tiene suficiente memoria.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_UNEXPECTED "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>El servidor detect<63> un error inesperado.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILPARSEFAIL "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>El servidor detect<63> un error inesperado al intentar analizar el clich<63> solicitado.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILLOADFAIL "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>Error del servidor al cargar el clich<63> solicitado. Es posible que el archivo de clich<63> est<73> da<64>ado o no se encuentre en este servidor Web.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERNOTFOUND "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>No se encontr<74> uno de los controladores nombrado en una etiqueta de controlador para el clich<63> solicitado en el archivo DLL del controlador especificado.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADHANDLERTAG "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>Este clich<63> contiene una etiqueta de controlador que el procesador de clich<63> no puede analizar correctamente o bien no contiene ninguna etiqueta de controlador. Compruebe que la sintaxis del clich<63> solicitado sea correcta.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_NOHANDLERTAG "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>El clich<63> solicitado no contiene una etiqueta de controlador.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGMETHODNAME "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>Se encontr<74> una etiqueta de reemplazo en el clich<63> solicitado con un nombre de reemplazo demasiado largo. La longitud m<>xima del nombre de reemplazo debe ser inferior o igual a la constante ATL_MAX_METHOD_NAME definida en atlstencil.h</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGHANDLERNAME "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>Se encontr<74> una etiqueta de reemplazo que utiliza la sintaxis id.tagname en el clich<63> seleccionado con un nombre de controlador demasiado largo. La longitud m<>xima del nombre del controlador debe ser inferior o igual a la constante ATL_MAX_METHOD_NAME definida en atlstencil.h</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_IMPERSONATIONFAILED "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>Error al intentar identificar al cliente que realiza la solicitud.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_ISAPISTARTUPFAILED "<html><head><title>Error del servidor</title></head><body><H1>Error del servidor</H1><P>Error desconocido de la extensi<73>n ISAPI utilizada para dar servicio a esta solicitud al realizar la carga.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SOAPNOSOAPACTION "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>SOAP request did not provide SOAPACTION header.</body></html>"
|
||||
|
||||
IDS_ATLSRV_CRITICAL_HEAPCREATEFAILED "Error al crear el mont<6E>n de solicitudes"
|
||||
IDS_ATLSRV_CRITICAL_WORKERINITFAILED "Error al inicializar el subproceso de trabajo"
|
||||
IDS_ATLSRV_CRITICAL_CRITSECINITFAILED "Error al inicializar la secci<63>n cr<63>tica"
|
||||
IDS_ATLSRV_CRITICAL_THREADPOOLFAILED "Error al inicializar el grupo de subprocesos"
|
||||
IDS_ATLSRV_CRITICAL_DLLCACHEFAILED "Error al inicializar la cach<63> de archivos DLL"
|
||||
IDS_ATLSRV_CRITICAL_PAGECACHEFAILED "Error al inicializar la cach<63> de p<>ginas"
|
||||
IDS_ATLSRV_CRITICAL_STENCILCACHEFAILED "Error al inicializar la cach<63> de clich<63>s"
|
||||
IDS_ATLSRV_CRITICAL_SESSIONSTATEFAILED "Error al inicializar el servicio de estado de sesi<73>n"
|
||||
IDS_ATLSRV_CRITICAL_BLOBCACHEFAILED "Error al inicializar la cach<63> de objetos binarios"
|
||||
IDS_ATLSRV_CRITICAL_FILECACHEFAILED "Error al inicializar la cach<63> de archivos"
|
||||
|
||||
IDS_PERFMON_CACHE "Servidor ATL:cach<63>"
|
||||
IDS_PERFMON_CACHE_HELP "Informaci<63>n sobre la cach<63> del servidor ATL"
|
||||
IDS_PERFMON_HITCOUNT "Recuento de visitas de cach<63>"
|
||||
IDS_PERFMON_HITCOUNT_HELP "N<>mero de visitas de cach<63>"
|
||||
IDS_PERFMON_MISSCOUNT "Recuento de errores de cach<63>"
|
||||
IDS_PERFMON_MISSCOUNT_HELP "N<>mero de errores de cach<63>"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS "Asignaciones actuales de cach<63>"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS_HELP "Memoria actual asignada a cach<63>"
|
||||
IDS_PERFMON_MAXALLOCATIONS "Asignaciones m<>ximas de cach<63>"
|
||||
IDS_PERFMON_MAXALLOCATIONS_HELP "Memoria m<>xima asignada a cach<63>"
|
||||
IDS_PERFMON_CURRENTENTRIES "Entradas actuales de cach<63>"
|
||||
IDS_PERFMON_CURRENTENTRIES_HELP "N<>mero actual de entradas de cach<63>"
|
||||
IDS_PERFMON_MAXENTRIES "Entradas m<>ximas de cach<63>"
|
||||
IDS_PERFMON_MAXENTRIES_HELP "N<>mero m<>ximo de entradas de cach<63>"
|
||||
IDS_PERFMON_HITCOUNTRATE "Velocidad de recuento de visitas de cach<63>"
|
||||
IDS_PERFMON_HITCOUNTRATE_HELP "N<>mero de recuentos de visitas por segundo"
|
||||
IDS_PERFMON_REQUEST "Servidor ATL:solicitud"
|
||||
IDS_PERFMON_REQUEST_HELP "Estad<61>sticas de las solicitudes que entran en el servidor"
|
||||
IDS_PERFMON_REQUEST_TOTAL "Solicitudes totales del servidor"
|
||||
IDS_PERFMON_REQUEST_TOTAL_HELP "N<>mero total de solicitudes"
|
||||
IDS_PERFMON_REQUEST_FAILED "Solicitudes no procesadas del servidor"
|
||||
IDS_PERFMON_REQUEST_FAILED_HELP "N<>mero de solitudes no procesadas"
|
||||
IDS_PERFMON_REQUEST_RATE "Solicitudes del servidor /seg"
|
||||
IDS_PERFMON_REQUEST_RATE_HELP "N<>mero de solicitudes por segundo"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME "Tiempo medio de respuesta"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME_HELP "Tiempo medio empleado en administrar una solicitud"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING "Solicitudes en cola actuales"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING_HELP "N<>mero actual de solicitudes en espera de administraci<63>n"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING "Solicitudes m<>ximas en cola"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING_HELP "N<>mero m<>ximo de solicitudes en espera de administraci<63>n"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS "Subprocesos activos"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS_HELP "N<>mero de subprocesos que administran solicitudes activamente"
|
||||
END
|
||||
|
||||
|
||||
#ifndef ATL_NO_DEFAULT_STENCIL_RESOURCE
|
||||
dllmgr.srf HTML "res\\dllmgr.srf"
|
||||
stencilmgr.srf HTML "res\\stencilmgr.srf"
|
||||
threadmgr.srf HTML "res\\threadmgr.srf"
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Stencil parse error support
|
||||
//
|
||||
#ifdef ATL_DEBUG_STENCILS
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_STENCIL_ERROR_STENCIL
|
||||
"{{codepage 0}}<h1><font color=#ff0000> Errores al analizar un archivo de clich<63>s:</font></h1>\r\n{{while GetNextError}}<table border=1 width=50%>\r\n<tr><td width=25%>Tipo de error</td><td>{{GetErrorText}}</td></tr>\r\n<tr><td>N<>mero de l<>nea</td><td>{{GetErrorLineNumber}}</td></tr>\r\n<tr><td>Texto del error</td><td><pre>{{GetErrorLine}}</pre></td></tr>\r\n</table>\r\n{{endwhile}}<br>Resultados de clich<63>:\r\n<hr>"
|
||||
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_IF "{{if}} sin {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_ELSE "{{else}} sin {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_WHILE "{{while}} sin {{endwhile}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDWHILE "{{endwhile}} sin {{while}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ELSE "{{else}} sin {{if}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDIF "{{endif}} sin {{if}} o {{else}}"
|
||||
|
||||
IDS_STENCIL_INVALID_HANDLER "Etiqueta de controlador no v<>lida"
|
||||
IDS_STENCIL_NULLPARAM "Par<61>metro NULL para ParseReplacements"
|
||||
IDS_STENCIL_INVALIDSTRING "Se pas<61> una cadena vac<61>a o negativa a ParseReplacements"
|
||||
IDS_STENCIL_EMBEDDED_NULL "Car<61>cter null incrustado en el clich<63>"
|
||||
IDS_STENCIL_UNMATCHED_TAG_START "Las llaves {{ no coinciden"
|
||||
IDS_STENCIL_MISMATCHED_TAG_START "Diferente n<>mero de llaves {{"
|
||||
IDS_STENCIL_BAD_PARAMETER "Par<61>metro err<72>neo"
|
||||
IDS_STENCIL_METHODNAME_TOO_LONG "Nombre de m<>todo demasiado largo"
|
||||
IDS_STENCIL_HANDLERNAME_TOO_LONG "Nombre de controlador demasiado largo"
|
||||
IDS_STENCIL_INVALID_SUBHANDLER "Etiqueta de controlador secundario no v<>lida"
|
||||
IDS_STENCIL_UNRESOLVED_REPLACEMENT "Reemplazo no resuelto: '%s'"
|
||||
|
||||
IDS_STENCIL_INCLUDE_ERROR "No se puede abrir el archivo incluido"
|
||||
IDS_STENCIL_INCLUDE_INVALID "El archivo incluido no es un archivo de disco"
|
||||
|
||||
IDS_STENCIL_MLANG_COCREATE "No se puede crear CMultiLanguage"
|
||||
IDS_STENCIL_MLANG_LCID "Error al obtener el identificador LCID"
|
||||
IDS_STENCIL_MLANG_GETLOCALE "Error en GetLocaleInfo"
|
||||
IDS_STENCIL_MLANG_GETCHARSET "Error en GetCharsetInfo"
|
||||
|
||||
IDS_STENCIL_OUTOFMEMORY "Memoria insuficiente"
|
||||
IDS_STENCIL_UNEXPECTED "Error inesperado"
|
||||
END
|
||||
|
||||
#endif
|
||||
@@ -1,146 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#include <winresrc.h>
|
||||
#include "atlsrvres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ATLSRV_BAD_REQUEST "<html><head><title>Demande incorrecte</title></head><body>Demande incorrecte</body></html>"
|
||||
IDS_ATLSRV_AUTH_REQUIRED
|
||||
"<html><head><title>Autorisation requise</title></head><body>Une autorisation est requise</body></html>"
|
||||
IDS_ATLSRV_FORBIDDEN "<html><head><title>Interdit</title></head><body>Interdit</body></html>"
|
||||
IDS_ATLSRV_NOT_FOUND "<html><head><title>Introuvable</title></head><body>Introuvable</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR "<html><head><title>Erreur serveur</title></head><body>Erreur serveur</body></html>"
|
||||
IDS_ATLSRV_NOT_IMPLEMENTED
|
||||
"<html><head><title>Non impl<70>ment<6E></title></head><body>Non impl<70>ment<6E></body></html>"
|
||||
IDS_ATLSRV_BAD_GATEWAY "<html><head><title>Passerelle incorrecte</title></head><body>Passerelle incorrecte</body></html>"
|
||||
IDS_ATLSRV_SERVICE_NOT_AVAILABLE
|
||||
"<html><head><title>Service non disponible</title></head><body>Service non disponible</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADSRF "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Impossible de charger le fichier SRF.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HNDLFAIL "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Le fichier SRF requis a <20>t<EFBFBD> charg<72> mais n'a pas pu <20>tre trait<69> correctement.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SYSOBJFAIL "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Un objet syst<73>me Windows n'a pas pu <20>tre cr<63><72>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_READFILEFAIL "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Une op<6F>ration de lecture de fichier a <20>chou<6F>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADFILEFAIL "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Le fichier sp<73>cifi<66> n'a pas pu <20>tre ouvert.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADLIB "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P><3E>chec de LoadLibrary.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERIF "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P><3E>chec de la r<>cup<75>ration de l'interface du gestionnaire des demandes.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_OUTOFMEM "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>La m<>moire du serveur est satur<75>e.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_UNEXPECTED "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Le serveur a rencontr<74> une erreur inattendue.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILPARSEFAIL "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Le serveur a rencontr<74> une erreur inattendue lors de l'analyse du stencil requis.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILLOADFAIL "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Le serveur n'a pas pu charger le stencil requis. Le fichier stencil est peut-<2D>tre endommag<61> ou manquant sur ce serveur Web.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERNOTFOUND "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Un gestionnaire sp<73>cifi<66> dans une balise de gestionnaire pour le stencil requis n'a pas pu <20>tre trouv<75> dans le fichier .dll de gestionnaire sp<73>cifi<66>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADHANDLERTAG "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Soit ce stencil contient une balise de gestionnaire qui n'a pas pu <20>tre analys<79>e correctement par le processeur de stencil, soit il ne contient aucune balise de gestionnaire. V<>rifiez la syntaxe correcte <20> utiliser pour le stencil requis.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_NOHANDLERTAG "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Le stencil requis ne contient aucune balise de gestionnaire.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGMETHODNAME "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Le stencil requis contient une balise de remplacement dans laquelle un nom de remplacement est trop long. La longueur maximale du nom de remplacement doit <20>tre inf<6E>rieure ou <20>gale <20> la valeur de la constante ATL_MAX_METHOD_NAME d<>finie dans atlstencil.h</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGHANDLERNAME "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Le stencil requis contient une balise de remplacement, utilisant la syntaxe id.nombalise, dans laquelle un nom de gestionnaire est trop long. La longueur maximale du nom d'un gestionnaire doit <20>tre inf<6E>rieure ou <20>gale <20> la valeur de la constante ATL_MAX_METHOD_NAME d<>finie dans atlstencil.h</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_IMPERSONATIONFAILED "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>Impossible d'emprunter l'identit<69> du client qui a <20>mis la demande.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_ISAPISTARTUPFAILED "<html><head><title>Erreur serveur</title></head><body><H1>Erreur serveur</H1><P>L'extension ISAPI utilis<69>e pour traiter cette demande n'a pas pu <20>tre charg<72>e en raison d'une erreur inconnue.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SOAPNOSOAPACTION "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>SOAP request did not provide SOAPACTION header.</body></html>"
|
||||
|
||||
IDS_ATLSRV_CRITICAL_HEAPCREATEFAILED "<22>chec de la cr<63>ation du segment de m<>moire demand<6E>e"
|
||||
IDS_ATLSRV_CRITICAL_WORKERINITFAILED "<22>chec de l'initialisation de la thread de traitement"
|
||||
IDS_ATLSRV_CRITICAL_CRITSECINITFAILED "<22>chec de l'initialisation de la section critique"
|
||||
IDS_ATLSRV_CRITICAL_THREADPOOLFAILED "<22>chec de l'initialisation du pool de threads"
|
||||
IDS_ATLSRV_CRITICAL_DLLCACHEFAILED "<22>chec de l'initialisation du cache de DLL"
|
||||
IDS_ATLSRV_CRITICAL_PAGECACHEFAILED "<22>chec de l'initialisation du cache de page"
|
||||
IDS_ATLSRV_CRITICAL_STENCILCACHEFAILED "<22>chec de l'initialisation du cache du stencil"
|
||||
IDS_ATLSRV_CRITICAL_SESSIONSTATEFAILED "<22>chec de l'initialisation du service d'<27>tat de session"
|
||||
IDS_ATLSRV_CRITICAL_BLOBCACHEFAILED "<22>chec de l'initialisation du cache BLOB"
|
||||
IDS_ATLSRV_CRITICAL_FILECACHEFAILED "<22>chec de l'initialisation du cache du fichier"
|
||||
|
||||
IDS_PERFMON_CACHE "Serveur ATL : Cache"
|
||||
IDS_PERFMON_CACHE_HELP "Information sur le cache du serveur ATL"
|
||||
IDS_PERFMON_HITCOUNT "Acc<63>s cache avec r<>sultat"
|
||||
IDS_PERFMON_HITCOUNT_HELP "Nombre des acc<63>s cache avec r<>sultat"
|
||||
IDS_PERFMON_MISSCOUNT "Acc<63>s cache sans r<>sultat"
|
||||
IDS_PERFMON_MISSCOUNT_HELP "Nombre des acc<63>s cache sans r<>sultat"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS "Allocations cache actuelles"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS_HELP "M<>moire actuellement allou<6F>e au cache"
|
||||
IDS_PERFMON_MAXALLOCATIONS "Allocations cache maximales"
|
||||
IDS_PERFMON_MAXALLOCATIONS_HELP "M<>moire maximale allou<6F>e au cache"
|
||||
IDS_PERFMON_CURRENTENTRIES "Entr<74>es cache actuelles"
|
||||
IDS_PERFMON_CURRENTENTRIES_HELP "Nombre actuel d'entr<74>es du cache"
|
||||
IDS_PERFMON_MAXENTRIES "Entr<74>es cache maximales"
|
||||
IDS_PERFMON_MAXENTRIES_HELP "Nombre maximal d'entr<74>es du cache"
|
||||
IDS_PERFMON_HITCOUNTRATE "Taux d'acc<63>s au cache"
|
||||
IDS_PERFMON_HITCOUNTRATE_HELP "Nombre d'acc<63>s par seconde"
|
||||
IDS_PERFMON_REQUEST "Serveur ATL : Demande"
|
||||
IDS_PERFMON_REQUEST_HELP "Statistiques sur les demandes serveur entrantes"
|
||||
IDS_PERFMON_REQUEST_TOTAL "Total des demandes serveur"
|
||||
IDS_PERFMON_REQUEST_TOTAL_HELP "Nombre total des demandes"
|
||||
IDS_PERFMON_REQUEST_FAILED "Demandes serveur <20>chou<6F>es"
|
||||
IDS_PERFMON_REQUEST_FAILED_HELP "Nombre de demandes ayant <20>chou<6F>"
|
||||
IDS_PERFMON_REQUEST_RATE "Demandes serveur/s"
|
||||
IDS_PERFMON_REQUEST_RATE_HELP "Nombre de demandes par seconde"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME "Temps de r<>ponse moyen"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME_HELP "Dur<75>e moyenne du traitement d'une demande"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING "Demandes actuelles en attente"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING_HELP "Nombre de demandes actuellement en attente d'<27>tre trait<69>es"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING "Demandes maximales en attente"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING_HELP "Nombre maximal de demandes en attente d'<27>tre trait<69>es"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS "Threads actives"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS_HELP "Nombre de threads qui traitent activement des demandes"
|
||||
END
|
||||
|
||||
|
||||
#ifndef ATL_NO_DEFAULT_STENCIL_RESOURCE
|
||||
dllmgr.srf HTML "res\\dllmgr.srf"
|
||||
stencilmgr.srf HTML "res\\stencilmgr.srf"
|
||||
threadmgr.srf HTML "res\\threadmgr.srf"
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Stencil parse error support
|
||||
//
|
||||
#ifdef ATL_DEBUG_STENCILS
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_STENCIL_ERROR_STENCIL
|
||||
"{{codepage 0}}<h1><font color=#ff0000> Lors de la tentative d'analyse d'un fichier stencil, les erreurs suivantes se sont produites :</font></h1>\r\n{{while GetNextError}}<table border=1 width=50%>\r\n<tr><td width=25%>Type d'erreur</td><td>{{GetErrorText}}</td></tr>\r\n<tr><td>Num<75>ro de ligne</td><td>{{GetErrorLineNumber}}</td></tr>\r\n<tr><td>Texte de l'erreur</td><td><pre>{{GetErrorLine}}</pre></td></tr>\r\n</table>\r\n{{endwhile}}<br>La sortie du stencil est la suivante :\r\n<hr>"
|
||||
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_IF "{{if}} sans {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_ELSE "{{else}} sans {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_WHILE "{{while}} sans {{endwhile}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDWHILE "{{endwhile}} sans {{while}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ELSE "{{else}} sans {{if}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDIF "{{endif}} sans {{if}} ou {{else}}"
|
||||
|
||||
IDS_STENCIL_INVALID_HANDLER "Balise de gestionnaire non valide"
|
||||
IDS_STENCIL_NULLPARAM "Param<61>tre NULL <20> ParseReplacements"
|
||||
IDS_STENCIL_INVALIDSTRING "Cha<68>ne vide ou n<>gative pass<73>e <20> ParseReplacements"
|
||||
IDS_STENCIL_EMBEDDED_NULL "Caract<63>re null incorpor<6F> dans le stencil"
|
||||
IDS_STENCIL_UNMATCHED_TAG_START "{{ non appari<72>"
|
||||
IDS_STENCIL_MISMATCHED_TAG_START "{{ incompatible"
|
||||
IDS_STENCIL_BAD_PARAMETER "Param<61>tre incorrect"
|
||||
IDS_STENCIL_METHODNAME_TOO_LONG "Nom de m<>thode trop long"
|
||||
IDS_STENCIL_HANDLERNAME_TOO_LONG "Nom de gestionnaire trop long"
|
||||
IDS_STENCIL_INVALID_SUBHANDLER "Balise de sous-gestionnaire non valide"
|
||||
IDS_STENCIL_UNRESOLVED_REPLACEMENT "Remplacement non r<>solu : '%s'"
|
||||
|
||||
IDS_STENCIL_INCLUDE_ERROR "Impossible d'ouvrir le fichier inclus"
|
||||
IDS_STENCIL_INCLUDE_INVALID "Le fichier inclus n'est pas un fichier disque"
|
||||
|
||||
IDS_STENCIL_MLANG_COCREATE "Impossible de cr<63>er CMultiLanguage"
|
||||
IDS_STENCIL_MLANG_LCID "Erreur lors de l'obtention du lcid"
|
||||
IDS_STENCIL_MLANG_GETLOCALE "<22>chec de GetLocaleInfo"
|
||||
IDS_STENCIL_MLANG_GETCHARSET "<22>chec de GetCharsetInfo"
|
||||
|
||||
IDS_STENCIL_OUTOFMEMORY "M<>moire insuffisante"
|
||||
IDS_STENCIL_UNEXPECTED "Erreur inattendue"
|
||||
END
|
||||
|
||||
#endif
|
||||
@@ -1,146 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#include <winresrc.h>
|
||||
#include "atlsrvres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ATLSRV_BAD_REQUEST "<html><head><title>Richiesta non valida</title></head><body>Richiesta non valida</body></html>"
|
||||
IDS_ATLSRV_AUTH_REQUIRED
|
||||
"<html><head><title>Autorizzazione richiesta</title></head><body>Autorizzazione richiesta</body></html>"
|
||||
IDS_ATLSRV_FORBIDDEN "<html><head><title>Non consentito</title></head><body>Non consentito</body></html>"
|
||||
IDS_ATLSRV_NOT_FOUND "<html><head><title>Non trovato</title></head><body>Non trovato</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR "<html><head><title>Errore del server</title></head><body>Errore del server</body></html>"
|
||||
IDS_ATLSRV_NOT_IMPLEMENTED
|
||||
"<html><head><title>Non implementato</title></head><body>Non implementato</body></html>"
|
||||
IDS_ATLSRV_BAD_GATEWAY "<html><head><title>Gateway non valido</title></head><body>Gateway non valido</body></html>"
|
||||
IDS_ATLSRV_SERVICE_NOT_AVAILABLE
|
||||
"<html><head><title>Servizio non disponibile</title></head><body>Servizio non disponibile</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADSRF "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Impossibile caricare il file SRF.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HNDLFAIL "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Il file SRF richiesto <20> stato caricato ma non elaborato correttamente.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SYSOBJFAIL "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Impossibile creare un oggetto di sistema Windows.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_READFILEFAIL "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Operazione di lettura file non riuscita.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADFILEFAIL "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Impossibile aprire il file specificato.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADLIB "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>LoadLibrary non riuscito.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERIF "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Impossibile recuperare l'interfaccia del gestore delle richieste.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_OUTOFMEM "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Memoria del server esaurita.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_UNEXPECTED "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Errore imprevisto del server.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILPARSEFAIL "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Errore imprevisto del server durante il tentativo di analizzare il file SRF richiesto.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILLOADFAIL "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Impossibile caricare il file SRF richiesto. Il file potrebbe essere danneggiato o mancante sul server Web.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERNOTFOUND "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Impossibile trovare nella DLL del gestore specificata uno dei gestori denominati in un tag di gestione per il file SRF richiesto.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADHANDLERTAG "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Questo file SRF contiene un tag di gestione che non pu<70> essere analizzato correttamente dal processore dei file SRF o non contiene affatto un tag di gestione. Cercare nel file SRF richiesto la sintassi appropriata.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_NOHANDLERTAG "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Il file SRF richiesto non contiene un tag di gestione.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGMETHODNAME "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Rilevato un tag di sostituzione nel file SRF richiesto con un nome di sostituzione troppo lungo. Il nome di sostituzione deve contenere un numero di caratteri inferiore o uguale alla costante ATL_MAX_METHOD_NAME definita in atlstencil.h</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGHANDLERNAME "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Rilevato nel file SRF richiesto un tag di sostituzione che utilizza la sintassi id.tagname con un nome di gestore troppo lungo. Un nome di gestore deve contenere un numero di caratteri inferiore o uguale alla costante ATL_MAX_METHOD_NAME definita in atlstencil.h</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_IMPERSONATIONFAILED "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>Tentativo di rappresentare il client eseguendo la richiesta non riuscito.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_ISAPISTARTUPFAILED "<html><head><title>Errore del server</title></head><body><H1>Errore del server</H1><P>L'estensione ISAPI utilizzata per soddisfare questa richiesta non <20> riuscita a eseguire il caricamento correttamente. Errore sconosciuto.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SOAPNOSOAPACTION "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>SOAP request did not provide SOAPACTION header.</body></html>"
|
||||
|
||||
IDS_ATLSRV_CRITICAL_HEAPCREATEFAILED "Creazione heap richiesta non riuscita"
|
||||
IDS_ATLSRV_CRITICAL_WORKERINITFAILED "Inizializzazione thread di lavoro non riuscita"
|
||||
IDS_ATLSRV_CRITICAL_CRITSECINITFAILED "Inizializzazione sezione critica non riuscita"
|
||||
IDS_ATLSRV_CRITICAL_THREADPOOLFAILED "Inizializzazione pool di thread non riuscita"
|
||||
IDS_ATLSRV_CRITICAL_DLLCACHEFAILED "Inizializzazione cache DLL non riuscita"
|
||||
IDS_ATLSRV_CRITICAL_PAGECACHEFAILED "Inizializzazione cache pagina non riuscita"
|
||||
IDS_ATLSRV_CRITICAL_STENCILCACHEFAILED "Inizializzazione cache file SRF non riuscita"
|
||||
IDS_ATLSRV_CRITICAL_SESSIONSTATEFAILED "Inizializzazione servizio di stato sessione non riuscita"
|
||||
IDS_ATLSRV_CRITICAL_BLOBCACHEFAILED "Inizializzazione cache dati BLOB non riuscita"
|
||||
IDS_ATLSRV_CRITICAL_FILECACHEFAILED "Inizializzazione cache file non riuscita"
|
||||
|
||||
IDS_PERFMON_CACHE "Server ATL:Cache"
|
||||
IDS_PERFMON_CACHE_HELP "Informazioni sulla cache del server ATL"
|
||||
IDS_PERFMON_HITCOUNT "Passaggi cache"
|
||||
IDS_PERFMON_HITCOUNT_HELP "Numero di riscontri cache"
|
||||
IDS_PERFMON_MISSCOUNT "Conteggio mancati riscontri cache"
|
||||
IDS_PERFMON_MISSCOUNT_HELP "Numero di mancati riscontri cache"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS "Allocazioni correnti cache"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS_HELP "Memoria corrente allocata per la cache"
|
||||
IDS_PERFMON_MAXALLOCATIONS "Numero massimo allocazioni cache"
|
||||
IDS_PERFMON_MAXALLOCATIONS_HELP "Quantit<69> massima di memoria allocata per la cache"
|
||||
IDS_PERFMON_CURRENTENTRIES "Voci correnti cache"
|
||||
IDS_PERFMON_CURRENTENTRIES_HELP "Numero corrente di voci della cache"
|
||||
IDS_PERFMON_MAXENTRIES "Numero massimo voci cache"
|
||||
IDS_PERFMON_MAXENTRIES_HELP "Numero massimo di voci della cache"
|
||||
IDS_PERFMON_HITCOUNTRATE "Frequenza passaggi cache"
|
||||
IDS_PERFMON_HITCOUNTRATE_HELP "Numero di passaggi al secondo"
|
||||
IDS_PERFMON_REQUEST "Server ATL:Richiesta"
|
||||
IDS_PERFMON_REQUEST_HELP "Statistica sulle richieste pervenute al server"
|
||||
IDS_PERFMON_REQUEST_TOTAL "Richieste totali al server"
|
||||
IDS_PERFMON_REQUEST_TOTAL_HELP "Numero totale di richieste"
|
||||
IDS_PERFMON_REQUEST_FAILED "Richieste al server non riuscite"
|
||||
IDS_PERFMON_REQUEST_FAILED_HELP "Numero di richieste non riuscite"
|
||||
IDS_PERFMON_REQUEST_RATE "Richieste al server /sec"
|
||||
IDS_PERFMON_REQUEST_RATE_HELP "Numero di richieste al secondo"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME "Tempo medio di risposta"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME_HELP "Tempo medio impiegato per la gestione di una richiesta"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING "Richieste correnti in coda"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING_HELP "Numero corrente di richieste in attesa di essere gestite"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING "Numero massimo di richieste in coda"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING_HELP "Numero massimo di richieste in attesa di essere gestite"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS "Thread attivi"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS_HELP "Numero di thread che gestiscono attivamente le richieste"
|
||||
END
|
||||
|
||||
|
||||
#ifndef ATL_NO_DEFAULT_STENCIL_RESOURCE
|
||||
dllmgr.srf HTML "res\\dllmgr.srf"
|
||||
stencilmgr.srf HTML "res\\stencilmgr.srf"
|
||||
threadmgr.srf HTML "res\\threadmgr.srf"
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Stencil parse error support
|
||||
//
|
||||
#ifdef ATL_DEBUG_STENCILS
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_STENCIL_ERROR_STENCIL
|
||||
"{{codepage 0}}<h1><font color=#ff0000> Durante l'analisi di un file SRF, si <20> verificato il seguente errore:</font></h1>\r\n{{while GetNextError}}<table border=1 width=50%>\r\n<tr><td width=25%>Tipo di errore</td><td>{{GetErrorText}}</td></tr>\r\n<tr><td>Numero della riga</td><td>{{GetErrorLineNumber}}</td></tr>\r\n<tr><td>Testo dell'errore</td><td><pre>{{GetErrorLine}}</pre></td></tr>\r\n</table>\r\n{{endwhile}}<br>Output file SRF:\r\n<hr>"
|
||||
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_IF "{{if}} senza {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_ELSE "{{else}} senza {{endif}}"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_WHILE "{{while}} senza {{endwhile}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDWHILE "{{endwhile}} senza {{while}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ELSE "{{else}} senza {{if}}"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDIF "{{endif}} senza {{if}} o {{else}}"
|
||||
|
||||
IDS_STENCIL_INVALID_HANDLER "Tag di gestione non valido"
|
||||
IDS_STENCIL_NULLPARAM "Parametro NULL in ParseReplacements"
|
||||
IDS_STENCIL_INVALIDSTRING "Stringa vuota o negativa passata a ParseReplacements"
|
||||
IDS_STENCIL_EMBEDDED_NULL "Carattere null incorporato in file SRF"
|
||||
IDS_STENCIL_UNMATCHED_TAG_START "{{ non corrispondenti"
|
||||
IDS_STENCIL_MISMATCHED_TAG_START "{{ non corrispondenti"
|
||||
IDS_STENCIL_BAD_PARAMETER "Parametro non valido"
|
||||
IDS_STENCIL_METHODNAME_TOO_LONG "Nome metodo troppo lungo"
|
||||
IDS_STENCIL_HANDLERNAME_TOO_LONG "Nome gestore troppo lungo"
|
||||
IDS_STENCIL_INVALID_SUBHANDLER "Tag di gestione secondaria non valida"
|
||||
IDS_STENCIL_UNRESOLVED_REPLACEMENT "Sostituzione non risolta: '%s'"
|
||||
|
||||
IDS_STENCIL_INCLUDE_ERROR "Impossibile aprire il file incluso"
|
||||
IDS_STENCIL_INCLUDE_INVALID "Il file incluso non <20> un file su disco"
|
||||
|
||||
IDS_STENCIL_MLANG_COCREATE "Impossibile creare CMultiLanguage"
|
||||
IDS_STENCIL_MLANG_LCID "Errore durante la ricerca di lcid"
|
||||
IDS_STENCIL_MLANG_GETLOCALE "GetLocaleInfo non riuscito"
|
||||
IDS_STENCIL_MLANG_GETCHARSET "GetCharsetInfo non riuscito"
|
||||
|
||||
IDS_STENCIL_OUTOFMEMORY "Memoria insufficiente"
|
||||
IDS_STENCIL_UNEXPECTED "Errore imprevisto"
|
||||
END
|
||||
|
||||
#endif
|
||||
@@ -1,146 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#include <winresrc.h>
|
||||
#include "atlsrvres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ATLSRV_BAD_REQUEST "<html><head><title><3E>s<EFBFBD>K<EFBFBD>ȗv<C897><76></title></head><body><3E>s<EFBFBD>K<EFBFBD>ȗv<C897><76></body></html>"
|
||||
IDS_ATLSRV_AUTH_REQUIRED
|
||||
"<html><head><title><3E>F<EFBFBD><EFBFBD><D882>K<EFBFBD>v<EFBFBD>ł<EFBFBD></title></head><body><3E>F<EFBFBD><EFBFBD><D882>K<EFBFBD>v<EFBFBD>ł<EFBFBD></body></html>"
|
||||
IDS_ATLSRV_FORBIDDEN "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD>/title></head><body><3E><><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD></body></html>"
|
||||
IDS_ATLSRV_NOT_FOUND "<html><head><title><3E><><EFBFBD><EFBFBD><C282><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD></title></head><body><3E><><EFBFBD><EFBFBD><C282><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</body></html>"
|
||||
IDS_ATLSRV_NOT_IMPLEMENTED
|
||||
"<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82><EFBFBD></title></head><body><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_BAD_GATEWAY "<html><head><title><3E>s<EFBFBD>K<EFBFBD>ȃQ<C883>[<5B>g<EFBFBD>E<EFBFBD>F<EFBFBD>C</title></head><body><3E>s<EFBFBD>K<EFBFBD>ȃQ<C883>[<5B>g<EFBFBD>E<EFBFBD>F<EFBFBD>C</body></html>"
|
||||
IDS_ATLSRV_SERVICE_NOT_AVAILABLE
|
||||
"<html><head><title><3E>T<EFBFBD>[<5B>r<EFBFBD>X<EFBFBD><58><EFBFBD>g<EFBFBD>p<EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD></title></head><body><3E>T<EFBFBD>[<5B>r<EFBFBD>X<EFBFBD><58><EFBFBD>g<EFBFBD>p<EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADSRF "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1>Server Error</H1><P>SRF <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>ǂݍ<C782><DD8D>߂܂<DF82><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HNDLFAIL "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>ꂽ SRF <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>͓ǂݍ<C782><DD8D>߂܂<DF82><DC82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>Ƀv<C983><76><EFBFBD>Z<EFBFBD>X<EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SYSOBJFAIL "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P>Windows <20>V<EFBFBD>X<EFBFBD>e<EFBFBD><65> <20>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD>쐬<EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_READFILEFAIL "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>̓ǂݎ<C782><DD8E>葀<EFBFBD>삪<EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADFILEFAIL "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E>w<EFBFBD>肳<EFBFBD>ꂽ<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD><4A><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADLIB "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P>LoadLibrary <20><><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><73><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERIF "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E>n<EFBFBD><6E><EFBFBD>h<EFBFBD><68><EFBFBD>v<EFBFBD><76> <20>C<EFBFBD><43><EFBFBD>^<5E>[<5B>t<EFBFBD>F<EFBFBD>C<EFBFBD>X<EFBFBD><58><EFBFBD>擾<EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_OUTOFMEM "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E>T<EFBFBD>[<5B>o<EFBFBD>[<5B>̃<EFBFBD><CC83><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><73><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_UNEXPECTED "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E>T<EFBFBD>[<5B>o<EFBFBD>[<5B>ɗ\<5C><><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>G<EFBFBD><47><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILPARSEFAIL "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>ꂽ<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͒<EFBFBD><CD92>ɁA<C981>T<EFBFBD>[<5B>o<EFBFBD>[<5B>ɗ\<5C><><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>G<EFBFBD><47><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILLOADFAIL "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>͗v<CD97><76><EFBFBD><EFBFBD><EFBFBD>ꂽ<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>ǂݍ<C782><DD8D>߂܂<DF82><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56> <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>邩<EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD> Web <20>T<EFBFBD>[<5B>o<EFBFBD>[<5B>ɂȂ<C982><C882>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERNOTFOUND "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>ꂽ<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56><EFBFBD>̃n<CC83><6E><EFBFBD>h<EFBFBD><68> <20>^<5E>O<EFBFBD>Ŗ<EFBFBD><C596>O<EFBFBD>w<EFBFBD>肳<EFBFBD>ꂽ<EFBFBD>n<EFBFBD><6E><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD> 1 <20><EFBFBD><C282>w<EFBFBD>肳<EFBFBD>ꂽ<EFBFBD>n<EFBFBD><6E><EFBFBD>h<EFBFBD><68> .dll <20>Ɍ<EFBFBD><C98C><EFBFBD><C282><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADHANDLERTAG "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E><><EFBFBD>̃X<CC83>e<EFBFBD><65><EFBFBD>V<EFBFBD><56><EFBFBD>́A<CD81>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56> <20>v<EFBFBD><76><EFBFBD>Z<EFBFBD>b<EFBFBD>T<EFBFBD>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>ēK<C493>ɉ<D882><C989>͂ł<CD82><C582>Ȃ<EFBFBD><C882>n<EFBFBD><6E><EFBFBD>h<EFBFBD><68> <20>^<5E>O<EFBFBD><4F><EFBFBD>܂<EFBFBD><DC82>ł<EFBFBD><C582>邩<EFBFBD>A<EFBFBD>܂<EFBFBD><DC82>̓n<CD83><6E><EFBFBD>h<EFBFBD><68> <20>^<5E>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B<EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56><EFBFBD>̃X<CC83>e<EFBFBD><65><EFBFBD>V<EFBFBD><56><EFBFBD>\<5C><><EFBFBD><EFBFBD><EFBFBD>K<EFBFBD>ł<D882><C582>邩<EFBFBD>ǂ<EFBFBD><C782><EFBFBD><EFBFBD>m<EFBFBD><6D><EFBFBD>ׂĂ<D782><C482><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_NOHANDLERTAG "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>ꂽ<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56><EFBFBD>̓n<CD83><6E><EFBFBD>h<EFBFBD><68> <20>^<5E>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGMETHODNAME "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>ꂽ<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56><EFBFBD>Œu<C592><75><EFBFBD>^<5E>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><C282><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD>̍ő<CC8D><C591><EFBFBD><EFBFBD>̒<EFBFBD><CC92><EFBFBD><EFBFBD>́Aatlstencil.h <20>Œ<EFBFBD><C592>`<60><><EFBFBD>ꂽ ATL_MAX_METHOD_NAME <20>萔 <20>Ɠ<EFBFBD><C693><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Z<EFBFBD><5A><EFBFBD>Ȃ<EFBFBD><C882>Ă͂Ȃ<CD82><C882>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGHANDLERNAME "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P>ID.tagname <20>\<5C><><EFBFBD><EFBFBD><EFBFBD>g<EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD>u<EFBFBD><75><EFBFBD>^<5E>O<EFBFBD><4F><EFBFBD>A<EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>ꂽ<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56><EFBFBD>Ō<EFBFBD><C58C><EFBFBD><C282><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><41><EFBFBD>̃^<5E>O<EFBFBD>̃n<CC83><6E><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD>͒<EFBFBD><CD92><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>n<EFBFBD><6E><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD>̍ő<CC8D><C591><EFBFBD><EFBFBD>̒<EFBFBD><CC92><EFBFBD><EFBFBD>́Aatlstencil.h <20>Œ<EFBFBD><C592>`<60><><EFBFBD>ꂽ ATL_MAX_METHOD_NAME <20>萔<EFBFBD>Ɠ<EFBFBD><C693><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Z<EFBFBD><5A><EFBFBD>Ȃ<EFBFBD><C882>Ă͂Ȃ<CD82><C882>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_IMPERSONATIONFAILED "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>An attempt to impersonate the client making the request failed.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_ISAPISTARTUPFAILED "<html><head><title><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</title></head><body><H1><3E>T<EFBFBD>[<5B>o<EFBFBD>[ <20>G<EFBFBD><47><EFBFBD>[</H1><P><3E><><EFBFBD>̗v<CC97><76><EFBFBD>ɓ<EFBFBD><C993><EFBFBD><EFBFBD>邽<EFBFBD>߂Ɏg<C98E>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ISAPI <20>g<EFBFBD><67><EFBFBD>q<EFBFBD>́A<CD81>\<5C><><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>G<EFBFBD><47><EFBFBD>[<5B>̂<EFBFBD><CC82>ߐ<EFBFBD><DF90><EFBFBD><EFBFBD>ɓǂݍ<C782><DD8D>݂<EFBFBD><DD82>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SOAPNOSOAPACTION "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>SOAP request did not provide SOAPACTION header.</body></html>"
|
||||
|
||||
IDS_ATLSRV_CRITICAL_HEAPCREATEFAILED "<22>q<EFBFBD>[<5B>v<EFBFBD>̍쐬<CC8D>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B"
|
||||
IDS_ATLSRV_CRITICAL_WORKERINITFAILED "<22><><EFBFBD>[<5B>J<EFBFBD>[ <20>X<EFBFBD><58><EFBFBD>b<EFBFBD>h<EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B"
|
||||
IDS_ATLSRV_CRITICAL_CRITSECINITFAILED "<22>N<EFBFBD><4E><EFBFBD>e<EFBFBD>B<EFBFBD>J<EFBFBD><4A><EFBFBD>ȃZ<C883>N<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B"
|
||||
IDS_ATLSRV_CRITICAL_THREADPOOLFAILED "<22>X<EFBFBD><58><EFBFBD>b<EFBFBD>h <20>v<EFBFBD>[<5B><><EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B"
|
||||
IDS_ATLSRV_CRITICAL_DLLCACHEFAILED "DLL <20>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B"
|
||||
IDS_ATLSRV_CRITICAL_PAGECACHEFAILED "<22>y<EFBFBD>[<5B>W <20>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B"
|
||||
IDS_ATLSRV_CRITICAL_STENCILCACHEFAILED "<22>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56> <20>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B"
|
||||
IDS_ATLSRV_CRITICAL_SESSIONSTATEFAILED "<22>Z<EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԃT<D483>[<5B>r<EFBFBD>X<EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B"
|
||||
IDS_ATLSRV_CRITICAL_BLOBCACHEFAILED "Blob <20>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B"
|
||||
IDS_ATLSRV_CRITICAL_FILECACHEFAILED "<22>t<EFBFBD>@<40>C<EFBFBD><43> <20>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B"
|
||||
|
||||
IDS_PERFMON_CACHE "ATL <20>T<EFBFBD>[<5B>o<EFBFBD>[ : <20>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56>"
|
||||
IDS_PERFMON_CACHE_HELP "ATL <20>T<EFBFBD>[<5B>o<EFBFBD>[ <20>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̏<EFBFBD><CC8F><EFBFBD>"
|
||||
IDS_PERFMON_HITCOUNT "<22>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̃q<CC83>b<EFBFBD>g <20>J<EFBFBD>E<EFBFBD><45><EFBFBD>g"
|
||||
IDS_PERFMON_HITCOUNT_HELP "<22>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56> <20>q<EFBFBD>b<EFBFBD>g<EFBFBD>̉<EFBFBD><CC89><EFBFBD>"
|
||||
IDS_PERFMON_MISSCOUNT "<22>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̃~<7E>X <20>J<EFBFBD>E<EFBFBD><45><EFBFBD>g"
|
||||
IDS_PERFMON_MISSCOUNT_HELP "<22>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̃~<7E>X <20>J<EFBFBD>E<EFBFBD><45><EFBFBD>g<EFBFBD>̉<EFBFBD><CC89><EFBFBD>"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS "<22>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̌<EFBFBD><CC8C>݂̊<DD82><CC8A>蓖<EFBFBD><E89396>"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS_HELP "<22>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>Ɍ<EFBFBD><C98C>݊<EFBFBD><DD8A>蓖<EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>Ă<EFBFBD><C482>郁<EFBFBD><E98381><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_MAXALLOCATIONS "<22>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̍ő<CC8D><C591>̊<EFBFBD><CC8A>蓖<EFBFBD><E89396>"
|
||||
IDS_PERFMON_MAXALLOCATIONS_HELP "<22>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>Ɋ<EFBFBD><C98A>蓖<EFBFBD>Ă<EFBFBD><C482>ꂽ<EFBFBD>ő僁<C591><E58381><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_CURRENTENTRIES "<22><><EFBFBD>݂̃L<CC83><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56> <20>G<EFBFBD><47><EFBFBD>g<EFBFBD><67>"
|
||||
IDS_PERFMON_CURRENTENTRIES_HELP "<22><><EFBFBD>݂̃L<CC83><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56> <20>G<EFBFBD><47><EFBFBD>g<EFBFBD><67><EFBFBD>̐<EFBFBD>"
|
||||
IDS_PERFMON_MAXENTRIES "<22>ő<EFBFBD><C591>̃L<CC83><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56> <20>G<EFBFBD><47><EFBFBD>g<EFBFBD><67>"
|
||||
IDS_PERFMON_MAXENTRIES_HELP "<22>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56> <20>G<EFBFBD><47><EFBFBD>g<EFBFBD><67><EFBFBD>̍ő吔"
|
||||
IDS_PERFMON_HITCOUNTRATE "<22>L<EFBFBD><4C><EFBFBD>b<EFBFBD>V<EFBFBD><56><EFBFBD>̃q<CC83>b<EFBFBD>g <20>J<EFBFBD>E<EFBFBD><45><EFBFBD>g<EFBFBD><67>"
|
||||
IDS_PERFMON_HITCOUNTRATE_HELP "<22><><EFBFBD>b<EFBFBD>̃q<CC83>b<EFBFBD>g <20>J<EFBFBD>E<EFBFBD><45><EFBFBD>g<EFBFBD><67>"
|
||||
IDS_PERFMON_REQUEST "ATL <20>T<EFBFBD>[<5B>o<EFBFBD>[ : <20>v<EFBFBD><76>"
|
||||
IDS_PERFMON_REQUEST_HELP "<22>T<EFBFBD>[<5B>o<EFBFBD>[<5B>ɓ<EFBFBD><C993><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>v<EFBFBD><76><EFBFBD>̓<EFBFBD><CC93>v"
|
||||
IDS_PERFMON_REQUEST_TOTAL "<22>T<EFBFBD>[<5B>o<EFBFBD>[<5B>v<EFBFBD><76><EFBFBD>̑<EFBFBD><CC91><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_TOTAL_HELP "<22>v<EFBFBD><76><EFBFBD>̑<EFBFBD><CC91><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_FAILED "<22>T<EFBFBD>[<5B>o<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v<EFBFBD><76> "
|
||||
IDS_PERFMON_REQUEST_FAILED_HELP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_RATE "<22>T<EFBFBD>[<5B>o<EFBFBD>[<5B>v<EFBFBD><76> /sec"
|
||||
IDS_PERFMON_REQUEST_RATE_HELP "<22><><EFBFBD>b<EFBFBD>̗v<CC97><76><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME "<22><><EFBFBD>ς̉<CF82><CC89>Ύ<EFBFBD><CE8E><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME_HELP "<22>v<EFBFBD><76><EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ώ<EFBFBD><CF8E><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING "<22><><EFBFBD>݃L<DD83><4C><EFBFBD>[<5B>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>v<EFBFBD><76>"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING_HELP "<22><><EFBFBD>݉<EFBFBD><DD89><EFBFBD><CE82>҂<EFBFBD><D282>Ă<EFBFBD><C482><EFBFBD><EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING "<22>L<EFBFBD><4C><EFBFBD>[<5B>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>v<EFBFBD><76><EFBFBD>̍ő吔"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING_HELP "<22><><EFBFBD><EFBFBD><CE82>҂<EFBFBD><D282>Ă<EFBFBD><C482><EFBFBD><EFBFBD>v<EFBFBD><76><EFBFBD>̍ő吔"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS "<22>A<EFBFBD>N<EFBFBD>e<EFBFBD>B<EFBFBD>u <20>X<EFBFBD><58><EFBFBD>b<EFBFBD>h"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS_HELP "<22>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݏ<EFBFBD><DD8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̃X<CC83><58><EFBFBD>b<EFBFBD>h<EFBFBD><68>"
|
||||
END
|
||||
|
||||
|
||||
#ifndef ATL_NO_DEFAULT_STENCIL_RESOURCE
|
||||
dllmgr.srf HTML "res\\dllmgr.srf"
|
||||
stencilmgr.srf HTML "res\\stencilmgr.srf"
|
||||
threadmgr.srf HTML "res\\threadmgr.srf"
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Stencil parse error support
|
||||
//
|
||||
#ifdef ATL_DEBUG_STENCILS
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_STENCIL_ERROR_STENCIL
|
||||
"{{codepage 0}}<h1><font color=#ff0000> <20>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56> <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͒<EFBFBD><CD92>Ɏ<EFBFBD><C98E>̃G<CC83><47><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD> :</font></h1>\r\n{{while GetNextError}}<table border=1 width=50%>\r\n<tr><td width=25%><3E>G<EFBFBD><47><EFBFBD>[<5B>̎<EFBFBD><CC8E><EFBFBD></td><td>{{GetErrorText}}</td></tr>\r\n<tr><td><3E>s<EFBFBD>i<EFBFBD><69><EFBFBD>o</td><td>{{GetErrorLineNumber}}</td></tr>\r\n<tr><td><3E>G<EFBFBD><47><EFBFBD>[ <20>e<EFBFBD>L<EFBFBD>X<EFBFBD>g</td><td><pre>{{GetErrorLine}}</pre></td></tr>\r\n</table>\r\n{{endwhile}}<br><3E>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56><EFBFBD>o<EFBFBD>͎͂<CD82><CD8E>̂悤<CC82>ɂȂ<C982><C882>Ă<EFBFBD><C482>܂<EFBFBD> :\r\n<hr>"
|
||||
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_IF "{{if}} <20><> {{endif}} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD>"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_ELSE "{{else}} <20><> {{endif}} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD>"
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_WHILE "{{while}} <20><> {{endwhile}} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD>"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDWHILE "{{endwhile}} <20><> {{while}} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD>"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ELSE "{{else}} <20><> {{if}} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD>"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDIF "{{endif}} <20><> {{if}} or {{else}} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD>"
|
||||
|
||||
IDS_STENCIL_INVALID_HANDLER "<22><><EFBFBD><EFBFBD><EFBFBD>ȃn<C883><6E><EFBFBD>h<EFBFBD><68> <20>^<5E>O"
|
||||
IDS_STENCIL_NULLPARAM "ParseReplacements <20>ւ<EFBFBD> NULL <20>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD>[<5B>^"
|
||||
IDS_STENCIL_INVALIDSTRING "ParseReplacements <20>ɋ<EFBFBD><C98B>A<EFBFBD>܂<EFBFBD><DC82>͕<EFBFBD><CD95>̕<EFBFBD><CC95><EFBFBD><EFBFBD>n<F182AA93><6E><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD>"
|
||||
IDS_STENCIL_EMBEDDED_NULL "<22>X<EFBFBD>e<EFBFBD><65><EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD> <20><><EFBFBD>ߍ<EFBFBD><DF8D>݂<EFBFBD> null <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD>"
|
||||
IDS_STENCIL_UNMATCHED_TAG_START "<22><><EFBFBD>v<EFBFBD><76><EFBFBD>܂<EFBFBD><DC82><EFBFBD> {{"
|
||||
IDS_STENCIL_MISMATCHED_TAG_START "<22><><EFBFBD>v<EFBFBD><76><EFBFBD>܂<EFBFBD><DC82><EFBFBD> {{"
|
||||
IDS_STENCIL_BAD_PARAMETER "<22>s<EFBFBD>K<EFBFBD>ȃp<C883><70><EFBFBD><EFBFBD><EFBFBD>[<5B>^<5E>ł<EFBFBD>"
|
||||
IDS_STENCIL_METHODNAME_TOO_LONG "<22><><EFBFBD>\<5C>b<EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD>"
|
||||
IDS_STENCIL_HANDLERNAME_TOO_LONG "<22>n<EFBFBD><6E><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD>"
|
||||
IDS_STENCIL_INVALID_SUBHANDLER "<22>T<EFBFBD>u<EFBFBD>n<EFBFBD><6E><EFBFBD>h<EFBFBD><68> <20>^<5E>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD>"
|
||||
IDS_STENCIL_UNRESOLVED_REPLACEMENT "<22>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD> : '%s'"
|
||||
|
||||
IDS_STENCIL_INCLUDE_ERROR "<22>Y<EFBFBD>t<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD><4A><EFBFBD>܂<EFBFBD><DC82><EFBFBD>"
|
||||
IDS_STENCIL_INCLUDE_INVALID "<22>Y<EFBFBD>t<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>̓f<CD83>B<EFBFBD>X<EFBFBD>N <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>ł͂<C582><CD82><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD>"
|
||||
|
||||
IDS_STENCIL_MLANG_COCREATE "CMultiLanguage <20><><EFBFBD>쐬<EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD>"
|
||||
IDS_STENCIL_MLANG_LCID "lcid <20>擾<EFBFBD>̃G<CC83><47><EFBFBD>[<5B>ł<EFBFBD>"
|
||||
IDS_STENCIL_MLANG_GETLOCALE "GetLocaleInfo <20><><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD>"
|
||||
IDS_STENCIL_MLANG_GETCHARSET "GetCharsetInfo <20><><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD>"
|
||||
|
||||
IDS_STENCIL_OUTOFMEMORY "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD>"
|
||||
IDS_STENCIL_UNEXPECTED "<22>\<5C><><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>G<EFBFBD><47><EFBFBD>[<5B>ł<EFBFBD>"
|
||||
END
|
||||
|
||||
#endif
|
||||
@@ -1,146 +0,0 @@
|
||||
// This is a part of the Active Template Library.
|
||||
// Copyright (C) Microsoft Corporation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Active Template Library Reference and related
|
||||
// electronic documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Active Template Library product.
|
||||
|
||||
#include <winresrc.h>
|
||||
#include "atlsrvres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ATLSRV_BAD_REQUEST "<html><head><title><3E>߸<EFBFBD><DFB8><EFBFBD> <20><>û</title></head><body><3E>߸<EFBFBD><DFB8><EFBFBD> <20><>û<EFBFBD>Դϴ<D4B4>.</body></html>"
|
||||
IDS_ATLSRV_AUTH_REQUIRED
|
||||
"<html><head><title><3E><><EFBFBD><EFBFBD> <20>ʿ<EFBFBD></title></head><body><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʿ<EFBFBD><CABF>մϴ<D5B4>.</body></html>"
|
||||
IDS_ATLSRV_FORBIDDEN "<html><head><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head><body><3E><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_NOT_FOUND "<html><head><title>ã<><C3A3> <20><> <20><><EFBFBD><EFBFBD></title></head><body>ã<><C3A3> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></body></html>"
|
||||
IDS_ATLSRV_NOT_IMPLEMENTED
|
||||
"<html><head><title><3E><><EFBFBD><EFBFBD> <20>ȵ<EFBFBD></title></head><body><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʾҽ<CABE><D2BD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_BAD_GATEWAY "<html><head><title><3E>߸<EFBFBD><DFB8><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD></title></head><body><3E>߸<EFBFBD><DFB8><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.</body></html>"
|
||||
IDS_ATLSRV_SERVICE_NOT_AVAILABLE
|
||||
"<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD></title></head><body><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADSRF "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P>SRF <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HNDLFAIL "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><>û<EFBFBD><C3BB> SRF <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SYSOBJFAIL "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P>Windows <20>ý<EFBFBD><C3BD><EFBFBD> <20><>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_READFILEFAIL "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD> <20>б<EFBFBD> <20>۾<EFBFBD><DBBE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADFILEFAIL "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LOADLIB "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P>LoadLibrary ȣ<><C8A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERIF "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><>û<EFBFBD><C3BB> ó<><C3B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD><CCBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_OUTOFMEM "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><DEB8> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_UNEXPECTED "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ġ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>߽<EFBFBD><DFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILPARSEFAIL "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><>û<EFBFBD><C3BB> <20><><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>м<EFBFBD><D0BC>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ġ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>߽<EFBFBD><DFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_STENCILLOADFAIL "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><>û<EFBFBD><C3BB> <20><><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. <20><><EFBFBD>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ջ<EFBFBD><D5BB>Ǿ<EFBFBD><C7BE>ų<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_HANDLERNOTFOUND "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> .dll<6C><6C> <20><>û<EFBFBD><C3BB> <20><><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>±<C2B1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><> <20>ϳ<EFBFBD><CFB3><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_BADHANDLERTAG "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><> <20><><EFBFBD>ٽǿ<D9BD><C7BF><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>±װ<C2B1> <20><><EFBFBD>ų<EFBFBD> <20><><EFBFBD>ٽ<EFBFBD> <20><><EFBFBD>μ<EFBFBD><CEBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>±װ<C2B1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. <20><>û<EFBFBD><C3BB> <20><><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD> Ȯ<><C8AE><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ùٸ<C3B9><D9B8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ʽÿ<CABD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_NOHANDLERTAG "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Server Error</H1><P><3E><>û<EFBFBD><C3BB> <20><><EFBFBD>ٽǿ<D9BD> ó<><C3B3><EFBFBD><EFBFBD> <20>±װ<C2B1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGMETHODNAME "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><>û<EFBFBD><C3BB> <20><><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD> <20><>ü <20>±<EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ʹ<EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>. <20><> <20><><EFBFBD><EFBFBD> <20>ٲ<EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>̴<EFBFBD> atlstencil.h<><68> <20><><EFBFBD>ǵ<EFBFBD> ATL_MAX_METHOD_NAME <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>۰ų<DBB0> <20><><EFBFBD>ƾ<EFBFBD> <20>մϴ<D5B4>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_LONGHANDLERNAME "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><>û<EFBFBD><C3BB> <20><><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD> id.tagname<6D><65> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><>ü <20>±<EFBFBD><C2B1><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ʹ<EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>. <20><> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>̴<EFBFBD> atlstencil.h<><68> <20><><EFBFBD>ǵ<EFBFBD> ATL_MAX_METHOD_NAME <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>۰ų<DBB0> <20><><EFBFBD>ƾ<EFBFBD> <20>մϴ<D5B4>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_IMPERSONATIONFAILED "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P>Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>û<EFBFBD><C3BB><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_ISAPISTARTUPFAILED "<html><head><title><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></title></head><body><H1><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></H1><P><3E><> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><>û<EFBFBD><C3BB> ó<><C3B3><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ISAPI <20>ͽ<EFBFBD><CDBD>ټ<EFBFBD><D9BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.</body></html>"
|
||||
IDS_ATLSRV_SERVER_ERROR_SOAPNOSOAPACTION "<html><head><title>Server Error</title></head><body><H1>Server Error</H1><P>SOAP request did not provide SOAPACTION header.</body></html>"
|
||||
|
||||
IDS_ATLSRV_CRITICAL_HEAPCREATEFAILED "<22><>û <20><><EFBFBD><EFBFBD> <20>ۼ<EFBFBD><DBBC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
IDS_ATLSRV_CRITICAL_WORKERINITFAILED "<22>۾<EFBFBD><DBBE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>带 <20>ʱ<EFBFBD>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
IDS_ATLSRV_CRITICAL_CRITSECINITFAILED "<22>Ӱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
IDS_ATLSRV_CRITICAL_THREADPOOLFAILED "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ǯ<><C7AE> <20>ʱ<EFBFBD>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
IDS_ATLSRV_CRITICAL_DLLCACHEFAILED "DLL ij<>ø<EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
IDS_ATLSRV_CRITICAL_PAGECACHEFAILED "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ij<>ø<EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
IDS_ATLSRV_CRITICAL_STENCILCACHEFAILED "<22><><EFBFBD>ٽ<EFBFBD> ij<>ø<EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
IDS_ATLSRV_CRITICAL_SESSIONSTATEFAILED "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
IDS_ATLSRV_CRITICAL_BLOBCACHEFAILED "Blob ij<>ø<EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
IDS_ATLSRV_CRITICAL_FILECACHEFAILED "<22><><EFBFBD><EFBFBD> ij<>ø<EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD> <20><><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
|
||||
IDS_PERFMON_CACHE "ATL <20><><EFBFBD><EFBFBD>:ij<><C4B3>"
|
||||
IDS_PERFMON_CACHE_HELP "ATL <20><><EFBFBD><EFBFBD> ij<>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_HITCOUNT "ij<><C4B3> <20><><EFBFBD><EFBFBD> Ƚ<><C8BD>"
|
||||
IDS_PERFMON_HITCOUNT_HELP "ij<><C4B3> <20><><EFBFBD><EFBFBD> Ƚ<><C8BD>"
|
||||
IDS_PERFMON_MISSCOUNT "ij<><C4B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ƚ<><C8BD>"
|
||||
IDS_PERFMON_MISSCOUNT_HELP "ij<><C4B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ƚ<><C8BD>"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS "<22><><EFBFBD><EFBFBD> ij<><C4B3> <20>Ҵ緮"
|
||||
IDS_PERFMON_CURRENTALLOCATIONS_HELP "ij<>÷<EFBFBD> <20>Ҵ<EFBFBD><D2B4><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><DEB8><EFBFBD> <20><>"
|
||||
IDS_PERFMON_MAXALLOCATIONS "<22>ִ<EFBFBD> ij<><C4B3> <20>Ҵ緮"
|
||||
IDS_PERFMON_MAXALLOCATIONS_HELP "ij<>÷<EFBFBD> <20>Ҵ<EFBFBD><D2B4><EFBFBD> <20>ִ<EFBFBD> <20><EFBFBD><DEB8><EFBFBD> <20><>"
|
||||
IDS_PERFMON_CURRENTENTRIES "<22><><EFBFBD><EFBFBD> ij<><C4B3> <20><>Ʈ<EFBFBD><C6AE>"
|
||||
IDS_PERFMON_CURRENTENTRIES_HELP "<22><><EFBFBD><EFBFBD> ij<><C4B3> <20><>Ʈ<EFBFBD><C6AE> <20><>"
|
||||
IDS_PERFMON_MAXENTRIES "<22>ִ<EFBFBD> ij<><C4B3> <20><>Ʈ<EFBFBD><C6AE>"
|
||||
IDS_PERFMON_MAXENTRIES_HELP "<22>ִ<EFBFBD> ij<><C4B3> <20><>Ʈ<EFBFBD><C6AE> <20><>"
|
||||
IDS_PERFMON_HITCOUNTRATE "ij<><C4B3> <20><><EFBFBD>߷<EFBFBD>"
|
||||
IDS_PERFMON_HITCOUNTRATE_HELP "<22><> <20><> <20><><EFBFBD><EFBFBD> Ƚ<><C8BD>"
|
||||
IDS_PERFMON_REQUEST "ATL <20><><EFBFBD><EFBFBD>:<3A><>û"
|
||||
IDS_PERFMON_REQUEST_HELP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ǵ<DEB5> <20><>û<EFBFBD><C3BB> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_TOTAL "<22><><EFBFBD><EFBFBD> <20><> <20><>û <20><>"
|
||||
IDS_PERFMON_REQUEST_TOTAL_HELP "<22><> <20><>û <20><>"
|
||||
IDS_PERFMON_REQUEST_FAILED "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û <20><>"
|
||||
IDS_PERFMON_REQUEST_FAILED_HELP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>û <20><>"
|
||||
IDS_PERFMON_REQUEST_RATE "<22><><EFBFBD><EFBFBD> <20><>û <20><>/<2F><>"
|
||||
IDS_PERFMON_REQUEST_RATE_HELP "<22><> <20><> <20><>û <20><>"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_AVG_RESPONSE_TIME_HELP "<22><>û ó<><C3B3> <20><><EFBFBD><EFBFBD> <20>ҿ<EFBFBD> <20>ð<EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING "<22><><EFBFBD><EFBFBD><E2BFAD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û"
|
||||
IDS_PERFMON_REQUEST_CURR_WAITING_HELP "ó<><C3B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û <20><>"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING "<22>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û <20><>"
|
||||
IDS_PERFMON_REQUEST_MAX_WAITING_HELP "ó<><C3B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><>û <20><>"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS "Ȱ<><C8B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_PERFMON_REQUEST_ACTIVE_THREADS_HELP "<22><>û<EFBFBD><C3BB> <20><>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>"
|
||||
END
|
||||
|
||||
|
||||
#ifndef ATL_NO_DEFAULT_STENCIL_RESOURCE
|
||||
dllmgr.srf HTML "res\\dllmgr.srf"
|
||||
stencilmgr.srf HTML "res\\stencilmgr.srf"
|
||||
threadmgr.srf HTML "res\\threadmgr.srf"
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Stencil parse error support
|
||||
//
|
||||
#ifdef ATL_DEBUG_STENCILS
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_STENCIL_ERROR_STENCIL
|
||||
"{{<7B>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0}}<h1><font color=#ff0000> <20><><EFBFBD>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>м<EFBFBD><D0BC>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>߽<EFBFBD><DFBD>ϴ<EFBFBD>.</font></h1>\r\n{{while GetNextError}}<table border=1 width=50%>\r\n<tr><td width=25%><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></td><td>{{GetErrorText}}</td></tr>\r\n<tr><td><3E><> <20><>ȣ</td><td>{{GetErrorLineNumber}}</td></tr>\r\n<tr><td><3E><><EFBFBD><EFBFBD> <20>ؽ<EFBFBD>Ʈ</td><td><pre>{{GetErrorLine}}</pre></td></tr>\r\n</table>\r\n{{endwhile}}<br><3E><><EFBFBD>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\r\n<hr>"
|
||||
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_IF "{{if}} <20><><EFBFBD><EFBFBD> {{endif}}<7D><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_ELSE "{{else}} <20><><EFBFBD><EFBFBD> {{endif}}<7D><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_UNCLOSEDBLOCK_WHILE "{{while}} <20><><EFBFBD><EFBFBD> {{endwhile}}<7D><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDWHILE "{{endwhile}} <20><><EFBFBD><EFBFBD> {{while}}<7D><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>"
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ELSE "{{else}} <20><><EFBFBD><EFBFBD> {{if}}<7D><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_UNOPENEDBLOCK_ENDIF "{{endif}} <20><><EFBFBD><EFBFBD> {{if}} <20>Ǵ<EFBFBD> {{else}}<7D><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
|
||||
IDS_STENCIL_INVALID_HANDLER "ó<><C3B3><EFBFBD><EFBFBD> <20>±װ<C2B1> <20>߸<EFBFBD><DFB8>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_NULLPARAM "ParseReplacements<74><73> <20><><EFBFBD><EFBFBD> <20>Ű<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL<4C>Դϴ<D4B4>."
|
||||
IDS_STENCIL_INVALIDSTRING "<22><><EFBFBD><EFBFBD> <20>ְų<D6B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> ParseReplacements<74><73> <20><><EFBFBD>Ǿ<DEB5><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_EMBEDDED_NULL "<22><><EFBFBD>ٽǿ<D9BD> <20><><EFBFBD>Ե<EFBFBD> null <20><><EFBFBD>ڰ<EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_UNMATCHED_TAG_START "{{<7B><> <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD> <20>ʽ<EFBFBD><CABD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_MISMATCHED_TAG_START "{{<7B><> <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD> <20>ʽ<EFBFBD><CABD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_BAD_PARAMETER "<22>Ű<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߸<EFBFBD><DFB8>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_METHODNAME_TOO_LONG "<22><EFBFBD><DEBC><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ʹ<EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_HANDLERNAME_TOO_LONG "ó<><C3B3><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ʹ<EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_INVALID_SUBHANDLER "<22><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>±װ<C2B1> <20>߸<EFBFBD><DFB8>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_UNRESOLVED_REPLACEMENT "<22><>ü <20><><EFBFBD><EFBFBD> Ȯ<><C8AE><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>: '%s'"
|
||||
|
||||
IDS_STENCIL_INCLUDE_ERROR "<22><><EFBFBD>Ե<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_INCLUDE_INVALID "<22><><EFBFBD>Ե<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ũ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴմϴ<D5B4>."
|
||||
|
||||
IDS_STENCIL_MLANG_COCREATE "CMultiLanguage<67><65> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_MLANG_LCID "lcid<69><64> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_MLANG_GETLOCALE "GetLocaleInfo<66><6F> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
IDS_STENCIL_MLANG_GETCHARSET "GetCharsetInfo<66><6F> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>."
|
||||
|
||||
IDS_STENCIL_OUTOFMEMORY "<22><DEB8> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>."
|
||||
IDS_STENCIL_UNEXPECTED "<22><><EFBFBD><EFBFBD>ġ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>."
|
||||
END
|
||||
|
||||
#endif
|
||||
@@ -1,29 +0,0 @@
|
||||
<!--
|
||||
This is a part of the Active Template Library.
|
||||
Copyright (C) Microsoft Corporation
|
||||
All rights reserved.
|
||||
|
||||
This source code is only intended as a supplement to the
|
||||
Active Template Library Reference and related
|
||||
electronic documentation provided with the library.
|
||||
See these sources for detailed information regarding the
|
||||
Active Template Library product.
|
||||
-->
|
||||
|
||||
<html>
|
||||
<body bgcolor={{GetBodyColor}}>
|
||||
<H1 align=left> ATL Server DLL Cache Manager </H1>
|
||||
|
||||
Current DLL Cache Entries: {{GetNumEntries}}<p>
|
||||
|
||||
<table border=1>
|
||||
<tr bgcolor={{GetTRColor}}><th>DLL Path</th><th>Ref Count</th></tr>
|
||||
|
||||
{{while EnumEntries}}
|
||||
<tr bgcolor={{GetTRColor}}><td align=center>{{GetDllName}}</td><td align=center>{{GetDllReferences}}</tr>
|
||||
{{endwhile}}
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,69 +0,0 @@
|
||||
<!--
|
||||
This is a part of the Active Template Library.
|
||||
Copyright (C) Microsoft Corporation
|
||||
All rights reserved.
|
||||
|
||||
This source code is only intended as a supplement to the
|
||||
Active Template Library Reference and related
|
||||
electronic documentation provided with the library.
|
||||
See these sources for detailed information regarding the
|
||||
Active Template Library product.
|
||||
-->
|
||||
<html>
|
||||
<body bgcolor="{{GetBodyColor}}">
|
||||
<H1 align="left">
|
||||
ATL Server Stencil Cache Management
|
||||
</H1>
|
||||
<table border="1" width="50%">
|
||||
<tr bgcolor="{{GetTRColor}}">
|
||||
<th align="center">
|
||||
Value</th><th align="center">Quantity</th></tr>
|
||||
{{while GetNextStencilCacheStats}}
|
||||
<tr bgcolor="{{GetTRColor}}">
|
||||
<td>{{GetCacheValue}}</td>
|
||||
<td>{{GetCacheQuantity}}</td>
|
||||
</tr>
|
||||
{{endwhile}}
|
||||
</table>
|
||||
<form method="post">
|
||||
<input type="hidden" name="Handler" value="StencilMgrSrf"> <input type="hidden" name="Method" value="ExecuteCommand">
|
||||
<select name="command" onchange="HandleFormOnChange(this);">
|
||||
<option value="0">Clear All Statistics</option>
|
||||
<option value="1">Remove Stencil</option>
|
||||
<option value="2">Remove All Stencils</option>
|
||||
<option value="3">Set default Lifespan</option>
|
||||
</select>
|
||||
<br>
|
||||
<span id="DynValueCap"></span><input type="text" name="DynValue" style="visibility=hidden">
|
||||
<br>
|
||||
<input type="submit" value="Execute Command">
|
||||
</form>
|
||||
<script language="JavaScript">
|
||||
function HandleFormOnChange(select_object)
|
||||
{
|
||||
|
||||
//alert(select_object.form.elements["StencilName"].type);
|
||||
|
||||
if (select_object.value==1)
|
||||
{
|
||||
select_object.form.elements["DynValue"].style.visibility="visible";
|
||||
window.document.all["DynValueCap"].innerHTML = "Stencil Name: ";
|
||||
|
||||
}
|
||||
else if (select_object.value==3)
|
||||
{
|
||||
select_object.form.elements["DynValue"].style.visibility="visible";
|
||||
window.document.all["DynValueCap"].innerHTML = "New Lifetime: ";
|
||||
}
|
||||
else
|
||||
{
|
||||
select_object.form.elements["DynValue"].style.visibility="hidden";
|
||||
window.document.all["DynValueCap"].innerHTML="";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,24 +0,0 @@
|
||||
<!--
|
||||
This is a part of the Active Template Library.
|
||||
Copyright (C) Microsoft Corporation
|
||||
All rights reserved.
|
||||
|
||||
This source code is only intended as a supplement to the
|
||||
Active Template Library Reference and related
|
||||
electronic documentation provided with the library.
|
||||
See these sources for detailed information regarding the
|
||||
Active Template Library product.
|
||||
-->
|
||||
<html>
|
||||
<body bgcolor="{{GetBodyColor}}">
|
||||
<H1 align="left">
|
||||
ATL Server Thread Pool Management
|
||||
</H1>
|
||||
This server's thread pool is currently using {{GetSize}} threads.<p>
|
||||
<form method="post">
|
||||
<input type="hidden" name="Handler" value="ThreadMgrSrf"> <input type="hidden" name="Method" value="ExecuteCommand">
|
||||
<input type="hidden" name="command" value="0"> Enter a new thread pool size: <input type="text" name="DynValue">
|
||||
<input type="submit" value="Change Thread Pool">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +0,0 @@
|
||||
<!--TO READ THIS HELP FILE, RIGHT-CLICK ON THE FILE NAME IN THE
|
||||
SOLUTION EXPLORER PANE AND SELECT "VIEW IN BROWSER"-->
|
||||
|
||||
<html><head><title>CLStencil Sample: Runs Request Handler DLLs or SRF Files from the Command Line</title></head><body><h1>CLStencil Sample: Runs Request Handler DLLs or SRF Files from the Command Line</h1><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"></div><p /><p>Demonstrates how to provide custom implementations of <MSHelp:link keywords="2FC5FADE-7CEB-4F6C-80A1-ECCADE03C59D" tabindex="0" >IHttpServerContext</MSHelp:link> and <MSHelp:link keywords="F17A798D-F277-422F-A9DB-2E36374BDB37" tabindex="0" >IIsapiExtension</MSHelp:link> to create a command-line tool for generating responses from SRF files and Web application DLLs without requiring IIS.</p><p>Note that CLStencil only provides a partial implementation of <b>IHttpServerContext</b> and <b>CIsapiExtension</b>. Items that are specific to a Web server, such as <MSHelp:link keywords="CA46AE44-41B1-470C-8890-F3C2AFC711E5" tabindex="0" >IHttpServerContext::MapUrlToPathEx</MSHelp:link>, are not supported.</p><p>CLStencil tries to locate server variables in the current environment, so if the request handler needs a specific server variable, be sure to set it in the environment before running the application. For example, you can run the following command at a command prompt to make the SERVER_PROTOCOL variable available to CLStencil and the request handlers it loads:</p><p><b>SET SERVER_PROTOCOL=HTTP/1.1.</b></p><div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Security Note </th></tr><tr><td><p>This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices.</p></td></tr></table></div><h1 class="heading">Building and Running the Sample</h1><div id="sectionSection0" class="seeAlsoNoToggleSection"><p>It is not necessary to build this sample to see the tool in action. The executable file (clstencil.exe) is shipped with Visual Studio in the Vc7\bin directory. Instructions for use can be found below:</p><h4 class="subHeading">To use CLStencil</h4><div class="subSection"><ul><li><p>Run clstencil.exe from the command line using the following command: </p><p><b>clstencil</b> <b>i</b> <i>SrfFile</i> <b>o</b> <i>OutputFile</i> <b>e</b> <i>ErrorFile</i></p><p>Where: </p><p><i>SrfFile</i> The name of the SRF file to be processed. </p><p><i>OutputFile</i> The name of the file to which the generated content will be written. </p><p><i>ErrorFile</i> The name of the file to which warning and error messages will be written. </p><p>Run clstencil.exe with no arguments for more information on its command line arguments. </p></li></ul></div><sections ><h4 class="subHeading" xmlns="">Demonstrates</h4><div class="subSection" xmlns=""><p><MSHelp:link keywords="2FC5FADE-7CEB-4F6C-80A1-ECCADE03C59D" tabindex="0" >IHttpServerContext</MSHelp:link> | <MSHelp:link keywords="F17A798D-F277-422F-A9DB-2E36374BDB37" tabindex="0" >IIsapiExtension</MSHelp:link> | <MSHelp:link keywords="AB1E3209-A312-4947-8BC4-A2C0F2C76E67" tabindex="0" >AtlServerRequest</MSHelp:link></p></div></sections></div></div><div id="footer"><div class="footerLine"></div>
|
||||
© Microsoft Corporation. All rights reserved. Send <a href="mailto:DevDocs@microsoft.com?subject=Documentation Feedback :CLStencil Sample: Runs Request Handler DLLs or SRF Files from the Command Line">comments</a> about this topic to Microsoft.
|
||||
</div></div></body></html>
|
||||
@@ -1,15 +0,0 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// clstencil.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Microsoft Classes Reference and related electronic
|
||||
// documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Microsoft C++ Libraries products.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
@@ -1,34 +0,0 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Microsoft Classes Reference and related electronic
|
||||
// documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Microsoft C++ Libraries products.
|
||||
|
||||
#if !defined(AFX_STDAFX_H__1114FD51_D788_4B00_80A9_9D9485A0F7D7__INCLUDED_)
|
||||
#define AFX_STDAFX_H__1114FD51_D788_4B00_80A9_9D9485A0F7D7__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
|
||||
// Insert your headers here
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
#define _WIN32_WINNT 0x0502
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlsrvres.h>
|
||||
#include <atlisapi.h>
|
||||
#include <atlstencil.h>
|
||||
#include "clstencil.h"
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__1114FD51_D788_4B00_80A9_9D9485A0F7D7__INCLUDED_)
|
||||
@@ -1,622 +0,0 @@
|
||||
// clstencil.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This source code is only intended as a supplement to the
|
||||
// Microsoft Classes Reference and related electronic
|
||||
// documentation provided with the library.
|
||||
// See these sources for detailed information regarding the
|
||||
// Microsoft C++ Libraries products.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <stdio.h>
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//Resource (satellite) dll search and load routines. see LoadLocResDll
|
||||
//an example.
|
||||
//Note: Change made here must be sync with all other tools.
|
||||
|
||||
__inline
|
||||
errno_t __cdecl DuplicateEnvString(TCHAR **ppszBuffer, size_t *pnBufferSizeInTChars, const TCHAR *pszVarName)
|
||||
{
|
||||
/* validation section */
|
||||
if (ppszBuffer == NULL) { return EINVAL; }
|
||||
*ppszBuffer = NULL;
|
||||
if (pnBufferSizeInTChars != NULL)
|
||||
{
|
||||
*pnBufferSizeInTChars = 0;
|
||||
}
|
||||
/* varname is already validated in getenv */
|
||||
TCHAR szDummyBuff[1] = {0};
|
||||
size_t nSizeNeeded = 0;
|
||||
errno_t ret=_tgetenv_s(&nSizeNeeded,szDummyBuff,1,pszVarName);
|
||||
if (nSizeNeeded > 0)
|
||||
{
|
||||
*ppszBuffer = new TCHAR[nSizeNeeded];
|
||||
if (*ppszBuffer != NULL)
|
||||
{
|
||||
size_t nSizeNeeded2 = 0;
|
||||
ret=_tgetenv_s(&nSizeNeeded2,*ppszBuffer,nSizeNeeded,pszVarName);
|
||||
if (nSizeNeeded2!=nSizeNeeded)
|
||||
{
|
||||
ret=ERANGE;
|
||||
} else if (pnBufferSizeInTChars != NULL)
|
||||
{
|
||||
*pnBufferSizeInTChars = nSizeNeeded;
|
||||
}
|
||||
} else
|
||||
{
|
||||
ret=ENOMEM;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define _TCSNLEN(sz,c) (min(_tcslen(sz), c))
|
||||
#define PATHLEFT(sz) (_MAX_PATH - _TCSNLEN(sz, (_MAX_PATH-1)) - 1)
|
||||
|
||||
typedef LANGID (WINAPI* PFNGETUSERDEFAULTUILANGUAGE)();
|
||||
|
||||
static BOOL CALLBACK _EnumResLangProc(HMODULE /*hModule*/, LPCTSTR /*pszType*/,
|
||||
LPCTSTR /*pszName*/, WORD langid, LONG_PTR lParam)
|
||||
{
|
||||
if(lParam == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
LANGID* plangid = reinterpret_cast< LANGID* >( lParam );
|
||||
*plangid = langid;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//Purpose: GetUserDefaultUILanguage for downlevel platforms (Win9x, NT4).
|
||||
//Input: szDllName - the string resource dll name to search. Ex: ToolUI.dll
|
||||
//Output: TCHAR *szPathOut - filled with absolute path to dll, if found.
|
||||
// size_t sizeInCharacters - buffer size in characters
|
||||
//Returns: Success - HMODULE of found dll, Failure - NULL
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
HRESULT GetUserDefaultUILanguageLegacyCompat(LANGID* pLangid)
|
||||
{
|
||||
HRESULT hr=E_FAIL;
|
||||
if (pLangid == NULL) { return E_POINTER; }
|
||||
PFNGETUSERDEFAULTUILANGUAGE pfnGetUserDefaultUILanguage;
|
||||
HINSTANCE hKernel32 = ::GetModuleHandle(_T("kernel32.dll"));
|
||||
pfnGetUserDefaultUILanguage = (PFNGETUSERDEFAULTUILANGUAGE)::GetProcAddress(hKernel32, "GetUserDefaultUILanguage");
|
||||
if(pfnGetUserDefaultUILanguage != NULL)
|
||||
{
|
||||
*pLangid = pfnGetUserDefaultUILanguage();
|
||||
hr = S_OK;
|
||||
} else
|
||||
{
|
||||
// We're not on an MUI-capable system.
|
||||
OSVERSIONINFO version;
|
||||
memset(&version, 0, sizeof(version));
|
||||
version.dwOSVersionInfoSize = sizeof(version);
|
||||
::GetVersionEx(&version);
|
||||
if( version.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
|
||||
{
|
||||
// We're on Windows 9x, so look in the registry for the UI language
|
||||
HKEY hKey = NULL;
|
||||
LONG nResult = ::RegOpenKeyEx(HKEY_CURRENT_USER,
|
||||
_T( "Control Panel\\Desktop\\ResourceLocale" ), 0, KEY_READ, &hKey);
|
||||
if (nResult == ERROR_SUCCESS)
|
||||
{
|
||||
DWORD dwType;
|
||||
TCHAR szValue[16];
|
||||
ULONG nBytes = sizeof( szValue );
|
||||
nResult = ::RegQueryValueEx(hKey, NULL, NULL, &dwType, LPBYTE( szValue ),
|
||||
&nBytes );
|
||||
if ((nResult == ERROR_SUCCESS) && (dwType == REG_SZ))
|
||||
{
|
||||
DWORD dwLangID;
|
||||
int nFields = _stscanf_s( szValue, _T( "%x" ), &dwLangID );
|
||||
if( nFields == 1 )
|
||||
{
|
||||
*pLangid = LANGID( dwLangID );
|
||||
hr = S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
::RegCloseKey(hKey);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// We're on NT 4. The UI language is the same as the language of the version
|
||||
// resource in ntdll.dll
|
||||
HMODULE hNTDLL = ::GetModuleHandle( _T( "ntdll.dll" ) );
|
||||
if (hNTDLL != NULL)
|
||||
{
|
||||
*pLangid = 0;
|
||||
::EnumResourceLanguages( hNTDLL, RT_VERSION, MAKEINTRESOURCE( 1 ),
|
||||
_EnumResLangProc, reinterpret_cast< LONG_PTR >( pLangid ) );
|
||||
if (*pLangid != 0)
|
||||
{
|
||||
hr = S_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//Purpose: Searches for a resource dll in sub directories using a search order
|
||||
// based on szPath - a directory to search res dll below.
|
||||
// see example at .
|
||||
//Input: szDllName - the string resource dll name to search. Ex: ToolUI.dll
|
||||
//Output: TCHAR *szPathOut - filled with absolute path to dll, if found.
|
||||
// size_t sizeInCharacters - buffer size in characters
|
||||
//Returns: Success (found dll) - S_OK , Failure - E_FAIL or E_UNEXPECTED
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
HRESULT LoadUILibrary(LPCTSTR szPath, LPCTSTR szDllName, DWORD dwExFlags,
|
||||
HINSTANCE *phinstOut, LPTSTR szFullPathOut,size_t sizeInCharacters,
|
||||
LCID *plcidOut)
|
||||
{
|
||||
TCHAR szPathTemp[_MAX_PATH + 1] = _T("");
|
||||
HRESULT hr = E_FAIL;
|
||||
LCID lcidFound = (LCID)-1;
|
||||
size_t nPathEnd = 0;
|
||||
|
||||
// Gotta have this stuff!
|
||||
if (szPath==NULL || *szPath == '\0')
|
||||
{
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
if (szDllName==NULL || *szDllName == '\0')
|
||||
{
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
if (!szPath || !*szPath || !szDllName || !*szDllName)
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
if (phinstOut != NULL)
|
||||
{
|
||||
*phinstOut = NULL;
|
||||
}
|
||||
|
||||
szPathTemp[_MAX_PATH-1] = L'\0';
|
||||
|
||||
// Add \ to the end if necessary
|
||||
_tcsncpy_s(szPathTemp,_countof(szPathTemp), szPath, _TRUNCATE);
|
||||
if (szPathTemp[_TCSNLEN(szPathTemp, _MAX_PATH-1) - 1] != L'\\')
|
||||
{
|
||||
_tcsncat_s(szPathTemp,_countof(szPathTemp), _T("\\"), PATHLEFT(szPathTemp));
|
||||
}
|
||||
|
||||
// Check if given path even exists
|
||||
if (GetFileAttributes(szPathTemp) == 0xFFFFFFFF)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
nPathEnd = _TCSNLEN(szPathTemp, _MAX_PATH-1);
|
||||
|
||||
{
|
||||
LANGID langid=0;
|
||||
if (FAILED(GetUserDefaultUILanguageLegacyCompat(&langid)))
|
||||
{
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
const LCID lcidUser = MAKELCID(langid, SORT_DEFAULT);
|
||||
|
||||
LCID rglcid[3];
|
||||
rglcid[0] = lcidUser;
|
||||
rglcid[1] = MAKELCID(MAKELANGID(PRIMARYLANGID(lcidUser), SUBLANG_DEFAULT), SORTIDFROMLCID(lcidUser));
|
||||
rglcid[2] = 0x409;
|
||||
for (unsigned int i = 0; i < _countof(rglcid); i++)
|
||||
{
|
||||
TCHAR szNumBuf[10];
|
||||
|
||||
// Check if it's the same as any LCID already checked,
|
||||
// which is very possible
|
||||
unsigned int n = 0;
|
||||
for (n = 0; n < i; n++)
|
||||
{
|
||||
if (rglcid[n] == rglcid[i])
|
||||
break;
|
||||
}
|
||||
|
||||
if (n < i)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
szPathTemp[nPathEnd] = L'\0';
|
||||
_itot_s(rglcid[i], szNumBuf,_countof(szNumBuf), 10);
|
||||
_tcsncat_s(szPathTemp, _countof(szPathTemp),szNumBuf , PATHLEFT(szPathTemp));
|
||||
_tcsncat_s(szPathTemp,_countof(szPathTemp), _T("\\"), PATHLEFT(szPathTemp));
|
||||
_tcsncat_s(szPathTemp,_countof(szPathTemp), szDllName, PATHLEFT(szPathTemp));
|
||||
|
||||
if (GetFileAttributes(szPathTemp) != 0xFFFFFFFF)
|
||||
{
|
||||
lcidFound = rglcid[i];
|
||||
|
||||
hr = S_OK;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// None of the default choices exists, so now look for the dll in a folder below
|
||||
//the given path (szPath)
|
||||
{
|
||||
szPathTemp[nPathEnd] = L'\0';
|
||||
_tcsncat_s(szPathTemp,_countof(szPathTemp), _T("*.*"), PATHLEFT(szPathTemp));
|
||||
|
||||
WIN32_FIND_DATA wfdw;
|
||||
HANDLE hDirs = FindFirstFile(szPathTemp, &wfdw);
|
||||
nPathEnd = _TCSNLEN(szPathTemp, _MAX_PATH-1)-3;
|
||||
if (hDirs != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
while (FindNextFile(hDirs, &wfdw))
|
||||
{
|
||||
// We are only interested in directories, since at this level, that should
|
||||
// be the only thing in this directory, i.e, LCID sub dirs
|
||||
if (wfdw.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
// Skip current and previous dirs, "." and ".."
|
||||
if (!_tcscmp(wfdw.cFileName, _T(".")) || !_tcscmp(wfdw.cFileName, _T("..")))
|
||||
continue;
|
||||
|
||||
// Does this dir have a copy of the dll?
|
||||
szPathTemp[nPathEnd] = L'\0';
|
||||
_tcsncat_s(szPathTemp,_countof(szPathTemp), wfdw.cFileName, PATHLEFT(szPathTemp));
|
||||
_tcsncat_s(szPathTemp,_countof(szPathTemp), _T("\\"), PATHLEFT(szPathTemp));
|
||||
_tcsncat_s(szPathTemp,_countof(szPathTemp), szDllName, PATHLEFT(szPathTemp));
|
||||
|
||||
if (GetFileAttributes(szPathTemp) != 0xFFFFFFFF)
|
||||
{
|
||||
// Got it!
|
||||
lcidFound = (LCID)_tstol(wfdw.cFileName);
|
||||
|
||||
hr = S_OK;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FindClose(hDirs);
|
||||
}
|
||||
}
|
||||
|
||||
Done:
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
// Set the default LCID
|
||||
if (plcidOut)
|
||||
{
|
||||
if (lcidFound == (LCID)-1)
|
||||
{
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
*plcidOut = lcidFound;
|
||||
}
|
||||
|
||||
// Finally, attempt to load the library
|
||||
// Beware! A dll loaded with LOAD_LIBRARY_AS_DATAFILE won't
|
||||
// let you use LoadIcon and things like that (only general calls like
|
||||
// FindResource and LoadResource).
|
||||
if (phinstOut != NULL)
|
||||
{
|
||||
*phinstOut = LoadLibraryEx(szPathTemp, NULL, dwExFlags);
|
||||
hr = (*phinstOut) ? S_OK : E_FAIL;
|
||||
}
|
||||
if ( szFullPathOut )
|
||||
{
|
||||
_tcsncpy_s(szFullPathOut,sizeInCharacters, szPathTemp, _MAX_PATH-1);
|
||||
}
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//Purpose: Iterates env("PATH") directories to try to find (using LoadUILibrary)
|
||||
// resource dll a directory below PATH dirs. Ex: if PATH="c:\bin;d:\win"
|
||||
// and szDllName="ToolUI.dll", then the first of c:\bin\1033\ToolUI.dll
|
||||
// and d:\win\SomeFolder\ToolUI.dll will be loaded.
|
||||
// See LoadLocResDll doc (below) for example.
|
||||
//Input: szDllName - the string resource dll name to search. Ex: ToolUI.dll
|
||||
//Output: TCHAR *szPathOut - filled with absolute path to dll, if found.
|
||||
// size_t sizeInCharacters - buffer size in characters
|
||||
//Returns: Success - HMODULE of found dll, Failure - NULL
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
HMODULE LoadSearchPath(LPCTSTR szDllName,TCHAR *szPathOut, size_t sizeInCharacters)
|
||||
{
|
||||
TCHAR * szEnvPATH = NULL;
|
||||
TCHAR * szEnvPATHBuff = NULL;
|
||||
int nPathLen = 0;
|
||||
int nPathIndex = 0;
|
||||
HMODULE hmod = NULL;
|
||||
if (DuplicateEnvString(&szEnvPATHBuff,NULL,_T("PATH"))==0 && (szEnvPATH=szEnvPATHBuff) != NULL)
|
||||
{
|
||||
while (*szEnvPATH)
|
||||
{
|
||||
/* skip leading white space and nop semicolons */
|
||||
for (; *szEnvPATH == L' ' || *szEnvPATH == L';'; ++szEnvPATH)
|
||||
{} /* NOTHING */
|
||||
|
||||
if (*szEnvPATH == L'\0')
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
++nPathIndex;
|
||||
|
||||
/* copy this chunk of the path into our trypath */
|
||||
nPathLen = 0;
|
||||
TCHAR szPath[_MAX_PATH+1];
|
||||
TCHAR * pszTry = NULL;
|
||||
for (pszTry = szPath; *szEnvPATH != L'\0' && *szEnvPATH != L';'; ++szEnvPATH)
|
||||
{
|
||||
++nPathLen;
|
||||
if (nPathLen < _MAX_PATH)
|
||||
{
|
||||
*pszTry++ = *szEnvPATH;
|
||||
} else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
*pszTry = L'\0';
|
||||
|
||||
if (nPathLen == 0 || nPathLen >= _MAX_PATH)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
LoadUILibrary(szPath, szDllName, LOAD_LIBRARY_AS_DATAFILE,
|
||||
&hmod, szPathOut,sizeInCharacters, NULL);
|
||||
if ( hmod )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (szEnvPATHBuff!=NULL)
|
||||
{
|
||||
delete [] szEnvPATHBuff;
|
||||
}
|
||||
return hmod;
|
||||
}
|
||||
//Example: Say PATH="c:\bin;d:\win", resource dll name (szDllName) is "ToolUI.dll",
|
||||
// user locale is 936, and the .exe calling LoadLocResDll is c:\MyTools\Tool.exe
|
||||
// Search order:
|
||||
// a) c:\MyTools\936\ToolUI.dll (exe path + user default UI lang)
|
||||
// b) c:\MyTools\1033 (same with eng)
|
||||
// c) c:\MyTools\*\ToolUI.dll (where * is sub folder).
|
||||
// d) c:\bin\936\ToolUI.dll (first in path)
|
||||
// e) c:\bin\1033\ToolUI.dll (first in path + eng)
|
||||
// f) c:\bin\*\ToolUI.dll
|
||||
// g) d:\win\936\ToolUI.dll (second in path)
|
||||
// h) d:\win\1033\ToolUI.dll (second in path + eng)
|
||||
// i) d:\win\*\ToolUI.dll (second in path + eng)
|
||||
// j) if bExeDefaultModule and not found, return exe HINSTANCE.
|
||||
// Note: The primary lang (without the sublang) is tested after the user ui lang.
|
||||
// Main Input: szDllName - the name of the resource dll <ToolName>ui.dll. Ex: vcdeployUI.dll
|
||||
// Main Output: HMODULE of resource dll or NULL - if not found (see bExeDefaultModule).
|
||||
HMODULE LoadLocResDll(LPCTSTR szDllName,BOOL bExeDefaultModule=TRUE,DWORD dwExFlags=LOAD_LIBRARY_AS_DATAFILE,LPTSTR pszPathOut = NULL,size_t sizeInCharacters = 0 )
|
||||
{
|
||||
HMODULE hmod = NULL;
|
||||
TCHAR driverpath[_MAX_PATH + 1], exepath[_MAX_PATH + 1];
|
||||
LPTSTR p = NULL;
|
||||
|
||||
GetModuleFileName(GetModuleHandle(NULL), driverpath, _MAX_PATH);
|
||||
// from MSDN: If the length of the path exceeds the size specified by the nSize parameter, the function succeeds and the string is truncated to nSize characters and may not be null terminated.
|
||||
driverpath[_MAX_PATH] = '\0';
|
||||
|
||||
// find path of tool
|
||||
p = driverpath + _TCSNLEN(driverpath, _MAX_PATH-1)-1;
|
||||
while ( *p != L'\\' && p != driverpath)
|
||||
{
|
||||
p--;
|
||||
}
|
||||
*p = '\0';
|
||||
|
||||
LoadUILibrary(driverpath, szDllName, dwExFlags,
|
||||
&hmod, exepath,_countof(exepath), NULL);
|
||||
|
||||
if ( hmod == NULL )
|
||||
{
|
||||
// search PATH\<lcid> for <ToolName>ui.dll
|
||||
hmod = LoadSearchPath(szDllName,exepath,_countof(exepath));
|
||||
}
|
||||
|
||||
if ( hmod && pszPathOut )
|
||||
{
|
||||
_tcsncpy_s(pszPathOut,sizeInCharacters, exepath, _MAX_PATH-1);
|
||||
}
|
||||
//Not found dll, return the exe HINSTANCE as a fallback.
|
||||
if (hmod == NULL && bExeDefaultModule)
|
||||
{
|
||||
hmod=GetModuleHandle(NULL);
|
||||
}
|
||||
return hmod;
|
||||
}
|
||||
//End loc routines
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const TCHAR* szClStencilUIDll=_T("clstencilUI.dll");
|
||||
|
||||
CComModule _Module;
|
||||
|
||||
void PrintUsage(LPCSTR lpszErrorText=NULL);
|
||||
bool GetParameters(int argc, char *argv[],
|
||||
LPTSTR *ppszInputFile,
|
||||
LPTSTR *ppszOutputFile,
|
||||
LPTSTR *ppszQueryString,
|
||||
LPTSTR *ppszFormInput,
|
||||
LPTSTR *ppszErrorLog,
|
||||
LPTSTR *ppszContentType,
|
||||
LPTSTR *ppszVerb,
|
||||
LPBOOL pbNoLogo);
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
LPTSTR szInputFile = NULL;
|
||||
LPTSTR szOutputFile = NULL;
|
||||
LPTSTR szQueryString = NULL;
|
||||
LPTSTR szFormInput = NULL;
|
||||
LPTSTR szErrorLog = NULL;
|
||||
LPTSTR szContentType = NULL;
|
||||
LPTSTR szVerb = NULL;
|
||||
BOOL bNoLogo = FALSE;
|
||||
HINSTANCE hInstResource=LoadLocResDll(szClStencilUIDll,TRUE);
|
||||
_AtlBaseModule.AddResourceInstance(hInstResource);
|
||||
|
||||
if (argc < 3)
|
||||
{
|
||||
CStringA str;
|
||||
Emit(str, IDS_INVALID_ARGS);
|
||||
PrintUsage(str);
|
||||
return 1;
|
||||
}
|
||||
|
||||
CoInitialize(NULL);
|
||||
|
||||
if (!GetParameters(argc, argv, &szInputFile, &szOutputFile, &szQueryString, &szFormInput, &szErrorLog, &szContentType, &szVerb, &bNoLogo))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
CStringA strHeader;
|
||||
if (bNoLogo == FALSE)
|
||||
{
|
||||
Emit(strHeader, IDS_HEADER);
|
||||
printf((LPCSTR) strHeader);
|
||||
}
|
||||
|
||||
_Module.Init(NULL, GetModuleHandle(NULL));
|
||||
|
||||
CSProcExtension extension;
|
||||
if (!extension.Initialize())
|
||||
{
|
||||
CStringA str;
|
||||
Emit(str, IDS_INIT_FAILED);
|
||||
printf((LPCSTR) str);
|
||||
_Module.Term();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!extension.DispatchStencilCall(szInputFile, szOutputFile, szQueryString, szErrorLog, szFormInput, szContentType, szVerb))
|
||||
printf("%s\n", (LPCSTR) extension.m_strErr);
|
||||
|
||||
extension.Uninitialize();
|
||||
_Module.Term();
|
||||
CoUninitialize();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void PrintUsage(LPCSTR lpszErrorText)
|
||||
{
|
||||
CStringA strBuffer;
|
||||
if (lpszErrorText && *lpszErrorText)
|
||||
{
|
||||
Emit(strBuffer, IDS_ERROR, lpszErrorText);
|
||||
printf((LPCSTR) strBuffer);
|
||||
}
|
||||
|
||||
Emit(strBuffer, IDS_USAGE);
|
||||
printf((LPCSTR) strBuffer);
|
||||
}
|
||||
|
||||
bool GetParameters(int argc, char *argv[],
|
||||
LPTSTR *ppszInputFile,
|
||||
LPTSTR *ppszOutputFile,
|
||||
LPTSTR *ppszQueryString,
|
||||
LPTSTR *ppszFormInput,
|
||||
LPTSTR *ppszErrorLog,
|
||||
LPTSTR *ppszContentType,
|
||||
LPTSTR *ppszVerb,
|
||||
LPBOOL pbNoLogo)
|
||||
{
|
||||
for (int i = 1; i < argc; i++)
|
||||
{
|
||||
if (i == (argc-1))
|
||||
return false;
|
||||
if (argv[i][0] != '-')
|
||||
return false;
|
||||
|
||||
char ch = argv[i][1];
|
||||
switch (ch)
|
||||
{
|
||||
case 'n' : case 'N':
|
||||
{
|
||||
*pbNoLogo = TRUE;
|
||||
continue;
|
||||
}
|
||||
case 'i' : case 'I' :
|
||||
{
|
||||
*ppszInputFile = argv[++i];
|
||||
continue;
|
||||
}
|
||||
case 'o' : case 'O' :
|
||||
{
|
||||
*ppszOutputFile = argv[++i];
|
||||
continue;
|
||||
}
|
||||
case 'q' : case 'Q' :
|
||||
{
|
||||
*ppszQueryString = argv[++i];
|
||||
continue;
|
||||
}
|
||||
case 'f' : case 'F':
|
||||
{
|
||||
*ppszFormInput = argv[++i];
|
||||
continue;
|
||||
}
|
||||
case 'e' : case 'E':
|
||||
{
|
||||
*ppszErrorLog = argv[++i];
|
||||
continue;
|
||||
}
|
||||
case 'c' : case 'C':
|
||||
{
|
||||
*ppszContentType = argv[++i];
|
||||
continue;
|
||||
}
|
||||
case 'v' : case 'V':
|
||||
{
|
||||
*ppszVerb = argv[++i];
|
||||
continue;
|
||||
}
|
||||
default:
|
||||
{
|
||||
CStringA str;
|
||||
Emit(str, IDS_UNKNOWN_PARAM, argv[i]);
|
||||
PrintUsage(str);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (*ppszInputFile == NULL)
|
||||
{
|
||||
CStringA str;
|
||||
Emit(str, IDS_INPUT_FILE);
|
||||
PrintUsage(str);
|
||||
return false;
|
||||
}
|
||||
|
||||
// fix up the query quoted query string
|
||||
if (*ppszQueryString != NULL)
|
||||
{
|
||||
int n = (int) strlen(*ppszQueryString);
|
||||
(*ppszQueryString)[n] = 0;
|
||||
}
|
||||
|
||||
// fix up the query quoted content-type string
|
||||
if (*ppszContentType != NULL)
|
||||
{
|
||||
int n = (int) strlen(*ppszContentType);
|
||||
(*ppszContentType)[n] = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,106 +0,0 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// VERSION
|
||||
//
|
||||
#ifdef RC_INVOKED
|
||||
|
||||
#define VER_FILETYPE VFT_APP
|
||||
|
||||
#define VER_FILEDESCRIPTION_STR "Microsoft \256 ATL Server Command Line Stencil Processor"
|
||||
|
||||
#define VER_INTERNALNAME_STR "CLSTENCIL"
|
||||
|
||||
#define VER_ORIGINALFILENAME_STR "CLSTENCIL.EXE"
|
||||
|
||||
#define VER_COPYRIGHTSTARTYEAR_STR "1999"
|
||||
|
||||
#include "ver_.rc"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_HEADER "Microsoft (R) Command Line Stencil Processor 7.00.9128\r\nCopyright (c) Microsoft Corporation 2005. All rights reserved.\r\n\r\n"
|
||||
IDS_NOTSUPPORTED "%s not supported in command line mode.\n"
|
||||
IDS_USAGE "Usage: clstencil -i inputfile -o outputfile [-n] [-q ""querystring""] [-f forminput] [-e errorlog] [-c content-type] [-v verb]\n-i inputfile : the .srf or .dll to process\n-n : suppress startup banner\n-o outputfile : the file to write to (defaults to stdout)\n-q ""querystring"" : the query string to pass to the processor\n-f forminput : the input file for user data (e.g. form data) (defaults to stdin)\n-e errorlog : the file where errors are written (defaults to stderr)\n-c ""content-type"" : the content type of the request\n-v verb : the request verb\n"
|
||||
IDS_ERROR "Error: %s\n"
|
||||
IDS_UNKNOWN_PARAM "Unknown Parameter: %s"
|
||||
IDS_INPUT_FILE "You must provide an input file"
|
||||
IDS_INVALID_ARGS "Invalid number of arguments"
|
||||
IDS_INIT_FAILED "ERROR: Failed to initialize extension\n"
|
||||
IDS_SERVER_VARIABLE_NOT_FOUND
|
||||
"WARNING: GetServerVariable: variable %s not found in the environment\n"
|
||||
IDS_QS_TOO_LONG "ERROR: querystring too long"
|
||||
IDS_CT_TOO_LONG "ERROR: content-type of the request too long"
|
||||
IDS_VERB_TOO_LONG "ERROR: request verb too long"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clstencil", "clstencil.vcproj", "{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clstencilui", "clstencilui.vcproj", "{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Itanium = Debug|Itanium
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Itanium = Release|Itanium
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Debug|Itanium.ActiveCfg = Debug|Itanium
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Debug|Itanium.Build.0 = Debug|Itanium
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Debug|x64.Build.0 = Debug|x64
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Release|Itanium.ActiveCfg = Release|Itanium
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Release|Itanium.Build.0 = Release|Itanium
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Release|Win32.Build.0 = Release|Win32
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Release|x64.ActiveCfg = Release|x64
|
||||
{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}.Release|x64.Build.0 = Release|x64
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Debug|Itanium.ActiveCfg = Debug|Itanium
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Debug|Itanium.Build.0 = Debug|Itanium
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Debug|x64.Build.0 = Debug|x64
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Release|Itanium.ActiveCfg = Release|Itanium
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Release|Itanium.Build.0 = Release|Itanium
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Release|Win32.Build.0 = Release|Win32
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Release|x64.ActiveCfg = Release|x64
|
||||
{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,690 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="clstencil"
|
||||
ProjectGUID="{001C823F-0CA4-4B47-BC00-7EFA1B8104AF}"
|
||||
RootNamespace="clstencil"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
<Platform
|
||||
Name="Itanium"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/clstencil.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Wp64"
|
||||
InlineFunctionExpansion="1"
|
||||
WholeProgramOptimization="true"
|
||||
PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Release/clstencil.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/SAFESEH"
|
||||
OutputFile=".\Release/clstencil.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Release/clstencil.pdb"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
LinkTimeCodeGeneration="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
EmbedManifest="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="x64\$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\Release/clstencil.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Wp64 "
|
||||
InlineFunctionExpansion="1"
|
||||
WholeProgramOptimization="true"
|
||||
PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,WIN64"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\x64\Release/clstencil.pch"
|
||||
AssemblerListingLocation=".\x64\Release/"
|
||||
ObjectFile=".\x64\Release/"
|
||||
ProgramDataBaseFileName=".\x64\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\x64\Release/clstencil.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\x64\Release/clstencil.pdb"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
LinkTimeCodeGeneration="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
EmbedManifest="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Itanium"
|
||||
OutputDirectory="ia64\$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="2"
|
||||
TypeLibraryName=".\Release/clstencil.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Wp64 "
|
||||
InlineFunctionExpansion="1"
|
||||
WholeProgramOptimization="true"
|
||||
PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,WIN64"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\ia64\Release/clstencil.pch"
|
||||
AssemblerListingLocation=".\ia64\Release/"
|
||||
ObjectFile=".\ia64\Release/"
|
||||
ProgramDataBaseFileName=".\ia64\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\ia64\Release/clstencil.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\ia64\Release/clstencil.pdb"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
LinkTimeCodeGeneration="1"
|
||||
TargetMachine="5"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
EmbedManifest="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/clstencil.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Wp64"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Debug/clstencil.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/SAFESEH"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\Debug/clstencil.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/clstencil.pdb"
|
||||
SubSystem="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
EmbedManifest="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="x64\$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\Debug/clstencil.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Wp64 "
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,WIN64"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\x64\Debug/clstencil.pch"
|
||||
AssemblerListingLocation=".\x64\Debug/"
|
||||
ObjectFile=".\x64\Debug/"
|
||||
ProgramDataBaseFileName=".\x64\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\x64\Debug/clstencil.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\x64\Debug/clstencil.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
EmbedManifest="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Itanium"
|
||||
OutputDirectory="ia64\$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="2"
|
||||
TypeLibraryName=".\Debug/clstencil.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Wp64 "
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE,WIN64"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\ia64\Debug/clstencil.pch"
|
||||
AssemblerListingLocation=".\ia64\Debug/"
|
||||
ObjectFile=".\ia64\Debug/"
|
||||
ProgramDataBaseFileName=".\ia64\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile=".\ia64\Debug/clstencil.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\ia64\Debug/clstencil.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="5"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
EmbedManifest="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\clstencil.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\StdAfx.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Itanium"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Itanium"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\clstencil.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\StdAfx.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
<File
|
||||
RelativePath="clstencil.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.htm"
|
||||
DeploymentContent="false"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -1,100 +0,0 @@
|
||||
!ifndef DEBUG
|
||||
DEBUG=1
|
||||
!endif
|
||||
|
||||
TARGETNAME=clstencil
|
||||
RCFILE=$(TARGETNAME).rc
|
||||
|
||||
|
||||
# Default PLATFORM depending on host environment
|
||||
!if "$(PLATFORM)" == ""
|
||||
!if "$(PROCESSOR_ARCHITECTURE)" == ""
|
||||
!error PLATFORM must be set to intended target
|
||||
!endif
|
||||
!if "$(PROCESSOR_ARCHITECTURE)" == "x86"
|
||||
PLATFORM=INTEL
|
||||
!endif
|
||||
!endif
|
||||
|
||||
|
||||
|
||||
#
|
||||
# PLATFORM options
|
||||
#
|
||||
LINK32=link
|
||||
RC=rc
|
||||
|
||||
#
|
||||
# TARGET platform
|
||||
#
|
||||
!if "$(TARGET)" == ""
|
||||
!if "$(PROCESSOR_ARCHITECTURE)" == "AMD64"
|
||||
TARGET=amd64
|
||||
!else if "$(PROCESSOR_ARCHITECTURE)" == "IA64"
|
||||
TARGET=ia64
|
||||
!endif
|
||||
!endif
|
||||
|
||||
#
|
||||
# Object File Directory
|
||||
#
|
||||
!ifndef D
|
||||
!if "$(DEBUG)" == "0"
|
||||
D=Release$(_OD_EXT)
|
||||
!else
|
||||
D=Debug$(_OD_EXT)
|
||||
!endif
|
||||
!if "$(UNICODE)" == "1"
|
||||
D=$(D)U
|
||||
!endif
|
||||
!if "$(TARGET)" != ""
|
||||
D=$(TARGET)\$(D)
|
||||
!endif
|
||||
!endif
|
||||
|
||||
#
|
||||
# link /MACHINE: option
|
||||
#
|
||||
!if "$(TARGET)" == ""
|
||||
LINK_MACHINE=X86
|
||||
!else if "$(TARGET)" == "amd64"
|
||||
LINK_MACHINE=X64
|
||||
!else if "$(TARGET)" == "x64"
|
||||
LINK_MACHINE=X64
|
||||
!else if "$(TARGET)" == "ia64"
|
||||
LINK_MACHINE=IA64
|
||||
!endif
|
||||
|
||||
DEFS=$(DEFS) $(DEBDEFS) $(TARGDEFS)
|
||||
RCFLAGS=$(RCFLAGS) /l 0x409 $(DEFS)
|
||||
|
||||
#############################################################################
|
||||
# Goals to build
|
||||
|
||||
GOALS=resource_dll
|
||||
goal: $(GOALS)
|
||||
|
||||
create.dir:
|
||||
@-if not exist $D\*.* mkdir $D
|
||||
|
||||
clean:
|
||||
-if exist $D\*.obj erase $D\*.obj
|
||||
-if exist $D\*.pch erase $D\*.pch
|
||||
-if exist $D\*.res erase $D\*.res
|
||||
-if exist $D\*.rsc erase $D\*.rsc
|
||||
-if exist $D\*.map erase $D\*.map
|
||||
-if exist $D\*.pdb erase $D\*.pdb
|
||||
-if exist $D\*.tlb erase $D\*.tlb
|
||||
-if exist $D\*.h erase $D\*.h
|
||||
-if not exist $D\*.* rmdir $D
|
||||
|
||||
|
||||
RESFILE=$(D)\$(RCFILE:.rc=.res)
|
||||
|
||||
|
||||
resource_dll:
|
||||
-if not exist $(D) mkdir $(D)
|
||||
$(RC) $(RCFLAGS) /fo$(RESFILE) $(RCFILE)
|
||||
-if not exist $(D)\1033 mkdir $(D)\1033
|
||||
$(LINK32) /MACHINE:$(LINK_MACHINE) $(RESFILE) -DLL -NOENTRY /out:$(D)\1033\$(TARGETNAME)UI.dll
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="clstencilui"
|
||||
ProjectGUID="{9A27D633-9C74-4C4E-93FB-F9DFCCEFEDBE}"
|
||||
RootNamespace="clstencilui"
|
||||
Keyword="MakeFileProj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="Itanium"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="0"
|
||||
BuildLogFile="$(IntDir)\BuildLogUI.htm"
|
||||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="nmake /f clstencilui.mak"
|
||||
ReBuildCommandLine="nmake /f clstencilui.mak"
|
||||
CleanCommandLine="nmake /f clstencilui.mak clean"
|
||||
Output="makprj.exe"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG"
|
||||
IncludeSearchPath=""
|
||||
ForcedIncludes=""
|
||||
AssemblySearchPath=""
|
||||
ForcedUsingAssemblies=""
|
||||
CompileAsManaged=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Itanium"
|
||||
OutputDirectory="ia64\$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\$(ConfigurationName)"
|
||||
ConfigurationType="0"
|
||||
BuildLogFile="$(IntDir)\BuildLogUI.htm"
|
||||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="nmake /f clstencilui.mak TARGET=ia64"
|
||||
ReBuildCommandLine="nmake /f clstencilui.mak TARGET=ia64"
|
||||
CleanCommandLine="nmake /f clstencilui.mak clean"
|
||||
Output="makprj.exe"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;WIN64"
|
||||
IncludeSearchPath=""
|
||||
ForcedIncludes=""
|
||||
AssemblySearchPath=""
|
||||
ForcedUsingAssemblies=""
|
||||
CompileAsManaged=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="x64\$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\$(ConfigurationName)"
|
||||
ConfigurationType="0"
|
||||
BuildLogFile="$(IntDir)\BuildLogUI.htm"
|
||||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="nmake /f clstencilui.mak TARGET=x64"
|
||||
ReBuildCommandLine="nmake /f clstencilui.mak TARGET=x64"
|
||||
CleanCommandLine="nmake /f clstencilui.mak clean"
|
||||
Output="makprj.exe"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;WIN64"
|
||||
IncludeSearchPath=""
|
||||
ForcedIncludes=""
|
||||
AssemblySearchPath=""
|
||||
ForcedUsingAssemblies=""
|
||||
CompileAsManaged=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="0"
|
||||
BuildLogFile="$(IntDir)\BuildLogUI.htm"
|
||||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="nmake /f clstencilui.mak DEBUG=0"
|
||||
ReBuildCommandLine="nmake /f clstencilui.mak DEBUG=0"
|
||||
CleanCommandLine="nmake /f clstencilui.mak DEBUG=0 clean"
|
||||
Output="makprj.exe"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG"
|
||||
IncludeSearchPath=""
|
||||
ForcedIncludes=""
|
||||
AssemblySearchPath=""
|
||||
ForcedUsingAssemblies=""
|
||||
CompileAsManaged=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Itanium"
|
||||
OutputDirectory="ia64\$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\$(ConfigurationName)"
|
||||
ConfigurationType="0"
|
||||
BuildLogFile="$(IntDir)\BuildLogUI.htm"
|
||||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="nmake /f clstencilui.mak DEBUG=0 TARGET=ia64"
|
||||
ReBuildCommandLine="nmake /f clstencilui.mak DEBUG=0 TARGET=ia64"
|
||||
CleanCommandLine="nmake /f clstencilui.mak DEBUG=0 clean"
|
||||
Output="makprj.exe"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;WIN64"
|
||||
IncludeSearchPath=""
|
||||
ForcedIncludes=""
|
||||
AssemblySearchPath=""
|
||||
ForcedUsingAssemblies=""
|
||||
CompileAsManaged=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="x64\$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\$(ConfigurationName)"
|
||||
ConfigurationType="0"
|
||||
BuildLogFile="$(IntDir)\BuildLogUI.htm"
|
||||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="nmake /f clstencilui.mak DEBUG=0 TARGET=x64"
|
||||
ReBuildCommandLine="nmake /f clstencilui.mak DEBUG=0 TARGET=x64"
|
||||
CleanCommandLine="nmake /f clstencilui.mak DEBUG=0 clean"
|
||||
Output="makprj.exe"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;WIN64"
|
||||
IncludeSearchPath=""
|
||||
ForcedIncludes=""
|
||||
AssemblySearchPath=""
|
||||
ForcedUsingAssemblies=""
|
||||
CompileAsManaged=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\clstencil.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.htm"
|
||||
DeploymentContent="false"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -1,28 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by clstencil.rc
|
||||
//
|
||||
#define IDS_HEADER 101
|
||||
#define IDS_NOTSUPPORTED 102
|
||||
#define IDS_USAGE 103
|
||||
#define IDS_ERROR 104
|
||||
#define IDS_UNKNOWN_PARAM 105
|
||||
#define IDS_INPUT_FILE 106
|
||||
#define IDS_INVALID_ARGS 107
|
||||
#define IDS_INIT_FAILED 108
|
||||
#define IDS_SERVER_VARIABLE_NOT_FOUND 109
|
||||
#define IDS_QS_TOO_LONG 110
|
||||
#define IDS_CONTENT_TYPE_TOO_LONG 111
|
||||
#define IDS_CT_TOO_LONG 111
|
||||
#define IDS_VERB_TOO_LONG 112
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 109
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,309 +0,0 @@
|
||||
//
|
||||
// Attribute.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "XSDElement.h"
|
||||
#include "QName.h"
|
||||
|
||||
enum ATTRIBUTEFORM
|
||||
{
|
||||
ATTRFORM_UNK = 0,
|
||||
ATTRFORM_QUALIFIED,
|
||||
ATTRFORM_UNQUALIFIED
|
||||
};
|
||||
|
||||
inline ATTRIBUTEFORM GetAttributeForm(const wchar_t *wsz, int cch)
|
||||
{
|
||||
struct _attrform
|
||||
{
|
||||
wchar_t *wsz;
|
||||
int cch;
|
||||
ATTRIBUTEFORM attrform;
|
||||
};
|
||||
|
||||
ATTRIBUTEFORM retForm = ATTRFORM_UNK;
|
||||
|
||||
// data driven is kind of overkill for two options, but makes it
|
||||
// easy to extend later
|
||||
static const _attrform s_forms[] =
|
||||
{
|
||||
{ L"qualified", sizeof("qualified")-1, ATTRFORM_QUALIFIED },
|
||||
{ L"unqualified", sizeof("unqualified")-1, ATTRFORM_UNQUALIFIED }
|
||||
};
|
||||
|
||||
for (int i=0; i<(sizeof(s_forms)/sizeof(s_forms[0])); i++)
|
||||
{
|
||||
if (cch == s_forms[i].cch && !wcsncmp(wsz, s_forms[i].wsz, cch))
|
||||
{
|
||||
retForm = s_forms[i].attrform;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return retForm;
|
||||
}
|
||||
|
||||
enum ATTRIBUTEUSE
|
||||
{
|
||||
ATTRUSE_UNK = 0,
|
||||
ATTRUSE_PROHIBITED,
|
||||
ATTRUSE_OPTIONAL,
|
||||
ATTRUSE_REQUIRED,
|
||||
ATTRUSE_DEFAULT,
|
||||
ATTRUSE_FIXED
|
||||
};
|
||||
|
||||
inline ATTRIBUTEUSE GetAttributeUse(const wchar_t *wsz, int cch)
|
||||
{
|
||||
struct _attruse
|
||||
{
|
||||
wchar_t *wsz;
|
||||
int cch;
|
||||
ATTRIBUTEUSE attruse;
|
||||
};
|
||||
|
||||
ATTRIBUTEUSE retUse = ATTRUSE_UNK;
|
||||
|
||||
// data driven is kind of overkill for two options, but makes it
|
||||
// easy to extend later
|
||||
static const _attruse s_uses[] =
|
||||
{
|
||||
{ L"prohibited", sizeof("prohibited")-1, ATTRUSE_PROHIBITED },
|
||||
{ L"optional", sizeof("optional")-1, ATTRUSE_OPTIONAL },
|
||||
{ L"required", sizeof("required")-1, ATTRUSE_REQUIRED },
|
||||
{ L"default", sizeof("default")-1, ATTRUSE_DEFAULT },
|
||||
{ L"fixed", sizeof("fixed")-1, ATTRUSE_FIXED },
|
||||
};
|
||||
|
||||
for (int i=0; i<(sizeof(s_uses)/sizeof(s_uses[0])); i++)
|
||||
{
|
||||
if (cch == s_uses[i].cch && !wcsncmp(wsz, s_uses[i].wsz, cch))
|
||||
{
|
||||
retUse = s_uses[i].attruse;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return retUse;
|
||||
}
|
||||
|
||||
class CAttribute : public CXSDElement
|
||||
{
|
||||
private:
|
||||
|
||||
ATTRIBUTEFORM m_attrForm;
|
||||
ATTRIBUTEUSE m_attrUse;
|
||||
CStringW m_strName;
|
||||
CQName m_ref;
|
||||
CQName m_type;
|
||||
CStringW m_strValue;
|
||||
CStringW m_strID;
|
||||
|
||||
// WSDL:arrayType attribute
|
||||
CStringW m_strArrayType;
|
||||
|
||||
protected:
|
||||
|
||||
public:
|
||||
|
||||
// REVIEW: set to defaults?
|
||||
CAttribute()
|
||||
:m_attrForm(ATTRFORM_UNK), m_attrUse(ATTRUSE_UNK)
|
||||
{
|
||||
}
|
||||
|
||||
inline HRESULT SetName(const wchar_t *wszName, int cchName)
|
||||
{
|
||||
if (!wszName)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strName.SetString(wszName, cchName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetName(const CStringW& strName)
|
||||
{
|
||||
m_strName = strName;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetName()
|
||||
{
|
||||
return m_strName;
|
||||
}
|
||||
|
||||
inline HRESULT SetArrayType(const wchar_t *wszArrayType, int cchArrayType)
|
||||
{
|
||||
if (!wszArrayType)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strArrayType.SetString(wszArrayType, cchArrayType);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetArrayType(const CStringW& strArrayType)
|
||||
{
|
||||
m_strArrayType = strArrayType;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetArrayType()
|
||||
{
|
||||
return m_strArrayType;
|
||||
}
|
||||
|
||||
inline HRESULT SetValue(const wchar_t *wszValue, int cchValue)
|
||||
{
|
||||
if (!wszValue)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strValue.SetString(wszValue, cchValue);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetValue(const CStringW& strValue)
|
||||
{
|
||||
m_strValue = strValue;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetValue()
|
||||
{
|
||||
return m_strValue;
|
||||
}
|
||||
|
||||
inline HRESULT SetID(const wchar_t *wszID, int cchID)
|
||||
{
|
||||
if (!wszID)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strID.SetString(wszID, cchID);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetID(const CStringW& strID)
|
||||
{
|
||||
m_strID = strID;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetID()
|
||||
{
|
||||
return m_strID;
|
||||
}
|
||||
|
||||
inline HRESULT SetType(const CStringW& strQName)
|
||||
{
|
||||
m_type.SetQName(strQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetType(const CStringW& strPrefix, const CStringW& strName)
|
||||
{
|
||||
m_type.SetQName(strPrefix, strName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetType(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
m_type.SetQName(wszQName, cchQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline CQName& GetTypeName()
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
|
||||
inline HRESULT SetRef(const CStringW& strQName)
|
||||
{
|
||||
m_ref.SetQName(strQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetRef(const CStringW& strPrefix, const CStringW& strName)
|
||||
{
|
||||
m_ref.SetQName(strPrefix, strName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetRef(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
m_ref.SetQName(wszQName, cchQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline CQName& GetRefName()
|
||||
{
|
||||
return m_ref;
|
||||
}
|
||||
|
||||
inline HRESULT SetAttributeForm(const wchar_t *wsz, int cch)
|
||||
{
|
||||
m_attrForm = ::GetAttributeForm(wsz, cch);
|
||||
if (m_attrForm != ATTRFORM_UNK)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
inline HRESULT SetAttributeForm(const CStringW& str)
|
||||
{
|
||||
return SetAttributeForm(str, str.GetLength());
|
||||
}
|
||||
|
||||
inline ATTRIBUTEFORM GetAttributeForm()
|
||||
{
|
||||
return m_attrForm;
|
||||
}
|
||||
|
||||
inline HRESULT SetAttributeUse(const wchar_t *wsz, int cch)
|
||||
{
|
||||
m_attrUse = ::GetAttributeUse(wsz, cch);
|
||||
if (m_attrUse != ATTRUSE_UNK)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
inline HRESULT SetAttributeUse(const CStringW& str)
|
||||
{
|
||||
return SetAttributeUse(str, str.GetLength());
|
||||
}
|
||||
|
||||
inline ATTRIBUTEUSE GetAttributeUse()
|
||||
{
|
||||
return m_attrUse;
|
||||
}
|
||||
}; // class CAttribute
|
||||
@@ -1,161 +0,0 @@
|
||||
//
|
||||
// AttributeParser.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "AttributeParser.h"
|
||||
#include "Attribute.h"
|
||||
|
||||
TAG_METHOD_IMPL(CAttributeParser, OnAnnotation)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CAttributeParser, OnSimpleType)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CAttributeParser, OnForm)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CAttribute * pCurr = GetAttribute();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetAttributeForm(wszValue, cchValue);
|
||||
}
|
||||
|
||||
Emit(IDS_SDL_INTERNAL);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CAttributeParser, OnRef)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CAttribute * pCurr = GetAttribute();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetRef(wszValue, cchValue);
|
||||
}
|
||||
|
||||
Emit(IDS_SDL_INTERNAL);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CAttributeParser, OnName)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CAttribute * pCurr = GetAttribute();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetName(wszValue, cchValue);
|
||||
}
|
||||
|
||||
Emit(IDS_SDL_INTERNAL);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CAttributeParser, OnType)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CAttribute * pCurr = GetAttribute();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetType(wszValue, cchValue);
|
||||
}
|
||||
|
||||
Emit(IDS_SDL_INTERNAL);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CAttributeParser, OnUse)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CAttribute * pCurr = GetAttribute();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetAttributeUse(wszValue, cchValue);
|
||||
}
|
||||
|
||||
Emit(IDS_SDL_INTERNAL);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CAttributeParser, OnValue)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CAttribute * pCurr = GetAttribute();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetValue(wszValue, cchValue);
|
||||
}
|
||||
|
||||
Emit(IDS_SDL_INTERNAL);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CAttributeParser, OnID)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CAttribute * pCurr = GetAttribute();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetID(wszValue, cchValue);
|
||||
}
|
||||
|
||||
Emit(IDS_SDL_INTERNAL);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CAttributeParser, OnArrayType)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CAttribute *pCurr = GetAttribute();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetArrayType(wszValue, cchValue);
|
||||
}
|
||||
|
||||
Emit(IDS_SDL_INTERNAL);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT CAttributeParser::ValidateElement()
|
||||
{
|
||||
// emit a warning when we encounter an attribute that is
|
||||
// not an arrayType attribute
|
||||
CAttribute *pCurr = GetAttribute();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
if (!pCurr->GetArrayType().GetLength())
|
||||
{
|
||||
EmitFileWarning(IDS_SDL_NO_ATTRIBUTES, pCurr, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
//
|
||||
// AttributeParser.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Parser.h"
|
||||
#include "Emit.h"
|
||||
#include "resource.h"
|
||||
|
||||
class CAttribute;
|
||||
|
||||
class CAttributeParser : public CParserBase
|
||||
{
|
||||
private:
|
||||
|
||||
CAttribute *m_pAttribute;
|
||||
|
||||
public:
|
||||
|
||||
inline CAttributeParser(ISAXXMLReader *pReader, CParserBase *pParent, DWORD dwLevel, CAttribute *pAttribute = NULL)
|
||||
:CParserBase(pReader, pParent, dwLevel), m_pAttribute(pAttribute)
|
||||
{
|
||||
}
|
||||
|
||||
inline CAttribute * GetAttribute()
|
||||
{
|
||||
return m_pAttribute;
|
||||
}
|
||||
|
||||
inline void SetAttribute(CAttribute *pAttribute)
|
||||
{
|
||||
m_pAttribute = pAttribute;
|
||||
}
|
||||
|
||||
HRESULT ValidateElement();
|
||||
|
||||
/*
|
||||
<attribute
|
||||
form = (qualified | unqualified)
|
||||
id = ID
|
||||
name = NCName
|
||||
ref = QName
|
||||
type = QName
|
||||
use = (prohibited | optional | required | default | fixed) : optional
|
||||
value = string
|
||||
{any attributes with non-schema namespace . . .}>
|
||||
Content: (annotation? , (simpleType?))
|
||||
</attribute>
|
||||
*/
|
||||
BEGIN_XMLTAG_MAP()
|
||||
XMLTAG_ENTRY_EX("annotation", XSD_NAMESPACEA, OnAnnotation)
|
||||
XMLTAG_ENTRY_EX("simpleType", XSD_NAMESPACEA, OnSimpleType)
|
||||
END_XMLTAG_MAP()
|
||||
|
||||
BEGIN_XMLATTR_MAP()
|
||||
XMLATTR_ENTRY("form", OnForm)
|
||||
XMLATTR_ENTRY("ref", OnRef)
|
||||
XMLATTR_ENTRY("name", OnName)
|
||||
XMLATTR_ENTRY_EX("arrayType", WSDL_NAMESPACEA, OnArrayType)
|
||||
XMLATTR_ENTRY("type", OnType)
|
||||
XMLATTR_ENTRY("use", OnUse)
|
||||
XMLATTR_ENTRY("value", OnValue)
|
||||
XMLATTR_ENTRY("id", OnID)
|
||||
END_XMLATTR_MAP()
|
||||
|
||||
TAG_METHOD_DECL(OnAnnotation);
|
||||
TAG_METHOD_DECL(OnSimpleType);
|
||||
|
||||
ATTR_METHOD_DECL(OnForm);
|
||||
ATTR_METHOD_DECL(OnRef);
|
||||
ATTR_METHOD_DECL(OnArrayType);
|
||||
ATTR_METHOD_DECL(OnName);
|
||||
ATTR_METHOD_DECL(OnType);
|
||||
ATTR_METHOD_DECL(OnUse);
|
||||
ATTR_METHOD_DECL(OnValue);
|
||||
ATTR_METHOD_DECL(OnID);
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,378 +0,0 @@
|
||||
//
|
||||
// CodeTypeBuilder.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "CodeTypes.h"
|
||||
#include "WSDLDocument.h"
|
||||
|
||||
//
|
||||
// ElementTraits class for CElement*, CComplexType*, CSimpleType*
|
||||
//
|
||||
template <typename T>
|
||||
class CXSDElementPtrTraits : public CElementTraitsBase<T>
|
||||
{
|
||||
public:
|
||||
typedef T* INARGTYPE;
|
||||
typedef T*& OUTARGTYPE;
|
||||
|
||||
static ULONG Hash( INARGTYPE element )
|
||||
{
|
||||
ATLASSERT( element != NULL );
|
||||
|
||||
ULONG nHash = 0;
|
||||
CXMLDocument *pDoc = element->GetParentDocument();
|
||||
if (pDoc != NULL)
|
||||
{
|
||||
nHash = XSDHash((LPCWSTR) pDoc->GetDocumentUri(), nHash);
|
||||
}
|
||||
|
||||
CSchema *pSchema = element->GetParentSchema();
|
||||
if (pSchema != NULL)
|
||||
{
|
||||
nHash = XSDHash((LPCWSTR) pSchema->GetTargetNamespace(), nHash);
|
||||
}
|
||||
|
||||
nHash = XSDHash((LPCWSTR) element->GetName(), nHash);
|
||||
|
||||
return nHash;
|
||||
}
|
||||
|
||||
static bool CompareElements( INARGTYPE element1, INARGTYPE element2 )
|
||||
{
|
||||
ATLASSERT( element1 != NULL );
|
||||
ATLASSERT( element2 != NULL );
|
||||
|
||||
CXMLDocument *pDoc1 = element1->GetParentDocument();
|
||||
CXMLDocument *pDoc2 = element2->GetParentDocument();
|
||||
|
||||
if (pDoc1 != NULL && pDoc2 != NULL)
|
||||
{
|
||||
CSchema *pSchema1 = element1->GetParentSchema();
|
||||
CSchema *pSchema2 = element2->GetParentSchema();
|
||||
|
||||
if (pSchema1 != NULL && pSchema2 != NULL)
|
||||
{
|
||||
return ( pDoc1->GetDocumentUri()==pDoc2->GetDocumentUri() &&
|
||||
pSchema1->GetTargetNamespace()==pSchema2->GetTargetNamespace() &&
|
||||
element1->GetName()==element2->GetName());
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static int CompareElementsOrdered( INARGTYPE element1, INARGTYPE element2 )
|
||||
{
|
||||
ATLASSERT( element1 != NULL );
|
||||
ATLASSERT( element2 != NULL );
|
||||
|
||||
CXMLDocument *pDoc1 = element1->GetParentDocument();
|
||||
CXMLDocument *pDoc2 = element2->GetParentDocument();
|
||||
|
||||
int nRet = 1;
|
||||
|
||||
if (pDoc1 != NULL && pDoc2 != NULL)
|
||||
{
|
||||
nRet = pDoc1->GetDocumentUri().Compare( pDoc2->GetDocumentUri() );
|
||||
if (nRet == 0)
|
||||
{
|
||||
CSchema *pSchema1 = element1->GetParentSchema();
|
||||
CSchema *pSchema2 = element2->GetParentSchema();
|
||||
|
||||
if (pSchema1 != NULL && pSchema2 != NULL)
|
||||
{
|
||||
nRet = pSchema1->GetTargetNamespace().Compare( pSchema2->GetTargetNamespace() );
|
||||
if (nRet == 0)
|
||||
{
|
||||
nRet = element1->GetName().Compare( element2->GetName() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nRet;
|
||||
}
|
||||
};
|
||||
|
||||
class CCodeTypeBuilder
|
||||
{
|
||||
private:
|
||||
|
||||
CWSDLDocument * m_pDoc;
|
||||
CCodeProxy * m_pProxy;
|
||||
|
||||
//
|
||||
// collections for the various code elements
|
||||
//
|
||||
|
||||
typedef CAtlPtrList<CCodeFunction*> CODEFUNCTIONLIST;
|
||||
|
||||
typedef CAtlPtrMap<CSimpleType*, CCodeEnum*, CXSDElementPtrTraits<CSimpleType> > CODEENUMMAP;
|
||||
typedef CAtlPtrMap<CComplexType*, CCodeStruct*, CXSDElementPtrTraits<CComplexType> > CODESTRUCTMAP;
|
||||
|
||||
typedef CAtlMap<CComplexType*, CCodeTypedElement, CXSDElementPtrTraits<CComplexType> > CODETYPEMAP;
|
||||
typedef CAtlMap<CSimpleType*, CCodeTypedElement, CXSDElementPtrTraits<CSimpleType> > CODESIMPLETYPEMAP;
|
||||
|
||||
// REVIEW: headers mapped by message (unique, I would think)
|
||||
typedef CAtlMap<CWSDLMessagePart*, CCodeTypedElement *> CODEHEADERPARTMAP;
|
||||
typedef CAtlMap<CXSDElement*, CCodeTypedElement *> CODEHEADERTYPEMAP;
|
||||
|
||||
typedef CAtlMap<CComplexType*, int, CXSDElementPtrTraits<CComplexType> > PARSEMAP;
|
||||
|
||||
// map for C++ struct, enum, function, parameter, enum entry, struct field names
|
||||
typedef CAtlMap<CStringA, int, CStringRefElementTraits<CStringA> > NAMEMAP;
|
||||
|
||||
CODEFUNCTIONLIST m_functions;
|
||||
CODESTRUCTMAP m_structs;
|
||||
CODEENUMMAP m_enums;
|
||||
|
||||
CODETYPEMAP m_codeTypes;
|
||||
CODESIMPLETYPEMAP m_codeEnums;
|
||||
|
||||
CODEHEADERPARTMAP m_headersByPart;
|
||||
CODEHEADERTYPEMAP m_headersByType;
|
||||
|
||||
// map of what we are currently parsing
|
||||
PARSEMAP m_currParse;
|
||||
|
||||
// map of named elements we've encountered at the global scope
|
||||
NAMEMAP m_globalNameMap;
|
||||
|
||||
// global counter for duplicate names
|
||||
int m_nNameCounter;
|
||||
|
||||
public:
|
||||
|
||||
CCodeTypeBuilder(CWSDLDocument *pDoc = NULL, CCodeProxy * pProxy = NULL)
|
||||
:m_pDoc(pDoc), m_pProxy(pProxy), m_nNameCounter(0)
|
||||
{
|
||||
}
|
||||
|
||||
inline HRESULT Initialize(CWSDLDocument *pDoc, CCodeProxy * pProxy = NULL)
|
||||
{
|
||||
if (!pDoc)
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
if (pProxy)
|
||||
{
|
||||
m_pProxy = pProxy;
|
||||
}
|
||||
|
||||
m_pDoc = pDoc;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT Build(CCodeProxy * pCodeProxy = NULL, CWSDLDocument *pDoc = NULL);
|
||||
|
||||
private:
|
||||
|
||||
HRESULT ProcessService(CWSDLService *pSvc);
|
||||
|
||||
HRESULT ProcessPort(CWSDLPort *pPort);
|
||||
|
||||
HRESULT ProcessBinding(CWSDLBinding *pBinding);
|
||||
|
||||
HRESULT ProcessPortType(CWSDLPortType *pPortType, CWSDLBinding *pBinding);
|
||||
|
||||
HRESULT ProcessMessage(
|
||||
CWSDLPortTypeIO *pIO,
|
||||
CWSDLPortTypeOperation *pBindingOp,
|
||||
CWSDLBinding *pBinding,
|
||||
CWSDLMessage *pMessage,
|
||||
CCodeFunction *pCodeFunc,
|
||||
DWORD dwFlags);
|
||||
|
||||
// TODO (jasjitg): must respect parts= with all these
|
||||
HRESULT ProcessMessage_PID(
|
||||
CWSDLMessage *pMsg,
|
||||
CCodeFunction *pCodeFunc,
|
||||
DWORD dwFlags,
|
||||
DWORD dwCallFlags);
|
||||
|
||||
HRESULT ProcessMessagePart_PID(
|
||||
CWSDLMessagePart *pPart,
|
||||
CCodeFunction *pCodeFunc,
|
||||
DWORD dwFlags,
|
||||
DWORD dwCallFlags);
|
||||
|
||||
HRESULT ProcessMessage_PAD(
|
||||
CWSDLMessage *pMsg,
|
||||
CCodeFunction *pCodeFunc,
|
||||
DWORD dwFlags,
|
||||
DWORD dwCallFlags);
|
||||
|
||||
HRESULT ProcessMessagePart_PAD(
|
||||
CWSDLMessagePart *pPart,
|
||||
CCodeFunction *pCodeFunc,
|
||||
DWORD dwFlags,
|
||||
DWORD dwCallFlags);
|
||||
|
||||
HRESULT ProcessMessage_RPC_Encoded(
|
||||
CWSDLMessage *pMsg,
|
||||
CCodeFunction *pCodeFunc,
|
||||
DWORD dwFlags,
|
||||
DWORD dwCallFlags);
|
||||
|
||||
HRESULT ProcessMessagePart_RPC_Encoded(
|
||||
CWSDLMessagePart *pPart,
|
||||
CCodeFunction *pCodeFunc,
|
||||
DWORD dwFlags,
|
||||
DWORD dwCallFlags);
|
||||
|
||||
// REVIEW (jasjitg): not going to support these in this version
|
||||
// HRESULT ProcessMessage_RPC_Literal(
|
||||
// CWSDLMessage *pMsg,
|
||||
// CCodeFunction *pCodeFunc,
|
||||
// DWORD dwFlags,
|
||||
// DWORD dwCallFlags);
|
||||
//
|
||||
// HRESULT ProcessMessagePart_RPC_Literal(
|
||||
// CWSDLMessagePart *pPart,
|
||||
// CCodeFunction *pCodeFunc,
|
||||
// DWORD dwFlags,
|
||||
// DWORD dwCallFlags);
|
||||
|
||||
HRESULT ProcessElement(
|
||||
CElement *pElem,
|
||||
CCodeElementContainer *pContainer,
|
||||
DWORD dwFlags,
|
||||
CODETYPE parentCodeType,
|
||||
BOOL fTopLevel = FALSE,
|
||||
CWSDLMessagePart *pMsgPart = NULL);
|
||||
|
||||
HRESULT ProcessComplexType(
|
||||
CComplexType *pType,
|
||||
CCodeElementContainer *pContainer,
|
||||
DWORD dwFlags);
|
||||
|
||||
HRESULT ProcessSimpleType(
|
||||
CSimpleType *pType,
|
||||
XSDTYPE *pXSDType,
|
||||
LPDWORD pdwFlags);
|
||||
|
||||
HRESULT SortStructs();
|
||||
|
||||
HRESULT SortStructHelper(POSITION pos);
|
||||
|
||||
HRESULT CreateSafeNames(CCodeElementContainer *pElem);
|
||||
HRESULT CheckGlobalNameMap(CStringA& strName, bool bAddToMap = false);
|
||||
HRESULT CheckNameMap(NAMEMAP &map, CStringA& strName, bool bAddToMap = false);
|
||||
|
||||
HRESULT GetTypeFromElement(
|
||||
CElement *pElem,
|
||||
CCodeTypedElement *pCodeElem,
|
||||
CCodeElementContainer *pContainer,
|
||||
DWORD dwFlags);
|
||||
|
||||
HRESULT ProcessSchemaElement(
|
||||
CXSDElement *pElem,
|
||||
CCodeTypedElement *pCodeElem,
|
||||
CCodeElementContainer *pContainer,
|
||||
DWORD dwFlags);
|
||||
|
||||
HRESULT ProcessXSDElement(
|
||||
CXMLElement *pElem,
|
||||
CQName& typeName,
|
||||
CCodeTypedElement *pCodeElem);
|
||||
|
||||
HRESULT ProcessMessagePart_Type(
|
||||
CWSDLMessagePart *pPart,
|
||||
CXSDElement *pXSDElement,
|
||||
XSDTYPE xsdType,
|
||||
CODETYPE codeType,
|
||||
const CStringW& strName,
|
||||
CCodeFunction *pCodeFunc,
|
||||
DWORD dwFlags,
|
||||
DWORD dwCallFlags);
|
||||
|
||||
// Is it a PAD, PID, RPC, etc.
|
||||
HRESULT GetCallFlags(
|
||||
LPCWSTR wszParts,
|
||||
CWSDLMessage *pMessage,
|
||||
CWSDLPortTypeIO *pIO,
|
||||
CWSDLPortTypeOperation *pBindingOp,
|
||||
CWSDLBinding *pBinding,
|
||||
LPDWORD pdwFlags);
|
||||
|
||||
HRESULT GetCallFlags(
|
||||
CWSDLMessage *pMessage,
|
||||
CWSDLMessagePart *pPart,
|
||||
CWSDLPortTypeIO *pIO,
|
||||
CWSDLPortTypeOperation *pBindingOp,
|
||||
CWSDLBinding *pBinding,
|
||||
LPDWORD pdwFlags);
|
||||
|
||||
HRESULT CheckDocLiteralNamespace(
|
||||
CCodeFunction *pCodeFunc,
|
||||
CXSDElement *pXSDElement,
|
||||
DWORD dwFlags,
|
||||
DWORD dwCallFlags);
|
||||
|
||||
CODEFLAGS IsArrayDefinition(CComplexType *pType);
|
||||
BOOL IsVarArrayDefinition(CComplexType *pType,DWORD dwFlags, CElement **ppElement);
|
||||
|
||||
HRESULT ProcessArrayDefintion(
|
||||
CElement *pElem,
|
||||
CCodeElementContainer *pContainer,
|
||||
CCodeTypedElement *pCodeElem,
|
||||
DWORD dwFlags);
|
||||
|
||||
HRESULT ProcessArray(
|
||||
CComplexType *pType,
|
||||
CCodeElementContainer *pContainer,
|
||||
CCodeTypedElement *pCodeElem,
|
||||
DWORD dwFlags);
|
||||
|
||||
HRESULT ProcessVarArray(
|
||||
CElement *pElement,
|
||||
CCodeElementContainer *pContainer,
|
||||
CCodeTypedElement *pCodeElem,
|
||||
DWORD dwFlags);
|
||||
|
||||
HRESULT GetTypeFromQName(
|
||||
CQName& type,
|
||||
CXSDElement *pXSDElement,
|
||||
CXSDElement **ppXSDElement,
|
||||
XSDTYPE *pXSD);
|
||||
|
||||
HRESULT GetArrayDimensions(
|
||||
CAttribute *pAttribute,
|
||||
CCodeTypedElement *pCodeElem);
|
||||
|
||||
HRESULT ProcessSoapHeaders(
|
||||
CCodeFunction *pElem,
|
||||
CWSDLPortTypeIO *pIO,
|
||||
CWSDLPortTypeOperation *pBindingOp,
|
||||
CWSDLBinding *pBinding,
|
||||
DWORD dwFlags);
|
||||
|
||||
HRESULT GetElementInfo(CXMLElement *pElem, CQName& name, CStringW& strUri);
|
||||
|
||||
HRESULT CheckDuplicateHeaders(CCodeFunction *pCodeFunc, CCodeTypedElement *pElem, DWORD dwFlags);
|
||||
|
||||
HRESULT AddHeaderToFunction(CCodeFunction *pCodeFunc, CAutoPtr<CCodeTypedElement>& spElem, CWSDLMessagePart *pPart);
|
||||
CCodeTypedElement * GetParameterByName(CCodeFunction *pCodeFunc, const CStringW& strName);
|
||||
HRESULT GetNameFromSchemaElement(CXSDElement *pXSDElement, CStringW& strName);
|
||||
CCodeTypedElement * GetHeaderByName(CCodeFunction *pCodeFunc, const CStringW& strName);
|
||||
HRESULT CheckAndAddHeader(
|
||||
CCodeFunction *pCodeFunc,
|
||||
CAutoPtr<CCodeTypedElement>& spElem,
|
||||
DWORD dwFlags,
|
||||
CWSDLMessagePart *pPart);
|
||||
};
|
||||
|
||||
inline ULONG XSDHash(LPCWSTR wsz, ULONG nHash)
|
||||
{
|
||||
while (*wsz != 0)
|
||||
{
|
||||
nHash=(nHash<<5)+nHash+(*wsz);
|
||||
wsz++;
|
||||
}
|
||||
return nHash;
|
||||
}
|
||||
@@ -1,893 +0,0 @@
|
||||
//
|
||||
// CodeTypes.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "XSDElement.h"
|
||||
|
||||
enum CODETYPE
|
||||
{
|
||||
CODETYPE_ERR = 0,
|
||||
CODETYPE_UNK,
|
||||
CODETYPE_ENUM,
|
||||
CODETYPE_PARAMETER,
|
||||
CODETYPE_STRUCT,
|
||||
CODETYPE_UNION,
|
||||
CODETYPE_FIELD,
|
||||
CODETYPE_FUNCTION,
|
||||
CODETYPE_HEADER
|
||||
};
|
||||
|
||||
enum CODEFLAGS
|
||||
{
|
||||
CODEFLAG_ERR = 0x00000000,
|
||||
CODEFLAG_UNK = 0x00000001,
|
||||
CODEFLAG_IN = 0x00000002,
|
||||
CODEFLAG_OUT = 0x00000004,
|
||||
CODEFLAG_RETVAL = 0x00000008,
|
||||
CODEFLAG_MUSTUNDERSTAND = 0x00000010,
|
||||
CODEFLAG_HEX = 0x00000020,
|
||||
CODEFLAG_BASE64 = 0x00000040,
|
||||
CODEFLAG_FIXEDARRAY = 0x00000080,
|
||||
CODEFLAG_DYNARRAY = 0x00000100,
|
||||
|
||||
CODEFLAG_STRUCT = 0x00000200,
|
||||
CODEFLAG_UNION = 0x00000400,
|
||||
CODEFLAG_ENUM = 0x00000800,
|
||||
CODEFLAG_HEADER = 0x00001000,
|
||||
|
||||
// WSDL message styles
|
||||
CODEFLAG_DOCUMENT = 0x00002000,
|
||||
CODEFLAG_RPC = 0x00004000,
|
||||
|
||||
// WSDL message uses
|
||||
CODEFLAG_LITERAL = 0x00008000,
|
||||
CODEFLAG_ENCODED = 0x00010000,
|
||||
|
||||
// specific wire format for document/literal with
|
||||
// <message ...><part ... element="..."/></message>
|
||||
CODEFLAG_PID = 0x00020000, // ParametersInDocuments
|
||||
CODEFLAG_PAD = 0x00040000, // ParametersAsDocuments
|
||||
|
||||
// special processing required for document/literal with type=
|
||||
CODEFLAG_CHAIN = 0x00080000,
|
||||
CODEFLAG_TYPE = 0x00100000,
|
||||
CODEFLAG_ELEMENT = 0x00200000,
|
||||
|
||||
// one-way method
|
||||
CODEFLAG_ONEWAY = 0x00400000,
|
||||
|
||||
// MinOccurs=0/MaxOccurs=1 Wrapper
|
||||
CODEFLAG_DYNARRAYWRAPPER= 0x00800000,
|
||||
|
||||
// nullable/nillable element
|
||||
CODEFLAG_NULLABLE = 0x01000000
|
||||
};
|
||||
|
||||
class CCodeElement
|
||||
{
|
||||
private:
|
||||
|
||||
CStringW m_strName;
|
||||
DWORD m_dwFlags;
|
||||
CODETYPE m_codeType;
|
||||
CCodeElement * m_pParentElement;
|
||||
|
||||
// safe naming
|
||||
CStringA m_strSafeName;
|
||||
|
||||
public:
|
||||
|
||||
CCodeElement();
|
||||
virtual ~CCodeElement() {}
|
||||
|
||||
HRESULT SetName(const wchar_t *wszName, int cchName);
|
||||
HRESULT SetName(const CStringW& strName);
|
||||
const CStringW& GetName();
|
||||
CODETYPE GetCodeType();
|
||||
void SetCodeType(CODETYPE codeType);
|
||||
DWORD SetFlags(DWORD dwFlags);
|
||||
DWORD GetFlags();
|
||||
DWORD AddFlags(DWORD dwFlag);
|
||||
DWORD ClearFlags(DWORD dwFlags = 0);
|
||||
void SetParentElement(CCodeElement * pParentElement);
|
||||
CCodeElement * GetParentElement();
|
||||
const CCodeElement& operator=(const CCodeElement& that);
|
||||
|
||||
CStringA& GetSafeName();
|
||||
HRESULT SetSafeName(const CStringA& strName);
|
||||
};
|
||||
|
||||
class CCodeType
|
||||
{
|
||||
private:
|
||||
|
||||
XSDTYPE m_xsdType;
|
||||
CStringA m_strCodeType;
|
||||
|
||||
CStringA m_strSafeCodeType;
|
||||
|
||||
public:
|
||||
|
||||
CCodeType();
|
||||
|
||||
void SetXSDType(XSDTYPE xsdType);
|
||||
XSDTYPE GetXSDType();
|
||||
|
||||
HRESULT SetCodeTypeName(const wchar_t *wszCodeType, int cchCodeType);
|
||||
HRESULT SetCodeTypeName(const CStringW& strCodeType);
|
||||
const CStringA& GetCodeTypeName();
|
||||
const CCodeType& operator=(const CCodeType& that);
|
||||
|
||||
CStringA& GetSafeCodeTypeName();
|
||||
HRESULT SetSafeCodeTypeName(const CStringA& strSafeCodeType);
|
||||
};
|
||||
|
||||
class CCodeTypedElement : public CCodeElement, public CCodeType
|
||||
{
|
||||
private:
|
||||
|
||||
CXSDElement * m_pElement;
|
||||
CAtlArray<int> m_arrDims;
|
||||
|
||||
CStringA m_strSizeIs;
|
||||
|
||||
CStringW m_strNamespace;
|
||||
|
||||
public:
|
||||
|
||||
CCodeTypedElement()
|
||||
:m_pElement(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
inline HRESULT SetNamespace(const CStringW& strNamespace)
|
||||
{
|
||||
m_strNamespace = strNamespace;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline CStringW& GetNamespace()
|
||||
{
|
||||
return m_strNamespace;
|
||||
}
|
||||
|
||||
inline size_t AddDimension(int nDim)
|
||||
{
|
||||
return m_arrDims.Add(nDim);
|
||||
}
|
||||
|
||||
inline int GetDimension(int i)
|
||||
{
|
||||
return m_arrDims[i];
|
||||
}
|
||||
|
||||
inline void SetDimension(int i, int nDim)
|
||||
{
|
||||
m_arrDims[i] = nDim;
|
||||
}
|
||||
|
||||
inline int GetDims()
|
||||
{
|
||||
return (int)m_arrDims.GetCount();
|
||||
}
|
||||
|
||||
inline void ClearDims()
|
||||
{
|
||||
m_arrDims.RemoveAll();
|
||||
}
|
||||
|
||||
inline CStringA& GetSizeIs()
|
||||
{
|
||||
return m_strSizeIs;
|
||||
}
|
||||
|
||||
inline void SetSizeIs(const CStringA& str)
|
||||
{
|
||||
m_strSizeIs = str;
|
||||
}
|
||||
|
||||
inline void SetSizeIs(const CStringW& str)
|
||||
{
|
||||
m_strSizeIs = CW2A(const_cast<LPWSTR>((LPCWSTR) str));
|
||||
}
|
||||
|
||||
inline const CCodeTypedElement& operator=(const CCodeTypedElement& that)
|
||||
{
|
||||
if (this != &that)
|
||||
{
|
||||
CCodeElement::operator=(that);
|
||||
CCodeType::operator=(that);
|
||||
m_pElement = that.m_pElement;
|
||||
|
||||
// REVIEW: (jasjitg) -- ugly!
|
||||
if (that.m_arrDims.GetCount() != 0)
|
||||
{
|
||||
m_arrDims.SetCount(that.m_arrDims.GetCount());
|
||||
for (size_t i=0; i<m_arrDims.GetCount(); i++)
|
||||
{
|
||||
m_arrDims[i] = that.m_arrDims[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (*this);
|
||||
}
|
||||
|
||||
inline CCodeTypedElement(const CCodeTypedElement& that)
|
||||
{
|
||||
*this = that;
|
||||
}
|
||||
|
||||
inline void SetElement(CXSDElement *pElem)
|
||||
{
|
||||
m_pElement = pElem;
|
||||
}
|
||||
|
||||
inline CXSDElement * GetElement()
|
||||
{
|
||||
return m_pElement;
|
||||
}
|
||||
};
|
||||
|
||||
class CCodeElementContainer
|
||||
{
|
||||
private:
|
||||
|
||||
CStringA m_strName;
|
||||
// safe name
|
||||
CStringA m_strSafeName;
|
||||
|
||||
CStringA m_strResponseName; // for CCodeFunction only
|
||||
CStringA m_strSendName; // for CCodeFunction only
|
||||
CStringA m_strSoapAction; // for CCodeFunction only
|
||||
CAtlPtrList<CCodeTypedElement *> m_headers; // for CCodeFunction only
|
||||
|
||||
DWORD m_dwCallFlags; // for CCodeFunction only
|
||||
|
||||
// namespace of the type/function
|
||||
CStringA m_strNamespace;
|
||||
CAtlPtrList<CCodeTypedElement *> m_elements;
|
||||
|
||||
public:
|
||||
|
||||
CCodeElementContainer()
|
||||
:m_dwCallFlags(0)
|
||||
{
|
||||
}
|
||||
|
||||
DWORD GetCallFlags();
|
||||
void SetCallFlags(DWORD dwCallFlags);
|
||||
|
||||
CStringA& GetSafeName();
|
||||
|
||||
const CStringA& GetName();
|
||||
HRESULT SetName(const CStringA& str);
|
||||
HRESULT SetName(const CStringW& str);
|
||||
|
||||
const CStringA& GetResponseName();
|
||||
HRESULT SetResponseName(const CStringA& str);
|
||||
HRESULT SetResponseName(const CStringW& str);
|
||||
|
||||
const CStringA& GetSendName();
|
||||
HRESULT SetSendName(const CStringA& str);
|
||||
HRESULT SetSendName(const CStringW& str);
|
||||
|
||||
CStringA& GetNamespace();
|
||||
HRESULT SetNamespace(const CStringA& str);
|
||||
HRESULT SetNamespace(const CStringW& str);
|
||||
|
||||
const CStringA& GetSoapAction();
|
||||
HRESULT SetSoapAction(const CStringA& str);
|
||||
HRESULT SetSoapAction(const CStringW& str);
|
||||
|
||||
POSITION GetFirstElement();
|
||||
CCodeTypedElement * GetNextElement(POSITION &pos);
|
||||
CCodeTypedElement * AddElement(CCodeTypedElement * p = NULL);
|
||||
int GetElementCount();
|
||||
|
||||
POSITION GetFirstHeader();
|
||||
CCodeTypedElement * GetNextHeader(POSITION &pos);
|
||||
CCodeTypedElement * AddHeader(CCodeTypedElement *p = NULL);
|
||||
int GetHeaderCount();
|
||||
};
|
||||
|
||||
typedef CCodeElementContainer CCodeFunction;
|
||||
typedef CCodeElementContainer CCodeStruct;
|
||||
typedef CCodeElementContainer CCodeEnum;
|
||||
|
||||
class CCodeProxy
|
||||
{
|
||||
private:
|
||||
|
||||
CStringA m_strClassName;
|
||||
CStringA m_strAddressUri;
|
||||
CStringA m_strTargetNamespace;
|
||||
CStringA m_strServiceName;
|
||||
|
||||
CAtlPtrList<CCodeStruct *> m_structs;
|
||||
CAtlPtrList<CCodeEnum *> m_enums;
|
||||
CAtlPtrList<CCodeFunction *> m_functions;
|
||||
CAtlPtrList<CCodeTypedElement *> m_headers;
|
||||
|
||||
public:
|
||||
|
||||
const CStringA& GetClassName();
|
||||
HRESULT SetClassName(const CStringW &strName);
|
||||
HRESULT SetClassName(const char * szName);
|
||||
|
||||
const CStringA& GetServiceName();
|
||||
HRESULT SetServiceName(const CStringW &strName);
|
||||
HRESULT SetServiceName(const char * szName);
|
||||
|
||||
const CStringA& GetAddressUri();
|
||||
HRESULT SetAddressUri(const CStringW &strName);
|
||||
HRESULT SetAddressUri(const char * szName);
|
||||
|
||||
const CStringA& GetTargetNamespace();
|
||||
HRESULT SetTargetNamespace(const CStringW &strName);
|
||||
HRESULT SetTargetNamespace(const char * szName);
|
||||
|
||||
POSITION GetFirstStruct();
|
||||
CCodeStruct * GetNextStruct(POSITION &pos);
|
||||
CCodeStruct * AddStruct(CCodeStruct * p = NULL);
|
||||
|
||||
POSITION GetFirstEnum();
|
||||
CCodeEnum * GetNextEnum(POSITION &pos);
|
||||
CCodeEnum * AddEnum(CCodeEnum * p = NULL);
|
||||
|
||||
POSITION GetFirstFunction();
|
||||
CCodeFunction * GetNextFunction(POSITION &pos);
|
||||
CCodeFunction * AddFunction(CCodeFunction * p = NULL);
|
||||
|
||||
POSITION GetFirstHeader();
|
||||
CCodeTypedElement * GetNextHeader(POSITION &pos);
|
||||
CCodeTypedElement * AddHeader(CCodeTypedElement *p = NULL);
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CCodeElement
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////
|
||||
inline CCodeElement::CCodeElement()
|
||||
:m_dwFlags(CODEFLAG_ERR)
|
||||
{
|
||||
}
|
||||
|
||||
inline CStringA& CCodeElement::GetSafeName()
|
||||
{
|
||||
return m_strSafeName;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElement::SetSafeName(const CStringA& strName)
|
||||
{
|
||||
m_strSafeName = strName;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElement::SetName(const wchar_t *wszName, int cchName)
|
||||
{
|
||||
if (!wszName)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strName.SetString(wszName, cchName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElement::SetName(const CStringW& strName)
|
||||
{
|
||||
m_strName = strName;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& CCodeElement::GetName()
|
||||
{
|
||||
return m_strName;
|
||||
}
|
||||
|
||||
inline CODETYPE CCodeElement::GetCodeType()
|
||||
{
|
||||
return m_codeType;
|
||||
}
|
||||
|
||||
inline void CCodeElement::SetCodeType(CODETYPE codeType)
|
||||
{
|
||||
m_codeType = codeType;
|
||||
}
|
||||
|
||||
inline DWORD CCodeElement::SetFlags(DWORD dwFlags)
|
||||
{
|
||||
return m_dwFlags = dwFlags;
|
||||
}
|
||||
|
||||
inline DWORD CCodeElement::GetFlags()
|
||||
{
|
||||
return m_dwFlags;
|
||||
}
|
||||
|
||||
inline DWORD CCodeElement::AddFlags(DWORD dwFlag)
|
||||
{
|
||||
m_dwFlags |= dwFlag;
|
||||
return m_dwFlags;
|
||||
}
|
||||
|
||||
inline DWORD CCodeElement::ClearFlags(DWORD dwFlags)
|
||||
{
|
||||
m_dwFlags &= ~dwFlags;
|
||||
return m_dwFlags;
|
||||
}
|
||||
|
||||
inline void CCodeElement::SetParentElement(CCodeElement * pParentElement)
|
||||
{
|
||||
m_pParentElement = pParentElement;
|
||||
}
|
||||
inline CCodeElement * CCodeElement::GetParentElement()
|
||||
{
|
||||
return m_pParentElement;
|
||||
}
|
||||
|
||||
inline const CCodeElement& CCodeElement::operator=(const CCodeElement& that)
|
||||
{
|
||||
if (this != &that)
|
||||
{
|
||||
m_strName = that.m_strName;
|
||||
m_strSafeName = that.m_strSafeName;
|
||||
m_dwFlags = that.m_dwFlags;
|
||||
m_codeType = that.m_codeType;
|
||||
m_pParentElement = that.m_pParentElement;
|
||||
}
|
||||
|
||||
return (*this);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CCodeType
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
inline CCodeType::CCodeType()
|
||||
:m_xsdType(XSDTYPE_ERR)
|
||||
{
|
||||
}
|
||||
|
||||
inline void CCodeType::SetXSDType(XSDTYPE xsdType)
|
||||
{
|
||||
m_xsdType = xsdType;
|
||||
}
|
||||
|
||||
inline XSDTYPE CCodeType::GetXSDType()
|
||||
{
|
||||
return m_xsdType;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeType::SetCodeTypeName(const wchar_t *wszCodeType, int cchCodeType)
|
||||
{
|
||||
if (!wszCodeType)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
CStringW strW;
|
||||
strW.SetString(wszCodeType, cchCodeType);
|
||||
m_strCodeType = CW2A(const_cast<LPWSTR>((LPCWSTR) strW));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeType::SetCodeTypeName(const CStringW& strCodeType)
|
||||
{
|
||||
m_strCodeType = strCodeType;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringA& CCodeType::GetCodeTypeName()
|
||||
{
|
||||
return m_strCodeType;
|
||||
}
|
||||
|
||||
inline CStringA& CCodeType::GetSafeCodeTypeName()
|
||||
{
|
||||
return m_strSafeCodeType;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeType::SetSafeCodeTypeName(const CStringA& strName)
|
||||
{
|
||||
m_strSafeCodeType = strName;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CCodeType& CCodeType::operator=(const CCodeType& that)
|
||||
{
|
||||
if (this != &that)
|
||||
{
|
||||
m_strCodeType = that.m_strCodeType;
|
||||
m_strSafeCodeType = that.m_strSafeCodeType;
|
||||
m_xsdType = that.m_xsdType;
|
||||
}
|
||||
|
||||
return (*this);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CCodeElementContainer
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
inline DWORD CCodeElementContainer::GetCallFlags()
|
||||
{
|
||||
return m_dwCallFlags;
|
||||
}
|
||||
|
||||
|
||||
inline CStringA& CCodeElementContainer::GetSafeName()
|
||||
{
|
||||
return m_strSafeName;
|
||||
}
|
||||
|
||||
inline void CCodeElementContainer::SetCallFlags(DWORD dwCallFlags)
|
||||
{
|
||||
m_dwCallFlags = dwCallFlags;
|
||||
}
|
||||
|
||||
inline const CStringA& CCodeElementContainer::GetName()
|
||||
{
|
||||
return m_strName;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElementContainer::SetName(const CStringA& str)
|
||||
{
|
||||
m_strName = str;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElementContainer::SetName(const CStringW& str)
|
||||
{
|
||||
m_strName = CW2A( const_cast<LPWSTR>((LPCWSTR) str) );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringA& CCodeElementContainer::GetResponseName()
|
||||
{
|
||||
return m_strResponseName;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElementContainer::SetResponseName(const CStringA& str)
|
||||
{
|
||||
m_strResponseName = str;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElementContainer::SetResponseName(const CStringW& str)
|
||||
{
|
||||
m_strResponseName = CW2A( const_cast<LPWSTR>((LPCWSTR) str) );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringA& CCodeElementContainer::GetSendName()
|
||||
{
|
||||
return m_strSendName;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElementContainer::SetSendName(const CStringA& str)
|
||||
{
|
||||
m_strSendName = str;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElementContainer::SetSendName(const CStringW& str)
|
||||
{
|
||||
m_strSendName = CW2A( const_cast<LPWSTR>((LPCWSTR) str) );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline CStringA& CCodeElementContainer::GetNamespace()
|
||||
{
|
||||
return m_strNamespace;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElementContainer::SetNamespace(const CStringA& str)
|
||||
{
|
||||
m_strNamespace = str;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElementContainer::SetNamespace(const CStringW& str)
|
||||
{
|
||||
m_strNamespace = CW2A( const_cast<LPWSTR>((LPCWSTR) str) );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringA& CCodeElementContainer::GetSoapAction()
|
||||
{
|
||||
return m_strSoapAction;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElementContainer::SetSoapAction(const CStringA& str)
|
||||
{
|
||||
m_strSoapAction = str;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeElementContainer::SetSoapAction(const CStringW& str)
|
||||
{
|
||||
m_strSoapAction = CW2A( const_cast<LPWSTR>((LPCWSTR) str) );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline POSITION CCodeElementContainer::GetFirstElement()
|
||||
{
|
||||
return m_elements.GetHeadPosition();
|
||||
}
|
||||
|
||||
inline CCodeTypedElement * CCodeElementContainer::GetNextElement(POSITION &pos)
|
||||
{
|
||||
return m_elements.GetNext(pos);
|
||||
}
|
||||
|
||||
inline CCodeTypedElement * CCodeElementContainer::AddElement(CCodeTypedElement * p)
|
||||
{
|
||||
CAutoPtr<CCodeTypedElement> spOut;
|
||||
if (p == NULL)
|
||||
{
|
||||
spOut.Attach( new CCodeTypedElement );
|
||||
p = spOut;
|
||||
}
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (m_elements.AddTail(p) != NULL)
|
||||
{
|
||||
spOut.Detach();
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline int CCodeElementContainer::GetElementCount()
|
||||
{
|
||||
return (int)m_elements.GetCount();
|
||||
}
|
||||
|
||||
inline POSITION CCodeElementContainer::GetFirstHeader()
|
||||
{
|
||||
return m_headers.GetHeadPosition();
|
||||
}
|
||||
|
||||
inline CCodeTypedElement * CCodeElementContainer::GetNextHeader(POSITION &pos)
|
||||
{
|
||||
return m_headers.GetNext(pos);
|
||||
}
|
||||
|
||||
inline CCodeTypedElement * CCodeElementContainer::AddHeader(CCodeTypedElement * p)
|
||||
{
|
||||
CAutoPtr<CCodeTypedElement> spOut;
|
||||
if (p == NULL)
|
||||
{
|
||||
spOut.Attach( new CCodeTypedElement );
|
||||
p = spOut;
|
||||
}
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (m_headers.AddTail(p) != NULL)
|
||||
{
|
||||
spOut.Detach();
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline int CCodeElementContainer::GetHeaderCount()
|
||||
{
|
||||
return (int)m_headers.GetCount();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CCodeProxy
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
inline POSITION CCodeProxy::GetFirstStruct()
|
||||
{
|
||||
return m_structs.GetHeadPosition();
|
||||
}
|
||||
|
||||
inline CCodeStruct * CCodeProxy::GetNextStruct(POSITION &pos)
|
||||
{
|
||||
return m_structs.GetNext(pos);
|
||||
}
|
||||
|
||||
inline CCodeStruct * CCodeProxy::AddStruct(CCodeStruct * p)
|
||||
{
|
||||
CAutoPtr<CCodeStruct> spOut;
|
||||
if (p == NULL)
|
||||
{
|
||||
spOut.Attach( new CCodeStruct);
|
||||
p = spOut;
|
||||
}
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (m_structs.AddTail(p) != NULL)
|
||||
{
|
||||
spOut.Detach();
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline POSITION CCodeProxy::GetFirstEnum()
|
||||
{
|
||||
return m_enums.GetHeadPosition();
|
||||
}
|
||||
|
||||
inline CCodeEnum * CCodeProxy::GetNextEnum(POSITION &pos)
|
||||
{
|
||||
return m_enums.GetNext(pos);
|
||||
}
|
||||
|
||||
inline CCodeEnum * CCodeProxy::AddEnum(CCodeEnum * p)
|
||||
{
|
||||
CAutoPtr<CCodeEnum> spOut;
|
||||
if (p == NULL)
|
||||
{
|
||||
spOut.Attach( new CCodeEnum);
|
||||
p = spOut;
|
||||
}
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (m_enums.AddTail(p) != NULL)
|
||||
{
|
||||
spOut.Detach();
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline POSITION CCodeProxy::GetFirstFunction()
|
||||
{
|
||||
return m_functions.GetHeadPosition();
|
||||
}
|
||||
|
||||
inline CCodeFunction * CCodeProxy::GetNextFunction(POSITION &pos)
|
||||
{
|
||||
return m_functions.GetNext(pos);
|
||||
}
|
||||
|
||||
inline CCodeFunction * CCodeProxy::AddFunction(CCodeFunction * p)
|
||||
{
|
||||
CAutoPtr<CCodeFunction> spOut;
|
||||
if (p == NULL)
|
||||
{
|
||||
spOut.Attach( new CCodeFunction );
|
||||
p = spOut;
|
||||
}
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (m_functions.AddTail(p) != NULL)
|
||||
{
|
||||
spOut.Detach();
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline POSITION CCodeProxy::GetFirstHeader()
|
||||
{
|
||||
return m_headers.GetHeadPosition();
|
||||
}
|
||||
|
||||
inline CCodeTypedElement * CCodeProxy::GetNextHeader(POSITION &pos)
|
||||
{
|
||||
return m_headers.GetNext(pos);
|
||||
}
|
||||
|
||||
inline CCodeTypedElement * CCodeProxy::AddHeader(CCodeTypedElement * p)
|
||||
{
|
||||
CAutoPtr<CCodeTypedElement> spOut;
|
||||
if (p == NULL)
|
||||
{
|
||||
spOut.Attach( new CCodeTypedElement );
|
||||
p = spOut;
|
||||
}
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (m_headers.AddTail(p) != NULL)
|
||||
{
|
||||
spOut.Detach();
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline const CStringA& CCodeProxy::GetClassName()
|
||||
{
|
||||
return m_strClassName;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeProxy::SetClassName(const CStringW &strName)
|
||||
{
|
||||
return CreateSafeCppName(m_strClassName, strName);
|
||||
}
|
||||
|
||||
inline HRESULT CCodeProxy::SetClassName(const char * szName)
|
||||
{
|
||||
return CreateSafeCppName(m_strClassName, szName);
|
||||
}
|
||||
|
||||
inline const CStringA& CCodeProxy::GetServiceName()
|
||||
{
|
||||
return m_strServiceName;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeProxy::SetServiceName(const CStringW &strName)
|
||||
{
|
||||
return CreateSafeCppName(m_strServiceName, strName);
|
||||
}
|
||||
|
||||
inline HRESULT CCodeProxy::SetServiceName(const char * szName)
|
||||
{
|
||||
return CreateSafeCppName(m_strServiceName, szName);
|
||||
}
|
||||
|
||||
inline const CStringA& CCodeProxy::GetAddressUri()
|
||||
{
|
||||
return m_strAddressUri;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeProxy::SetAddressUri(const CStringW &strName)
|
||||
{
|
||||
m_strAddressUri = CW2A(const_cast<LPWSTR>((LPCWSTR) strName));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeProxy::SetAddressUri(const char * szName)
|
||||
{
|
||||
m_strAddressUri = szName;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringA& CCodeProxy::GetTargetNamespace()
|
||||
{
|
||||
return m_strTargetNamespace;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeProxy::SetTargetNamespace(const CStringW &strName)
|
||||
{
|
||||
m_strTargetNamespace = CW2A(const_cast<LPWSTR>((LPCWSTR) strName));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT CCodeProxy::SetTargetNamespace(const char * szName)
|
||||
{
|
||||
m_strTargetNamespace = szName;
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
//
|
||||
// ComplexType.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Attribute.h"
|
||||
#include "ComplexType.h"
|
||||
#include "Element.h"
|
||||
#include "Content.h"
|
||||
|
||||
CElement * CComplexType::AddElement(CElement * p)
|
||||
{
|
||||
CAutoPtr<CElement> spOut;
|
||||
if (p == NULL)
|
||||
{
|
||||
spOut.Attach( new CElement );
|
||||
p = spOut;
|
||||
}
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (m_elements.AddTail(p) != NULL)
|
||||
{
|
||||
spOut.Detach();
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CAttribute * CComplexType::AddAttribute(CAttribute * p)
|
||||
{
|
||||
CAutoPtr<CAttribute> spOut;
|
||||
if (p == NULL)
|
||||
{
|
||||
spOut.Attach( new CAttribute );
|
||||
p = spOut;
|
||||
}
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (m_attributes.AddTail(p) != NULL)
|
||||
{
|
||||
spOut.Detach();
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CContent * CComplexType::AddContent(CContent *pContent)
|
||||
{
|
||||
if (pContent == NULL)
|
||||
{
|
||||
pContent = new CContent;
|
||||
}
|
||||
delete m_pContent;
|
||||
m_pContent = pContent;
|
||||
|
||||
return m_pContent;
|
||||
}
|
||||
|
||||
CComplexType::~CComplexType()
|
||||
{
|
||||
delete m_pContent;
|
||||
}
|
||||
@@ -1,278 +0,0 @@
|
||||
//
|
||||
// ComplexType.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "XSDElement.h"
|
||||
#include "QName.h"
|
||||
|
||||
// REVIEW: CComplexType is also used to represent the restriciton and extension tags --
|
||||
// however the the restriction and extension tags do not allow the simpleContent and
|
||||
// complexContent subtags and only the base and id attributes are supported.
|
||||
// If in the future, CParserBase is modified to allow chaining, then the common
|
||||
// functionality can be subsumed in a base class instead.
|
||||
|
||||
class CElement;
|
||||
class CContent;
|
||||
class CAttribute;
|
||||
|
||||
enum CONTENT_TYPE
|
||||
{
|
||||
CONTENT_ERR = 0,
|
||||
CONTENT_UNK,
|
||||
CONTENT_ELEMENTONLY,
|
||||
CONTENT_TEXTONLY,
|
||||
CONTENT_MIXED,
|
||||
CONTENT_EMPTY
|
||||
};
|
||||
|
||||
enum DERIVED_TYPE
|
||||
{
|
||||
DERIVED_ERR = 0,
|
||||
DERIVED_UNK,
|
||||
DERIVED_EXTENSION,
|
||||
DERIVED_RESTRICTION
|
||||
};
|
||||
|
||||
CONTENT_TYPE GetContentAttribute(const wchar_t * wszVal, int cchVal);
|
||||
DERIVED_TYPE GetDerivedByAttribute(const wchar_t * wszVal, int cchVal);
|
||||
|
||||
class CComplexType : public CXSDElement
|
||||
{
|
||||
private:
|
||||
|
||||
CStringW m_strName;
|
||||
CStringW m_strID;
|
||||
CQName m_base;
|
||||
|
||||
CAtlPtrList<CElement *> m_elements;
|
||||
|
||||
// attributes
|
||||
CAtlPtrList<CAttribute *> m_attributes;
|
||||
|
||||
// simpleContent/complexContent tags
|
||||
CContent *m_pContent;
|
||||
|
||||
CONTENT_TYPE m_contentType;
|
||||
DERIVED_TYPE m_derivedBy;
|
||||
|
||||
public:
|
||||
|
||||
CComplexType()
|
||||
:m_contentType(CONTENT_UNK), m_derivedBy(DERIVED_UNK), m_pContent(NULL)
|
||||
{
|
||||
SetElementType(XSD_COMPLEXTYPE);
|
||||
}
|
||||
|
||||
~CComplexType();
|
||||
|
||||
CContent * AddContent(CContent *pContent = NULL);
|
||||
|
||||
inline CContent * GetContent()
|
||||
{
|
||||
return m_pContent;
|
||||
}
|
||||
|
||||
CElement * AddElement(CElement * pElement = NULL);
|
||||
CAttribute * AddAttribute(CAttribute * pAttribute = NULL);
|
||||
|
||||
inline size_t GetNumAttributes()
|
||||
{
|
||||
return m_attributes.GetCount();
|
||||
}
|
||||
|
||||
inline POSITION GetFirstElement()
|
||||
{
|
||||
return m_elements.GetHeadPosition();
|
||||
}
|
||||
|
||||
inline CElement * GetNextElement(POSITION& pos)
|
||||
{
|
||||
return m_elements.GetNext(pos);
|
||||
}
|
||||
|
||||
inline POSITION GetFirstAttribute()
|
||||
{
|
||||
return m_attributes.GetHeadPosition();
|
||||
}
|
||||
|
||||
inline CAttribute * GetNextAttribute(POSITION& pos)
|
||||
{
|
||||
return m_attributes.GetNext(pos);
|
||||
}
|
||||
|
||||
inline HRESULT SetName(const wchar_t *wszName, int cchName)
|
||||
{
|
||||
if (!wszName)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strName.SetString(wszName, cchName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetName(const CStringW& strName)
|
||||
{
|
||||
m_strName = strName;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetName()
|
||||
{
|
||||
return m_strName;
|
||||
}
|
||||
|
||||
inline HRESULT SetID(const wchar_t *wszID, int cchID)
|
||||
{
|
||||
if (!wszID)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strID.SetString(wszID, cchID);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetID(const CStringW& strID)
|
||||
{
|
||||
m_strID = strID;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetID()
|
||||
{
|
||||
return m_strID;
|
||||
}
|
||||
|
||||
inline HRESULT SetBase(const CStringW& strQName)
|
||||
{
|
||||
m_base.SetQName(strQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetBase(const CStringW& strPrefix, const CStringW& strName)
|
||||
{
|
||||
m_base.SetQName(strPrefix, strName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetBase(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
m_base.SetQName(wszQName, cchQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline CQName& GetBase()
|
||||
{
|
||||
return m_base;
|
||||
}
|
||||
|
||||
inline DERIVED_TYPE GetDerivedBy()
|
||||
{
|
||||
return m_derivedBy;
|
||||
}
|
||||
|
||||
inline HRESULT SetDerivedBy(DERIVED_TYPE derivedBy)
|
||||
{
|
||||
m_derivedBy = derivedBy;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetDerivedBy(const wchar_t * wszVal, int cchVal)
|
||||
{
|
||||
m_derivedBy = GetDerivedByAttribute(wszVal, cchVal);
|
||||
return (m_derivedBy != DERIVED_ERR) ? S_OK : E_FAIL;
|
||||
}
|
||||
|
||||
inline CONTENT_TYPE GetContentType()
|
||||
{
|
||||
return m_contentType;
|
||||
}
|
||||
|
||||
inline CONTENT_TYPE SetContentType(CONTENT_TYPE contentType)
|
||||
{
|
||||
m_contentType = contentType;
|
||||
return m_contentType;
|
||||
}
|
||||
|
||||
inline CONTENT_TYPE SetContentType(const wchar_t * wszVal, int cchVal)
|
||||
{
|
||||
m_contentType = GetContentAttribute(wszVal, cchVal);
|
||||
return m_contentType;
|
||||
}
|
||||
};
|
||||
|
||||
inline CONTENT_TYPE GetContentAttribute(const wchar_t * wszVal, int cchVal)
|
||||
{
|
||||
struct _map
|
||||
{
|
||||
wchar_t * wszEntry;
|
||||
int cchEntry;
|
||||
CONTENT_TYPE data;
|
||||
};
|
||||
|
||||
CONTENT_TYPE ret = CONTENT_ERR;
|
||||
|
||||
static const _map s_entries[] =
|
||||
{
|
||||
{ L"elementOnly", sizeof("elementOnly")-1, CONTENT_ELEMENTONLY },
|
||||
{ L"textOnly", sizeof("textOnly")-1, CONTENT_TEXTONLY },
|
||||
{ L"mixed", sizeof("mixed")-1, CONTENT_MIXED },
|
||||
{ L"empty", sizeof("emtpy")-1, CONTENT_EMPTY }
|
||||
};
|
||||
|
||||
for (int i=0; i<(sizeof(s_entries)/sizeof(s_entries[0])); i++)
|
||||
{
|
||||
if (cchVal == s_entries[i].cchEntry && !wcsncmp(wszVal, s_entries[i].wszEntry, cchVal))
|
||||
{
|
||||
ret = s_entries[i].data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
};
|
||||
|
||||
inline DERIVED_TYPE GetDerivedByAttribute(const wchar_t * wszVal, int cchVal)
|
||||
{
|
||||
struct _map
|
||||
{
|
||||
wchar_t * wszEntry;
|
||||
int cchEntry;
|
||||
DERIVED_TYPE data;
|
||||
};
|
||||
|
||||
DERIVED_TYPE ret = DERIVED_ERR;
|
||||
|
||||
static const _map s_entries[] =
|
||||
{
|
||||
{ L"extension", sizeof("extension")-1, DERIVED_EXTENSION },
|
||||
{ L"restriction", sizeof("restriction")-1, DERIVED_RESTRICTION }
|
||||
};
|
||||
|
||||
for (int i=0; i<(sizeof(s_entries)/sizeof(s_entries[0])); i++)
|
||||
{
|
||||
if (cchVal == s_entries[i].cchEntry && !wcsncmp(wszVal, s_entries[i].wszEntry, cchVal))
|
||||
{
|
||||
ret = s_entries[i].data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
};
|
||||
|
||||
typedef CComplexType CRestriction;
|
||||
typedef CComplexType CExtension;
|
||||
@@ -1,530 +0,0 @@
|
||||
//
|
||||
// ComplexTypeParser.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "Attribute.h"
|
||||
#include "Content.h"
|
||||
#include "Element.h"
|
||||
#include "ComplexType.h"
|
||||
|
||||
|
||||
#include "ContentParser.h"
|
||||
#include "AttributeParser.h"
|
||||
#include "ComplexTypeParser.h"
|
||||
#include "ElementParser.h"
|
||||
|
||||
#include "Emit.h"
|
||||
#include "resource.h"
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnElement)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CComplexType * pCurr = GetComplexType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
CElement * pElem = pCurr->AddElement();
|
||||
if (pElem != NULL)
|
||||
{
|
||||
SetXSDElementInfo(pElem, pCurr, GetLocator());
|
||||
|
||||
CAutoPtr<CElementParser> p( new CElementParser(GetReader(), this, GetLevel(), pElem) );
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
return p.Detach()->GetAttributes(pAttributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnAll)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
DisableReset();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnChoice)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitString(wszNamespaceUri, wszLocalName);
|
||||
|
||||
CComplexType *pCurr = GetComplexType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
if (pCurr->GetElementType() == XSD_COMPLEXTYPE)
|
||||
{
|
||||
pCurr->SetElementType(XSD_UNSUPPORTED);
|
||||
return SkipElement();
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
EmitError(IDS_SDL_INTERNAL);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnAnnotation)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnLength)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnEnumeration)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnPattern)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnScale)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnPeriod)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnDuration)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnMaxLength)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnPrecision)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnMinInclusive)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnMinExclusive)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnMaxInclusive)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnMaxExclusive)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnMinLength)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnEncoding)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnGroup)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnSequence)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
DisableReset();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnAttribute)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CComplexType *pCurr = GetComplexType();
|
||||
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
CAttribute *pElem = pCurr->AddAttribute();
|
||||
if (pElem != NULL)
|
||||
{
|
||||
SetXSDElementInfo(pElem, pCurr, GetLocator());
|
||||
|
||||
CAutoPtr<CAttributeParser> p( new CAttributeParser(GetReader(), this, GetLevel(), pElem) );
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
return p.Detach()->GetAttributes(pAttributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnAttributeGroup)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnAnyAttribute)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnSimpleContent)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
/*
|
||||
CComplexType *pCurr = GetComplexType();
|
||||
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
if (pCurr->GetElementType() == XSD_COMPLEXTYPE)
|
||||
{
|
||||
CContent *pElem = pCurr->AddContent();
|
||||
pElem->SetParentDocument(pCurr->GetParentDocument());
|
||||
pElem->SetParentElement(pCurr);
|
||||
pElem->SetElementType(XSD_SIMPLECONTENT);
|
||||
|
||||
CContentParser * p = new CContentParser(GetReader(), this, GetLevel(), pElem);
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
return p->GetAttributes(pAttributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return OnUnrecognizedTag(wszNamespaceUri,
|
||||
cchNamespaceUri, wszLocalName, cchLocalName,
|
||||
wszQName, cchQName, pAttributes);
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
|
||||
return E_FAIL;
|
||||
*/
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnAny)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitString(wszNamespaceUri, wszLocalName);
|
||||
|
||||
CComplexType *pCurr = GetComplexType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
if (pCurr->GetElementType() == XSD_COMPLEXTYPE)
|
||||
{
|
||||
pCurr->SetElementType(XSD_UNSUPPORTED);
|
||||
return SkipElement();
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
EmitError(IDS_SDL_INTERNAL);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CComplexTypeParser, OnComplexContent)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CComplexType *pCurr = GetComplexType();
|
||||
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
if (pCurr->GetElementType() == XSD_COMPLEXTYPE)
|
||||
{
|
||||
CContent *pElem = pCurr->AddContent();
|
||||
if (pElem != NULL)
|
||||
{
|
||||
SetXSDElementInfo(pElem, pCurr, GetLocator());
|
||||
pElem->SetElementType(XSD_COMPLEXCONTENT);
|
||||
|
||||
CAutoPtr<CContentParser> p( new CContentParser(GetReader(), this, GetLevel(), pElem) );
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
return p.Detach()->GetAttributes(pAttributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return OnUnrecognizedTag(wszNamespaceUri,
|
||||
cchNamespaceUri, wszLocalName, cchLocalName,
|
||||
wszQName, cchQName, pAttributes);
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CComplexTypeParser, OnName)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CComplexType * pCurr = GetComplexType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
if (pCurr->GetElementType() == XSD_COMPLEXTYPE)
|
||||
{
|
||||
hr = pCurr->SetName(wszValue, cchValue);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CComplexTypeParser, OnID)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CComplexType * pCurr = GetComplexType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetID(wszValue, cchValue);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CComplexTypeParser, OnAbstract)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CComplexType * pCurr = GetComplexType();
|
||||
if (pCurr != NULL && pCurr->GetElementType() == XSD_COMPLEXTYPE)
|
||||
{
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CComplexTypeParser, OnBase)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CComplexType * pCurr = GetComplexType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetBase(wszValue, cchValue);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CComplexTypeParser, OnBlock)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CComplexTypeParser, OnContent)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CComplexType * pCurr = GetComplexType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
if (pCurr->GetElementType() == XSD_COMPLEXTYPE)
|
||||
{
|
||||
hr = pCurr->SetContentType(wszValue, cchValue);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CComplexTypeParser, OnDerivedBy)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CComplexType * pCurr = GetComplexType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
if (pCurr->GetElementType() == XSD_COMPLEXTYPE)
|
||||
{
|
||||
if (FAILED(pCurr->SetDerivedBy(wszValue, cchValue)))
|
||||
{
|
||||
EmitInvalidValue("derivedBy", wszValue);
|
||||
hr = E_FAIL;
|
||||
}
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CComplexTypeParser, OnFinal)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CComplexType * pCurr = GetComplexType();
|
||||
if (pCurr != NULL && pCurr->GetElementType() == XSD_COMPLEXTYPE)
|
||||
{
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CComplexTypeParser::startPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix,
|
||||
const wchar_t *wszUri,
|
||||
int cchUri)
|
||||
{
|
||||
CComplexType * pCurr = GetComplexType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetNamespaceUri(wszPrefix, cchPrefix, wszUri, cchUri);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
//
|
||||
// ComplexTypeParser.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Parser.h"
|
||||
#include "Emit.h"
|
||||
#include "resource.h"
|
||||
|
||||
class CComplexType;
|
||||
|
||||
class CComplexTypeParser : public CParserBase
|
||||
{
|
||||
private:
|
||||
|
||||
CComplexType * m_pComplexType;
|
||||
|
||||
public:
|
||||
|
||||
inline CComplexTypeParser(ISAXXMLReader *pReader, CParserBase *pParent, DWORD dwLevel, CComplexType * pComplexType = NULL)
|
||||
:CParserBase(pReader, pParent, dwLevel), m_pComplexType(pComplexType)
|
||||
{
|
||||
}
|
||||
|
||||
inline CComplexType * GetComplexType()
|
||||
{
|
||||
return m_pComplexType;
|
||||
}
|
||||
|
||||
inline void SetComplexType(CComplexType * pComplexType)
|
||||
{
|
||||
m_pComplexType = pComplexType;
|
||||
}
|
||||
|
||||
inline void MarkUnsupported(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int nLine;
|
||||
int nCol;
|
||||
GetLocator()->getLineNumber(&nLine);
|
||||
GetLocator()->getColumnNumber(&nCol);
|
||||
ATLTRACE( _T("%sUnsupported tag@(%d, %d) : %.*ws -- skipping element\n"), GetTabs(GetLevel()),
|
||||
nLine, nCol,
|
||||
cchQName, wszQName );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
annotation, length, enumeration, pattern, scale, period, duration,
|
||||
maxLength, precision, minInclusive, minExclusive, maxInclusive,
|
||||
maxExclusive, minLength, encoding, element, group, all, choice,
|
||||
sequence, attribute, attributeGroup, anyAttribute
|
||||
*/
|
||||
BEGIN_XMLTAG_MAP()
|
||||
XMLTAG_ENTRY_EX("element", XSD_NAMESPACEA, OnElement)
|
||||
XMLTAG_ENTRY_EX("all", XSD_NAMESPACEA, OnAll)
|
||||
XMLTAG_ENTRY_EX("choice", XSD_NAMESPACEA, OnChoice)
|
||||
XMLTAG_ENTRY_EX("annotation", XSD_NAMESPACEA, OnAnnotation)
|
||||
XMLTAG_ENTRY_EX("length", XSD_NAMESPACEA, OnLength)
|
||||
XMLTAG_ENTRY_EX("enumeration", XSD_NAMESPACEA, OnEnumeration)
|
||||
XMLTAG_ENTRY_EX("pattern", XSD_NAMESPACEA, OnPattern)
|
||||
XMLTAG_ENTRY_EX("scale", XSD_NAMESPACEA, OnScale)
|
||||
XMLTAG_ENTRY_EX("period", XSD_NAMESPACEA, OnPeriod)
|
||||
XMLTAG_ENTRY_EX("duration", XSD_NAMESPACEA, OnDuration)
|
||||
XMLTAG_ENTRY_EX("maxLength", XSD_NAMESPACEA, OnMaxLength)
|
||||
XMLTAG_ENTRY_EX("precision", XSD_NAMESPACEA, OnPrecision)
|
||||
XMLTAG_ENTRY_EX("minInclusive", XSD_NAMESPACEA, OnMinInclusive)
|
||||
XMLTAG_ENTRY_EX("minExclusive", XSD_NAMESPACEA, OnMinExclusive)
|
||||
XMLTAG_ENTRY_EX("maxInclusive", XSD_NAMESPACEA, OnMaxInclusive)
|
||||
XMLTAG_ENTRY_EX("maxExclusive", XSD_NAMESPACEA, OnMaxExclusive)
|
||||
XMLTAG_ENTRY_EX("minLength", XSD_NAMESPACEA, OnMinLength)
|
||||
XMLTAG_ENTRY_EX("encoding", XSD_NAMESPACEA, OnEncoding)
|
||||
XMLTAG_ENTRY_EX("group", XSD_NAMESPACEA, OnGroup)
|
||||
XMLTAG_ENTRY_EX("sequence", XSD_NAMESPACEA, OnSequence)
|
||||
XMLTAG_ENTRY_EX("attribute", XSD_NAMESPACEA, OnAttribute)
|
||||
XMLTAG_ENTRY_EX("attributeGroup", XSD_NAMESPACEA, OnAttributeGroup)
|
||||
XMLTAG_ENTRY_EX("anyAttribute", XSD_NAMESPACEA, OnAnyAttribute)
|
||||
|
||||
// REVIEW: new ones
|
||||
XMLTAG_ENTRY_EX("complexContent", XSD_NAMESPACEA, OnComplexContent)
|
||||
XMLTAG_ENTRY_EX("simpleContent", XSD_NAMESPACEA, OnSimpleContent)
|
||||
XMLTAG_ENTRY_EX("any", XSD_NAMESPACEA, OnAny)
|
||||
END_XMLTAG_MAP()
|
||||
|
||||
|
||||
/*
|
||||
<complexType
|
||||
abstract = "boolean"
|
||||
base = "QName"
|
||||
block = "#all | subset of {extension, restriction}"
|
||||
content = "elementOnly | textOnly | mixed | empty"
|
||||
derivedBy = "extension | restriction"
|
||||
final = "#all | subset of {extension, restriction}"
|
||||
id = "ID"
|
||||
name ="NCName"
|
||||
>
|
||||
*/
|
||||
BEGIN_XMLATTR_MAP()
|
||||
XMLATTR_ENTRY("name", OnName)
|
||||
XMLATTR_ENTRY("id", OnID)
|
||||
XMLATTR_ENTRY("abstract", OnAbstract)
|
||||
XMLATTR_ENTRY("base", OnBase)
|
||||
XMLATTR_ENTRY("block", OnBlock)
|
||||
XMLATTR_ENTRY("content", OnContent)
|
||||
XMLATTR_ENTRY("derivedBy", OnDerivedBy)
|
||||
XMLATTR_ENTRY("final", OnFinal)
|
||||
END_XMLATTR_MAP()
|
||||
|
||||
TAG_METHOD_DECL(OnElement);
|
||||
TAG_METHOD_DECL(OnAll);
|
||||
TAG_METHOD_DECL(OnChoice);
|
||||
TAG_METHOD_DECL(OnAnnotation);
|
||||
TAG_METHOD_DECL(OnLength);
|
||||
TAG_METHOD_DECL(OnPattern);
|
||||
TAG_METHOD_DECL(OnEnumeration);
|
||||
TAG_METHOD_DECL(OnScale);
|
||||
TAG_METHOD_DECL(OnPeriod);
|
||||
TAG_METHOD_DECL(OnDuration);
|
||||
TAG_METHOD_DECL(OnMaxLength);
|
||||
TAG_METHOD_DECL(OnPrecision);
|
||||
TAG_METHOD_DECL(OnMinInclusive);
|
||||
TAG_METHOD_DECL(OnMinExclusive);
|
||||
TAG_METHOD_DECL(OnMaxInclusive);
|
||||
TAG_METHOD_DECL(OnMaxExclusive);
|
||||
TAG_METHOD_DECL(OnMinLength);
|
||||
TAG_METHOD_DECL(OnEncoding);
|
||||
TAG_METHOD_DECL(OnGroup);
|
||||
TAG_METHOD_DECL(OnSequence);
|
||||
TAG_METHOD_DECL(OnAttribute);
|
||||
TAG_METHOD_DECL(OnAttributeGroup);
|
||||
TAG_METHOD_DECL(OnAnyAttribute);
|
||||
|
||||
// new ones
|
||||
TAG_METHOD_DECL(OnComplexContent);
|
||||
TAG_METHOD_DECL(OnSimpleContent);
|
||||
TAG_METHOD_DECL(OnAny);
|
||||
|
||||
|
||||
ATTR_METHOD_DECL(OnName);
|
||||
ATTR_METHOD_DECL(OnID);
|
||||
ATTR_METHOD_DECL(OnAbstract);
|
||||
ATTR_METHOD_DECL(OnBase);
|
||||
ATTR_METHOD_DECL(OnBlock);
|
||||
ATTR_METHOD_DECL(OnContent);
|
||||
ATTR_METHOD_DECL(OnDerivedBy);
|
||||
ATTR_METHOD_DECL(OnFinal);
|
||||
|
||||
HRESULT __stdcall startPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix,
|
||||
const wchar_t *wszUri,
|
||||
int cchUri);
|
||||
};
|
||||
@@ -1,35 +0,0 @@
|
||||
//
|
||||
// Content.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Content.h"
|
||||
#include "Attribute.h"
|
||||
#include "Element.h" // required for CComplexType::m_elements.RemoveAll()
|
||||
#include "ComplexType.h"
|
||||
|
||||
CComplexType * CContent::AddType(CComplexType *pType)
|
||||
{
|
||||
if (pType == NULL)
|
||||
{
|
||||
pType = new CComplexType;
|
||||
}
|
||||
delete m_pType;
|
||||
m_pType = pType;
|
||||
|
||||
return m_pType;
|
||||
}
|
||||
|
||||
CComplexType * CContent::GetType()
|
||||
{
|
||||
return m_pType;
|
||||
}
|
||||
|
||||
CContent::~CContent()
|
||||
{
|
||||
delete m_pType;
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
//
|
||||
// Content.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
// CContent represents the complexContent and the simpleContent
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "XSDElement.h"
|
||||
#include "QName.h"
|
||||
#include "Util.h"
|
||||
|
||||
class CComplexType;
|
||||
|
||||
class CContent : public CXSDElement
|
||||
{
|
||||
private:
|
||||
|
||||
// restriction/extension
|
||||
CComplexType * m_pType;
|
||||
|
||||
BOOL m_bMixed;
|
||||
CStringW m_strID;
|
||||
|
||||
protected:
|
||||
|
||||
public:
|
||||
|
||||
CContent()
|
||||
:m_pType(NULL), m_bMixed(FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
CComplexType * AddType(CComplexType *pContent = NULL);
|
||||
|
||||
CComplexType * GetType();
|
||||
|
||||
~CContent();
|
||||
|
||||
inline HRESULT SetID(const wchar_t *wsz, int cch)
|
||||
{
|
||||
m_strID.SetString(wsz, cch);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetID(const CStringW& strID)
|
||||
{
|
||||
m_strID = strID;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetMixed(const wchar_t *wszValue, int cchValue)
|
||||
{
|
||||
bool bVal;
|
||||
HRESULT hr = GetBooleanValue(&bVal, wszValue, cchValue);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
m_bMixed = (bVal == true) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
// unknown string
|
||||
return hr;
|
||||
}
|
||||
|
||||
inline HRESULT SetMixed(BOOL bMixed)
|
||||
{
|
||||
m_bMixed = bMixed;
|
||||
}
|
||||
|
||||
inline BOOL GetMixed()
|
||||
{
|
||||
return m_bMixed;
|
||||
}
|
||||
}; // class CContent
|
||||
@@ -1,104 +0,0 @@
|
||||
//
|
||||
// ContentParser.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ContentParser.h"
|
||||
#include "Content.h"
|
||||
#include "Attribute.h"
|
||||
#include "ComplexTypeParser.h"
|
||||
#include "Element.h"
|
||||
#include "ComplexType.h"
|
||||
|
||||
// CContentParser parses the simpleContent tag and the complexContent tag
|
||||
|
||||
TAG_METHOD_IMPL(CContentParser, OnAnnotation)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CContentParser, OnRestriction)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CContent *pCurr = GetContent();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
CComplexType * pElem = pCurr->AddType();
|
||||
if (pElem != NULL)
|
||||
{
|
||||
pElem->SetElementType(XSD_RESTRICTION);
|
||||
SetXSDElementInfo(pElem, pCurr, GetLocator());
|
||||
|
||||
CAutoPtr<CComplexTypeParser> p( new CComplexTypeParser(GetReader(), this, GetLevel(), pElem) );
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
return p.Detach()->GetAttributes(pAttributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CContentParser, OnExtension)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
int nLine = 0;
|
||||
int nCol = 0;
|
||||
GetLocator()->getLineNumber(&nLine);
|
||||
GetLocator()->getColumnNumber(&nCol);
|
||||
|
||||
CContent *pCurr = GetContent();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
EmitFileError(IDS_SDL_BASE_EXTENSION,
|
||||
(LPCWSTR) pCurr->GetParentDocument()->GetDocumentUri(),
|
||||
nLine, nCol, 0);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CContentParser, OnMixed)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CContent *pCurr = GetContent();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
if (SUCCEEDED(pCurr->SetMixed(wszValue, cchValue)))
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
EmitInvalidValue("mixed", wszValue);
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CContentParser, OnID)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CContent *pCurr = GetContent();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetID(wszValue, cchValue);
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
//
|
||||
// ContentParser.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Parser.h"
|
||||
#include "Emit.h"
|
||||
#include "resource.h"
|
||||
|
||||
// CContentParser parses the simpleContent tag and the complexContent tag
|
||||
|
||||
class CContent;
|
||||
|
||||
class CContentParser : public CParserBase
|
||||
{
|
||||
private:
|
||||
|
||||
CContent *m_pContent;
|
||||
|
||||
public:
|
||||
|
||||
inline CContentParser(ISAXXMLReader *pReader, CParserBase *pParent, DWORD dwLevel, CContent *pContent = NULL)
|
||||
:CParserBase(pReader, pParent, dwLevel), m_pContent(pContent)
|
||||
{
|
||||
}
|
||||
|
||||
inline CContent * GetContent()
|
||||
{
|
||||
return m_pContent;
|
||||
}
|
||||
|
||||
inline CContent * SetContent(CContent *pContent)
|
||||
{
|
||||
m_pContent = pContent;
|
||||
}
|
||||
|
||||
/*
|
||||
<complexContent
|
||||
id = ID
|
||||
mixed = boolean
|
||||
{any attributes with non-schema namespace . . .}>
|
||||
Content: (annotation? , (restriction | extension))
|
||||
</complexContent>
|
||||
|
||||
<simpleContent
|
||||
id = ID
|
||||
{any attributes with non-schema namespace . . .}>
|
||||
Content: (annotation? , (restriction | extension))
|
||||
</simpleContent>
|
||||
*/
|
||||
BEGIN_XMLTAG_MAP()
|
||||
XMLTAG_ENTRY_EX("annotation", XSD_NAMESPACEA, OnAnnotation)
|
||||
XMLTAG_ENTRY_EX("restriction", XSD_NAMESPACEA, OnRestriction)
|
||||
XMLTAG_ENTRY_EX("extension", XSD_NAMESPACEA, OnExtension)
|
||||
END_XMLTAG_MAP()
|
||||
|
||||
BEGIN_XMLATTR_MAP()
|
||||
XMLATTR_ENTRY("mixed", OnMixed)
|
||||
XMLATTR_ENTRY("id", OnID)
|
||||
END_XMLATTR_MAP()
|
||||
|
||||
TAG_METHOD_DECL(OnAnnotation);
|
||||
TAG_METHOD_DECL(OnRestriction);
|
||||
TAG_METHOD_DECL(OnExtension);
|
||||
|
||||
ATTR_METHOD_DECL(OnMixed);
|
||||
ATTR_METHOD_DECL(OnID);
|
||||
};
|
||||
|
||||
typedef CContentParser CComplexContentParser;
|
||||
typedef CContentParser CSimpleContentParser;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,853 +0,0 @@
|
||||
//
|
||||
// CppCodeGenerator.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "CodeTypes.h"
|
||||
|
||||
struct CXSDEntry
|
||||
{
|
||||
char * szType;
|
||||
int cchType;
|
||||
char * szCppType;
|
||||
int cchCppType;
|
||||
};
|
||||
|
||||
extern bool g_bUseWchar_t;
|
||||
|
||||
#define DECLARE_XSD_ENTRY(__name, __cppType) \
|
||||
{ __name, sizeof(__name)-1, __cppType, sizeof(__cppType)-1 },
|
||||
|
||||
extern __declspec(selectany) const CXSDEntry g_soapTypes[] =
|
||||
{
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_BOOLEAN", "bool")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_FLOAT", "float")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_DOUBLE", "double")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_DECIMAL", "double")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_DURATION", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_HEXBINARY", "ATLSOAP_BLOB")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_BASE64BINARY", "ATLSOAP_BLOB")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_ANYURI", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_ID", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_IDREF", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_ENTITY", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_NOTATION", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_QNAME", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_NORMALIZEDSTRING", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_TOKEN", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_LANGUAGE", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_IDREFS", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_ENTITIES", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_NMTOKEN", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_NMTOKENS", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_NAME", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_NCNAME", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_INTEGER", "__int64")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_NONPOSITIVEINTEGER", "__int64")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_NEGATIVEINTEGER", "__int64")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_LONG", "__int64")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_INT", "int")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_SHORT", "short")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_BYTE", "char")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_NONNEGATIVEINTEGER", "unsigned __int64")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_UNSIGNEDLONG", "unsigned __int64")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_UNSIGNEDINT", "unsigned int")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_UNSIGNEDSHORT", "wchar_t")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_UNSIGNEDBYTE", "unsigned char")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_POSITIVEINTEGER", "unsigned __int64")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_DATETIME", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_TIME", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_DATE", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_GMONTH", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_GYEARMONTH", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_GYEAR", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_GMONTHDAY", "BSTR")
|
||||
DECLARE_XSD_ENTRY("SOAPTYPE_STRING", "BSTR") // DECLARE_XSD_ENTRY("SOAPTYPE_GDAY", "BSTR")
|
||||
};
|
||||
|
||||
class CCppCodeGenerator :
|
||||
public ITagReplacerImpl<CCppCodeGenerator>,
|
||||
public CComObjectRootEx<CComSingleThreadModel>
|
||||
{
|
||||
public:
|
||||
|
||||
BEGIN_COM_MAP(CCppCodeGenerator)
|
||||
COM_INTERFACE_ENTRY(IUnknown)
|
||||
COM_INTERFACE_ENTRY(ITagReplacer)
|
||||
END_COM_MAP()
|
||||
|
||||
private:
|
||||
|
||||
CCodeProxy *m_pProxy;
|
||||
|
||||
POSITION m_currFunctionPos;
|
||||
POSITION m_currParameterPos;
|
||||
POSITION m_currStructPos;
|
||||
POSITION m_currStructFieldPos;
|
||||
POSITION m_currEnumPos;
|
||||
POSITION m_currEnumFieldPos;
|
||||
POSITION m_currMemberPos;
|
||||
POSITION m_currHeaderPos;
|
||||
|
||||
CWriteStreamHelper m_writeHelper;
|
||||
|
||||
// generic counter
|
||||
int m_nCntr;
|
||||
|
||||
// function counter
|
||||
int m_nFuncIndex;
|
||||
|
||||
bool m_bPragma;
|
||||
bool m_bEmitNamespace;
|
||||
bool m_bGenProxy;
|
||||
|
||||
const char *m_szNamespace;
|
||||
|
||||
protected:
|
||||
|
||||
public:
|
||||
|
||||
CCppCodeGenerator(CCodeProxy *pProxy = NULL)
|
||||
: m_pProxy(pProxy),
|
||||
m_currFunctionPos(NULL),
|
||||
m_currParameterPos(NULL),
|
||||
m_currStructPos(NULL),
|
||||
m_currStructFieldPos(NULL),
|
||||
m_currEnumPos(NULL),
|
||||
m_currEnumFieldPos(NULL),
|
||||
m_currMemberPos(NULL),
|
||||
m_currHeaderPos(NULL),
|
||||
m_nCntr(0),
|
||||
m_nFuncIndex(-1),
|
||||
m_bPragma(true),
|
||||
m_bEmitNamespace(true),
|
||||
m_szNamespace(NULL),
|
||||
m_bGenProxy(true)
|
||||
{
|
||||
}
|
||||
|
||||
HTTP_CODE WriteCString(const CStringA& str)
|
||||
{
|
||||
CStringA strTemp(str);
|
||||
strTemp.Replace("\\", "\\\\");
|
||||
strTemp.Replace("\"", "\\\"");
|
||||
strTemp.Replace("?", "\\?");
|
||||
strTemp.Replace("\r", "\\r");
|
||||
strTemp.Replace("\t", "\\t");
|
||||
strTemp.Replace("\'", "\\\'");
|
||||
strTemp.Replace("\n", "\\n");
|
||||
return (m_pStream->WriteStream((LPCSTR) strTemp, strTemp.GetLength(), NULL) == S_OK) ? HTTP_SUCCESS : HTTP_FAIL;
|
||||
}
|
||||
|
||||
HTTP_CODE WriteCString(const CStringW& str)
|
||||
{
|
||||
CStringA strTemp(str);
|
||||
return WriteCString(strTemp);
|
||||
}
|
||||
|
||||
inline ULONG AtlSoapHashStr(const wchar_t * sz)
|
||||
{
|
||||
ULONG nHash = 0;
|
||||
while (*sz != 0)
|
||||
{
|
||||
nHash = (nHash<<5)+nHash+(*sz);
|
||||
sz++;
|
||||
}
|
||||
|
||||
return nHash;
|
||||
}
|
||||
|
||||
HTTP_CODE WriteHash(ULONG nHash)
|
||||
{
|
||||
char szBuf[256];
|
||||
int nLen = sprintf(szBuf, "0x%.8X", nHash);
|
||||
return (m_pStream->WriteStream(szBuf, nLen, NULL) == S_OK) ? HTTP_SUCCESS : HTTP_FAIL;
|
||||
}
|
||||
|
||||
HTTP_CODE GetHashW(LPCSTR szStr)
|
||||
{
|
||||
return WriteHash(AtlSoapHashStr( CA2W(szStr) ));
|
||||
}
|
||||
|
||||
HTTP_CODE GetHashW(LPCWSTR szStr)
|
||||
{
|
||||
return WriteHash(AtlSoapHashStr( szStr ));
|
||||
}
|
||||
|
||||
CCodeEnum * GetCurrentEnum()
|
||||
{
|
||||
POSITION pos = m_currEnumPos;
|
||||
CCodeEnum *p = m_pProxy->GetNextEnum(pos);
|
||||
|
||||
ATLASSERT( p != NULL );
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
CCodeTypedElement * GetCurrentEnumElement()
|
||||
{
|
||||
CCodeEnum * p = GetCurrentEnum();
|
||||
|
||||
POSITION pos = m_currEnumFieldPos;
|
||||
CCodeTypedElement *pElem = p->GetNextElement(pos);
|
||||
|
||||
ATLASSERT( pElem != NULL );
|
||||
|
||||
return pElem;
|
||||
}
|
||||
|
||||
CCodeStruct * GetCurrentStruct()
|
||||
{
|
||||
POSITION pos = m_currStructPos;
|
||||
CCodeStruct *p = m_pProxy->GetNextStruct(pos);
|
||||
|
||||
ATLASSERT( p != NULL );
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
CCodeTypedElement * GetCurrentStructField()
|
||||
{
|
||||
CCodeStruct * p = GetCurrentStruct();
|
||||
|
||||
POSITION pos = m_currStructFieldPos;
|
||||
CCodeTypedElement *pElem = p->GetNextElement(pos);
|
||||
|
||||
ATLASSERT( pElem != NULL );
|
||||
|
||||
return pElem;
|
||||
}
|
||||
|
||||
CCodeTypedElement * GetCurrentMember()
|
||||
{
|
||||
POSITION pos = m_currMemberPos;
|
||||
CCodeTypedElement *p = m_pProxy->GetNextHeader(pos);
|
||||
|
||||
ATLASSERT( p != NULL );
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
HTTP_CODE IsFixedArray(CCodeTypedElement *p)
|
||||
{
|
||||
if (p->GetDims() != 0)
|
||||
{
|
||||
return HTTP_SUCCESS;
|
||||
}
|
||||
return HTTP_S_FALSE;
|
||||
}
|
||||
|
||||
HTTP_CODE GetDimsDecl(CCodeTypedElement *p)
|
||||
{
|
||||
if (p->GetDims() != 0)
|
||||
{
|
||||
m_pStream->WriteStream("{", 1, NULL);
|
||||
for (int i=0; i<=p->GetDimension(0); i++)
|
||||
{
|
||||
if ((m_writeHelper.Write(p->GetDimension(i)) == FALSE) ||
|
||||
(S_OK != m_pStream->WriteStream(", ", 2, NULL)))
|
||||
{
|
||||
return HTTP_FAIL;
|
||||
}
|
||||
}
|
||||
m_pStream->WriteStream("}", 1, NULL);
|
||||
}
|
||||
|
||||
return HTTP_SUCCESS;
|
||||
}
|
||||
|
||||
HTTP_CODE GetAtlSoapType(CCodeTypedElement *p)
|
||||
{
|
||||
XSDTYPE xsdType = p->GetXSDType();
|
||||
|
||||
ATLASSERT( xsdType != XSDTYPE_ERR );
|
||||
|
||||
if (xsdType != XSDTYPE_UNK)
|
||||
{
|
||||
if (SUCCEEDED(m_pStream->WriteStream(
|
||||
g_soapTypes[xsdType].szType,
|
||||
g_soapTypes[xsdType].cchType, NULL)))
|
||||
{
|
||||
return HTTP_SUCCESS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SUCCEEDED(m_pStream->WriteStream("SOAPTYPE_UNK", sizeof("SOAPTYPE_UNK")-1, NULL)))
|
||||
{
|
||||
return HTTP_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return HTTP_FAIL;
|
||||
}
|
||||
|
||||
HTTP_CODE IsUDT(CCodeTypedElement *p)
|
||||
{
|
||||
ATLASSERT( p != NULL );
|
||||
ATLASSERT( p->GetXSDType() != XSDTYPE_ERR );
|
||||
|
||||
if (p->GetXSDType() != XSDTYPE_UNK)
|
||||
{
|
||||
return HTTP_S_FALSE;
|
||||
}
|
||||
return HTTP_SUCCESS;
|
||||
}
|
||||
|
||||
CCodeFunction * GetCurrentFunction()
|
||||
{
|
||||
POSITION pos = m_currFunctionPos;
|
||||
CCodeFunction *p = m_pProxy->GetNextFunction(pos);
|
||||
|
||||
ATLASSERT( p != NULL );
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
CCodeTypedElement * GetCurrentParameter()
|
||||
{
|
||||
CCodeFunction * p = GetCurrentFunction();
|
||||
|
||||
POSITION pos = m_currParameterPos;
|
||||
CCodeTypedElement *pElem = p->GetNextElement(pos);
|
||||
|
||||
ATLASSERT( pElem != NULL );
|
||||
|
||||
return pElem;
|
||||
}
|
||||
|
||||
CCodeTypedElement * GetCurrentHeader()
|
||||
{
|
||||
CCodeFunction * p = GetCurrentFunction();
|
||||
|
||||
POSITION pos = m_currHeaderPos;
|
||||
CCodeTypedElement *pElem = p->GetNextHeader(pos);
|
||||
|
||||
ATLASSERT( pElem != NULL );
|
||||
|
||||
return pElem;
|
||||
}
|
||||
|
||||
HTTP_CODE GetCppType(CCodeTypedElement *p)
|
||||
{
|
||||
XSDTYPE xsdType = p->GetXSDType();
|
||||
|
||||
ATLASSERT( xsdType != XSDTYPE_ERR );
|
||||
|
||||
if (xsdType != XSDTYPE_UNK)
|
||||
{
|
||||
if (!g_bUseWchar_t && xsdType == XSDTYPE_UNSIGNEDSHORT)
|
||||
{
|
||||
if (SUCCEEDED(m_pStream->WriteStream(
|
||||
"unsigned short",
|
||||
sizeof("unsigned short")-1, NULL)))
|
||||
{
|
||||
return HTTP_SUCCESS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SUCCEEDED(m_pStream->WriteStream(
|
||||
g_soapTypes[xsdType].szCppType,
|
||||
g_soapTypes[xsdType].cchCppType, NULL)))
|
||||
{
|
||||
return HTTP_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return WriteCString(p->GetCodeTypeName());
|
||||
}
|
||||
|
||||
return HTTP_FAIL;
|
||||
}
|
||||
|
||||
HTTP_CODE GetSafeCppType(CCodeTypedElement *p)
|
||||
{
|
||||
XSDTYPE xsdType = p->GetXSDType();
|
||||
|
||||
ATLASSERT( xsdType != XSDTYPE_ERR );
|
||||
|
||||
if (xsdType != XSDTYPE_UNK)
|
||||
{
|
||||
if (!g_bUseWchar_t && xsdType == XSDTYPE_UNSIGNEDSHORT)
|
||||
{
|
||||
if (SUCCEEDED(m_pStream->WriteStream(
|
||||
"unsigned short",
|
||||
sizeof("unsigned short")-1, NULL)))
|
||||
{
|
||||
return HTTP_SUCCESS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SUCCEEDED(m_pStream->WriteStream(
|
||||
g_soapTypes[xsdType].szCppType,
|
||||
g_soapTypes[xsdType].cchCppType, NULL)))
|
||||
{
|
||||
return HTTP_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return WriteCString(p->GetSafeCodeTypeName());
|
||||
}
|
||||
|
||||
return HTTP_FAIL;
|
||||
}
|
||||
|
||||
HTTP_CODE GetTypeSuffix(CCodeTypedElement *p)
|
||||
{
|
||||
if (p->GetDims() == 0)
|
||||
{
|
||||
return HTTP_SUCCESS;
|
||||
}
|
||||
|
||||
HTTP_CODE hcErr = HTTP_SUCCESS;
|
||||
for (int i=1; (i<=p->GetDimension(0)) && (hcErr == HTTP_SUCCESS); i++)
|
||||
{
|
||||
hcErr = HTTP_FAIL;
|
||||
if (SUCCEEDED(m_pStream->WriteStream("[", 1, NULL)))
|
||||
{
|
||||
if (m_writeHelper.Write(p->GetDimension(i)) != FALSE)
|
||||
{
|
||||
m_pStream->WriteStream("]", 1, NULL);
|
||||
hcErr = HTTP_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return hcErr;
|
||||
}
|
||||
|
||||
HTTP_CODE OnGetNextEnum();
|
||||
HTTP_CODE OnGetEnumSafeQName();
|
||||
HTTP_CODE OnGetNextEnumElement();
|
||||
HTTP_CODE OnGetEnumElementHashW();
|
||||
HTTP_CODE OnGetEnumElementName();
|
||||
HTTP_CODE OnGetEnumElementValue();
|
||||
HTTP_CODE OnResetCounter();
|
||||
HTTP_CODE OnGetEnumNameHashW();
|
||||
HTTP_CODE OnGetEnumName();
|
||||
HTTP_CODE OnGetEnumQName();
|
||||
HTTP_CODE OnGetEnumCppName();
|
||||
HTTP_CODE OnGetEnumSafeCppQName();
|
||||
HTTP_CODE OnGetEnumElementCppName();
|
||||
HTTP_CODE OnGetEnumCppQName();
|
||||
|
||||
HTTP_CODE OnGetNextStruct();
|
||||
HTTP_CODE OnGetStructSafeQName();
|
||||
HTTP_CODE OnGetNextStructField();
|
||||
HTTP_CODE OnGetStructFieldType();
|
||||
HTTP_CODE OnGetStructFieldSuffix();
|
||||
HTTP_CODE OnGetStructSafeCppQName();
|
||||
HTTP_CODE OnGetStructFieldCppType();
|
||||
|
||||
HTTP_CODE OnIsFieldNullable();
|
||||
|
||||
HTTP_CODE OnIsFieldFixedArray();
|
||||
HTTP_CODE OnGetStructFieldName();
|
||||
HTTP_CODE OnGetStructFieldDimsDecl();
|
||||
HTTP_CODE OnGetStructFieldHashW();
|
||||
HTTP_CODE OnGetStructFieldAtlSoapType();
|
||||
HTTP_CODE OnGetStructQName();
|
||||
HTTP_CODE OnIsFieldUDT();
|
||||
HTTP_CODE OnGetStructFieldTypeSafeQName();
|
||||
HTTP_CODE OnGetStructNameHashW();
|
||||
HTTP_CODE OnGetStructName();
|
||||
HTTP_CODE OnGetStructFieldCount();
|
||||
HTTP_CODE OnGetStructFieldCppName();
|
||||
HTTP_CODE OnGetStructCppQName();
|
||||
HTTP_CODE OnGetStructCppName();
|
||||
HTTP_CODE OnGetStructFieldTypeSafeCppQName();
|
||||
|
||||
HTTP_CODE OnGetNextFunction();
|
||||
HTTP_CODE OnGetNextParameter();
|
||||
|
||||
HTTP_CODE OnIsParameterNullable();
|
||||
|
||||
HTTP_CODE OnIsParameterFixedArray();
|
||||
HTTP_CODE OnGetClassSafeQName();
|
||||
HTTP_CODE OnGetFunctionName();
|
||||
HTTP_CODE OnGetParameterName();
|
||||
HTTP_CODE OnGetParameterNameRaw();
|
||||
HTTP_CODE OnGetParameterDimsDecl();
|
||||
HTTP_CODE OnGetParameterType();
|
||||
HTTP_CODE OnIsParameterDynamicArray();
|
||||
HTTP_CODE OnGetParameterSuffix();
|
||||
HTTP_CODE OnIsInParameter();
|
||||
HTTP_CODE OnHasRetval();
|
||||
HTTP_CODE OnGetRetval();
|
||||
HTTP_CODE OnGetParameterHashW();
|
||||
HTTP_CODE OnGetFunctionCppName();
|
||||
HTTP_CODE OnGetParameterCppName();
|
||||
HTTP_CODE OnGetParameterCppType();
|
||||
|
||||
HTTP_CODE OnGetParameterAtlSoapType();
|
||||
HTTP_CODE OnIsOutParameter();
|
||||
HTTP_CODE OnIsParameterUDT();
|
||||
|
||||
HTTP_CODE OnGetParameterTypeQName();
|
||||
HTTP_CODE OnGetSizeIsIndex();
|
||||
HTTP_CODE OnGetCurrentParameterIndex();
|
||||
HTTP_CODE OnResetParameterIndex();
|
||||
HTTP_CODE OnNotIsRetval();
|
||||
HTTP_CODE OnGetFunctionNameHashW();
|
||||
HTTP_CODE OnGetFunctionResultNameHashW();
|
||||
HTTP_CODE OnGetFunctionResultName();
|
||||
HTTP_CODE OnGetFunctionSendName();
|
||||
HTTP_CODE OnGetExpectedParameterCount();
|
||||
HTTP_CODE OnGetParameterTypeCppQName();
|
||||
|
||||
HTTP_CODE OnIsPAD();
|
||||
HTTP_CODE OnIsChain();
|
||||
HTTP_CODE OnIsPID();
|
||||
HTTP_CODE OnIsDocument();
|
||||
HTTP_CODE OnIsRpc();
|
||||
HTTP_CODE OnIsLiteral();
|
||||
HTTP_CODE OnIsEncoded();
|
||||
HTTP_CODE OnIsOneWay();
|
||||
|
||||
HTTP_CODE OnGetClassName();
|
||||
HTTP_CODE OnNotIsParameterFixedArray();
|
||||
HTTP_CODE OnNotIsLastParameter();
|
||||
HTTP_CODE OnGetParameterFixedArraySize();
|
||||
HTTP_CODE OnGetDateTime();
|
||||
HTTP_CODE OnGetURL();
|
||||
HTTP_CODE OnGetSoapAction();
|
||||
HTTP_CODE OnGetNamespace();
|
||||
HTTP_CODE OnEmitNamespace();
|
||||
HTTP_CODE OnGetCppNamespace();
|
||||
HTTP_CODE OnClassHasHeaders();
|
||||
HTTP_CODE OnGetNextMember();
|
||||
HTTP_CODE OnGetMemberType();
|
||||
HTTP_CODE OnGetMemberName();
|
||||
HTTP_CODE OnGetMemberSuffix();
|
||||
HTTP_CODE OnIsMemberFixedArray();
|
||||
HTTP_CODE OnIsMemberUDT();
|
||||
HTTP_CODE OnIsMemberEnum();
|
||||
HTTP_CODE OnGetMemberCppType();
|
||||
HTTP_CODE OnGetMemberCppName();
|
||||
|
||||
HTTP_CODE OnGetNextHeader();
|
||||
HTTP_CODE OnIsHeaderFixedArray();
|
||||
HTTP_CODE OnGetHeaderValue();
|
||||
HTTP_CODE OnGetHeaderDimsDecl();
|
||||
HTTP_CODE OnGetHeaderHashW();
|
||||
HTTP_CODE OnGetHeaderAtlSoapType();
|
||||
HTTP_CODE OnGetHeaderCppValue();
|
||||
|
||||
HTTP_CODE OnIsHeaderNullable();
|
||||
HTTP_CODE OnIsInHeader();
|
||||
HTTP_CODE OnIsOutHeader();
|
||||
HTTP_CODE OnIsRequiredHeader();
|
||||
HTTP_CODE OnIsHeaderUDT();
|
||||
HTTP_CODE OnGetHeaderTypeQName();
|
||||
HTTP_CODE OnGetExpectedHeaderCount();
|
||||
HTTP_CODE OnHeaderHasNamespace();
|
||||
HTTP_CODE OnGetHeaderNamespace();
|
||||
HTTP_CODE OnGetHeaderNamespaceHashW();
|
||||
|
||||
|
||||
HTTP_CODE OnGetFunctionIndex();
|
||||
HTTP_CODE OnEmitPragma();
|
||||
HTTP_CODE OnGetEnumNamespaceHashW();
|
||||
HTTP_CODE OnEnumHasUniqueNamespace();
|
||||
HTTP_CODE OnGetEnumNamespace();
|
||||
HTTP_CODE OnGetStructNamespaceHashW();
|
||||
HTTP_CODE OnStructHasUniqueNamespace();
|
||||
HTTP_CODE OnGetStructNamespace();
|
||||
HTTP_CODE OnGetFunctionNamespaceHashW();
|
||||
HTTP_CODE OnGetFunctionNamespace();
|
||||
HTTP_CODE OnGetHeaderTypeCppQName();
|
||||
|
||||
HTTP_CODE OnIsFieldDynamicArray();
|
||||
HTTP_CODE OnIsFieldDynamicArrayWrapper();
|
||||
HTTP_CODE OnIsFieldSizeIs();
|
||||
HTTP_CODE OnFieldHasSizeIs();
|
||||
HTTP_CODE OnGetFieldSizeIsName();
|
||||
HTTP_CODE OnGetFieldSizeIsIndex();
|
||||
HTTP_CODE OnGetCurrentFieldIndex();
|
||||
|
||||
HTTP_CODE OnGenProxy();
|
||||
|
||||
BEGIN_REPLACEMENT_METHOD_MAP(CCppCodeGenerator)
|
||||
REPLACEMENT_METHOD_ENTRY("GetNextEnum", OnGetNextEnum)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumSafeQName", OnGetEnumSafeQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetNextEnumElement", OnGetNextEnumElement)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumElementHashW", OnGetEnumElementHashW)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumElementName", OnGetEnumElementName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumElementValue", OnGetEnumElementValue)
|
||||
REPLACEMENT_METHOD_ENTRY("ResetCounter", OnResetCounter)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumNameHashW", OnGetEnumNameHashW)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumName", OnGetEnumName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumQName", OnGetEnumQName)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("GetNextStruct", OnGetNextStruct)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructSafeQName", OnGetStructSafeQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetNextStructField", OnGetNextStructField)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldType", OnGetStructFieldType)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldSuffix", OnGetStructFieldSuffix)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("IsFieldNullable", OnIsFieldNullable)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("IsFieldFixedArray", OnIsFieldFixedArray)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldName", OnGetStructFieldName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldDimsDecl", OnGetStructFieldDimsDecl)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldHashW", OnGetStructFieldHashW)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldName", OnGetStructFieldName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldAtlSoapType", OnGetStructFieldAtlSoapType)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructQName", OnGetStructQName)
|
||||
REPLACEMENT_METHOD_ENTRY("IsFieldUDT", OnIsFieldUDT)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldTypeSafeQName", OnGetStructFieldTypeSafeQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructNameHashW", OnGetStructNameHashW)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructName", OnGetStructName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldCount", OnGetStructFieldCount)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("GetNextFunction", OnGetNextFunction)
|
||||
REPLACEMENT_METHOD_ENTRY("GetNextParameter", OnGetNextParameter)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("IsParameterNullable", OnIsParameterNullable)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("IsParameterFixedArray", OnIsParameterFixedArray)
|
||||
REPLACEMENT_METHOD_ENTRY("GetClassSafeQName", OnGetClassSafeQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetFunctionName", OnGetFunctionName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterName", OnGetParameterName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterNameRaw", OnGetParameterNameRaw)
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterDimsDecl", OnGetParameterDimsDecl)
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterType", OnGetParameterType)
|
||||
REPLACEMENT_METHOD_ENTRY("IsParameterDynamicArray", OnIsParameterDynamicArray)
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterSuffix", OnGetParameterSuffix)
|
||||
REPLACEMENT_METHOD_ENTRY("IsInParameter", OnIsInParameter)
|
||||
REPLACEMENT_METHOD_ENTRY("HasRetval", OnHasRetval)
|
||||
REPLACEMENT_METHOD_ENTRY("GetRetval", OnGetRetval)
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterHashW", OnGetParameterHashW)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterAtlSoapType", OnGetParameterAtlSoapType)
|
||||
REPLACEMENT_METHOD_ENTRY("IsOutParameter", OnIsOutParameter)
|
||||
REPLACEMENT_METHOD_ENTRY("IsParameterUDT", OnIsParameterUDT)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterTypeQName", OnGetParameterTypeQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetSizeIsIndex", OnGetSizeIsIndex)
|
||||
REPLACEMENT_METHOD_ENTRY("GetCurrentParameterIndex", OnGetCurrentParameterIndex)
|
||||
REPLACEMENT_METHOD_ENTRY("ResetParameterIndex", OnResetParameterIndex)
|
||||
REPLACEMENT_METHOD_ENTRY("NotIsRetval", OnNotIsRetval)
|
||||
REPLACEMENT_METHOD_ENTRY("GetFunctionNameHashW", OnGetFunctionNameHashW)
|
||||
REPLACEMENT_METHOD_ENTRY("GetFunctionResultNameHashW", OnGetFunctionResultNameHashW)
|
||||
REPLACEMENT_METHOD_ENTRY("GetFunctionResultName", OnGetFunctionResultName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetFunctionSendName", OnGetFunctionSendName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetExpectedParameterCount", OnGetExpectedParameterCount)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("IsPAD", OnIsPAD)
|
||||
REPLACEMENT_METHOD_ENTRY("IsChain", OnIsChain)
|
||||
REPLACEMENT_METHOD_ENTRY("IsPID", OnIsPID)
|
||||
REPLACEMENT_METHOD_ENTRY("IsDocument", OnIsDocument)
|
||||
REPLACEMENT_METHOD_ENTRY("IsRpc", OnIsRpc)
|
||||
REPLACEMENT_METHOD_ENTRY("IsLiteral", OnIsLiteral)
|
||||
REPLACEMENT_METHOD_ENTRY("IsEncoded", OnIsEncoded)
|
||||
REPLACEMENT_METHOD_ENTRY("IsOneWay", OnIsOneWay)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("GetClassName", OnGetClassName)
|
||||
REPLACEMENT_METHOD_ENTRY("NotIsParameterFixedArray", OnNotIsParameterFixedArray)
|
||||
REPLACEMENT_METHOD_ENTRY("NotIsLastParameter", OnNotIsLastParameter)
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterFixedArraySize", OnGetParameterFixedArraySize)
|
||||
REPLACEMENT_METHOD_ENTRY("GetSoapAction", OnGetSoapAction)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("GetDateTime", OnGetDateTime)
|
||||
REPLACEMENT_METHOD_ENTRY("GetURL", OnGetURL)
|
||||
REPLACEMENT_METHOD_ENTRY("GetNamespace", OnGetNamespace)
|
||||
REPLACEMENT_METHOD_ENTRY("EmitNamespace", OnEmitNamespace)
|
||||
REPLACEMENT_METHOD_ENTRY("GetCppNamespace", OnGetCppNamespace)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("ClassHasHeaders", OnClassHasHeaders)
|
||||
REPLACEMENT_METHOD_ENTRY("GetNextMember", OnGetNextMember)
|
||||
REPLACEMENT_METHOD_ENTRY("GetMemberType", OnGetMemberType)
|
||||
REPLACEMENT_METHOD_ENTRY("GetMemberName", OnGetMemberName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetMemberSuffix", OnGetMemberSuffix)
|
||||
REPLACEMENT_METHOD_ENTRY("IsMemberFixedArray", OnIsMemberFixedArray)
|
||||
REPLACEMENT_METHOD_ENTRY("IsMemberUDT", OnIsMemberUDT)
|
||||
REPLACEMENT_METHOD_ENTRY("IsMemberEnum", OnIsMemberEnum)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("GetNextHeader", OnGetNextHeader)
|
||||
REPLACEMENT_METHOD_ENTRY("IsHeaderFixedArray", OnIsHeaderFixedArray)
|
||||
REPLACEMENT_METHOD_ENTRY("GetHeaderValue", OnGetHeaderValue)
|
||||
REPLACEMENT_METHOD_ENTRY("GetHeaderDimsDecl", OnGetHeaderDimsDecl)
|
||||
REPLACEMENT_METHOD_ENTRY("GetHeaderHashW", OnGetHeaderHashW)
|
||||
REPLACEMENT_METHOD_ENTRY("GetHeaderAtlSoapType", OnGetHeaderAtlSoapType)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("IsHeaderNullable", OnIsHeaderNullable)
|
||||
REPLACEMENT_METHOD_ENTRY("IsInHeader", OnIsInHeader)
|
||||
REPLACEMENT_METHOD_ENTRY("IsOutHeader", OnIsOutHeader)
|
||||
REPLACEMENT_METHOD_ENTRY("IsRequiredHeader", OnIsRequiredHeader)
|
||||
REPLACEMENT_METHOD_ENTRY("IsHeaderUDT", OnIsHeaderUDT)
|
||||
REPLACEMENT_METHOD_ENTRY("GetHeaderTypeQName", OnGetHeaderTypeQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetExpectedHeaderCount", OnGetExpectedHeaderCount)
|
||||
REPLACEMENT_METHOD_ENTRY("GetFunctionIndex", OnGetFunctionIndex)
|
||||
REPLACEMENT_METHOD_ENTRY("HeaderHasNamespace", OnHeaderHasNamespace)
|
||||
REPLACEMENT_METHOD_ENTRY("GetHeaderNamespace", OnGetHeaderNamespace)
|
||||
REPLACEMENT_METHOD_ENTRY("GetHeaderNamespaceHashW", OnGetHeaderNamespaceHashW)
|
||||
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("EmitPragma", OnEmitPragma)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumNamespaceHashW", OnGetEnumNamespaceHashW)
|
||||
REPLACEMENT_METHOD_ENTRY("EnumHasUniqueNamespace", OnEnumHasUniqueNamespace)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumNamespace", OnGetEnumNamespace)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructNamespaceHashW", OnGetStructNamespaceHashW)
|
||||
REPLACEMENT_METHOD_ENTRY("StructHasUniqueNamespace", OnStructHasUniqueNamespace)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructNamespace", OnGetStructNamespace)
|
||||
REPLACEMENT_METHOD_ENTRY("GetFunctionNamespaceHashW", OnGetFunctionNamespaceHashW)
|
||||
REPLACEMENT_METHOD_ENTRY("GetFunctionNamespace", OnGetFunctionNamespace)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("IsFieldSizeIs", OnIsFieldSizeIs)
|
||||
REPLACEMENT_METHOD_ENTRY("IsFieldDynamicArray", OnIsFieldDynamicArray)
|
||||
REPLACEMENT_METHOD_ENTRY("IsFieldDynamicArrayWrapper", OnIsFieldDynamicArrayWrapper)
|
||||
REPLACEMENT_METHOD_ENTRY("FieldHasSizeIs", OnFieldHasSizeIs)
|
||||
REPLACEMENT_METHOD_ENTRY("GetFieldSizeIsIndex", OnGetFieldSizeIsIndex)
|
||||
REPLACEMENT_METHOD_ENTRY("GetCurrentFieldIndex", OnGetCurrentFieldIndex)
|
||||
REPLACEMENT_METHOD_ENTRY("GetFieldSizeIsName", OnGetFieldSizeIsName)
|
||||
|
||||
// safe-naming functions
|
||||
REPLACEMENT_METHOD_ENTRY("GetHeaderTypeCppQName", OnGetHeaderTypeCppQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetMemberCppType", OnGetMemberCppType)
|
||||
REPLACEMENT_METHOD_ENTRY("GetMemberCppName", OnGetMemberCppName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterTypeCppQName", OnGetParameterTypeCppQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetFunctionCppName", OnGetFunctionCppName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterCppName", OnGetParameterCppName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetParameterCppType", OnGetParameterCppType)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldCppName", OnGetStructFieldCppName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructCppQName", OnGetStructCppQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructCppName", OnGetStructCppName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructSafeCppQName", OnGetStructSafeCppQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldCppType", OnGetStructFieldCppType)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumCppName", OnGetEnumCppName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumSafeCppQName", OnGetEnumSafeCppQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumElementCppName", OnGetEnumElementCppName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetStructFieldTypeSafeCppQName", OnGetStructFieldTypeSafeCppQName)
|
||||
REPLACEMENT_METHOD_ENTRY("GetHeaderCppValue", OnGetHeaderCppValue)
|
||||
REPLACEMENT_METHOD_ENTRY("GetEnumCppQName", OnGetEnumCppQName)
|
||||
|
||||
REPLACEMENT_METHOD_ENTRY("GenProxy", OnGenProxy)
|
||||
END_REPLACEMENT_METHOD_MAP()
|
||||
|
||||
HRESULT Generate(LPCWSTR wszFile, CCodeProxy *pProxy, bool bPragma, bool bNoClobber, bool bEmitNamespace, bool bGenProxy, const char *szNamespace);
|
||||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CWriteStreamOnFileA
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class CWriteStreamOnFileA : public IWriteStream
|
||||
{
|
||||
private:
|
||||
|
||||
HANDLE m_hFile;
|
||||
|
||||
public:
|
||||
|
||||
CWriteStreamOnFileA()
|
||||
:m_hFile(INVALID_HANDLE_VALUE)
|
||||
{
|
||||
}
|
||||
|
||||
~CWriteStreamOnFileA()
|
||||
{
|
||||
if (m_hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
CloseHandle(m_hFile);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT Init(LPCWSTR wszFile, DWORD dwCreationDisposition = CREATE_NEW)
|
||||
{
|
||||
if ((wszFile == NULL) || (*wszFile == L'\0'))
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
m_hFile = CreateFileW(wszFile, GENERIC_WRITE, FILE_SHARE_READ, NULL,
|
||||
dwCreationDisposition, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
if (m_hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
return AtlHresultFromLastError();
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WriteStream(LPCSTR szOut, int nLen, LPDWORD pdwWritten)
|
||||
{
|
||||
ATLASSERT( szOut != NULL );
|
||||
ATLASSERT( m_hFile != INVALID_HANDLE_VALUE );
|
||||
|
||||
if (nLen < 0)
|
||||
{
|
||||
nLen = (int) strlen(szOut);
|
||||
}
|
||||
|
||||
DWORD dwWritten = 0;
|
||||
if (WriteFile(m_hFile, szOut, nLen, &dwWritten, NULL) != FALSE)
|
||||
{
|
||||
if (pdwWritten != NULL)
|
||||
{
|
||||
*pdwWritten = dwWritten;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return AtlHresultFromLastError();
|
||||
}
|
||||
|
||||
HRESULT FlushStream()
|
||||
{
|
||||
ATLASSERT( m_hFile != INVALID_HANDLE_VALUE );
|
||||
|
||||
if (FlushFileBuffers(m_hFile) != FALSE)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return AtlHresultFromLastError();
|
||||
}
|
||||
}; // class CWriteStreamOnFileA
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
class CWriteStreamOnStdout : public IWriteStream
|
||||
{
|
||||
public:
|
||||
|
||||
HRESULT WriteStream(LPCSTR szOut, int nLen, LPDWORD pdwWritten)
|
||||
{
|
||||
ATLASSERT( szOut != NULL );
|
||||
|
||||
if (nLen < 0)
|
||||
{
|
||||
nLen = (int) strlen(szOut);
|
||||
}
|
||||
|
||||
printf("%.*s", nLen, szOut);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT FlushStream()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
}; // class CWriteStreamOnStdout
|
||||
|
||||
#endif
|
||||
@@ -1,424 +0,0 @@
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
class CCppKeywordLookup
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
struct HashNode
|
||||
{
|
||||
wchar_t * key;
|
||||
unsigned long hash;
|
||||
size_t link;
|
||||
size_t entries;
|
||||
char
|
||||
data;
|
||||
};
|
||||
|
||||
protected:
|
||||
const static HashNode m_data[352];
|
||||
const static size_t m_size = 320;
|
||||
const static size_t m_tableSize = 154;
|
||||
|
||||
public:
|
||||
|
||||
static unsigned long Hash( const wchar_t * sz )
|
||||
{
|
||||
unsigned long hash;
|
||||
hash = 0;
|
||||
while ( *sz != 0 )
|
||||
{
|
||||
hash = (hash<<3)+hash+(*sz);
|
||||
sz++;
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
static const HashNode * Lookup( const wchar_t * key )
|
||||
{
|
||||
unsigned long hash;
|
||||
const HashNode * p;
|
||||
unsigned long index;
|
||||
hash = Hash(key);
|
||||
index = hash % m_size;
|
||||
p = &m_data[index];
|
||||
while (p->key)
|
||||
{
|
||||
if (p->hash==hash && !wcscmp(key, p->key))
|
||||
break;
|
||||
|
||||
if (p->link)
|
||||
{
|
||||
p = &m_data[p->link];
|
||||
}
|
||||
else
|
||||
{
|
||||
p = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (p && p->key)
|
||||
return p;
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
const CCppKeywordLookup
|
||||
::HashNode CCppKeywordLookup
|
||||
::m_data[352] =
|
||||
{
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__value", 0x03650243, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__builtin_isfloat", 0x951d2c86, 0, 0, 0
|
||||
},
|
||||
{ L"__w64", 0x000ab907, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__cdecl", 0x03632109, 0, 0, 0
|
||||
},
|
||||
{ L"explicit", 0x2109580a, 0, 0, 0
|
||||
},
|
||||
{ L"int", 0x0000258b, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__int16", 0x0363da10, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"new", 0x000026d2, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__if_not_exists", 0x38c9ff94, 0, 0, 0
|
||||
},
|
||||
{ L"__stdcall", 0x12ed8495, 0, 0, 0
|
||||
},
|
||||
{ L"__restrict", 0xa9a671d6, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"const_cast", 0x2e5e6419, 0, 0, 0
|
||||
},
|
||||
{ L"__uuidof", 0x1e8e211a, 320, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"unsigned", 0x254a5cdd, 0, 0, 0
|
||||
},
|
||||
{ L"extern", 0x006872de, 321, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"wchar_t", 0x0429d5e0, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"namespace", 0x39bf91e5, 322, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"const", 0x000b4ca7, 323, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"asm", 0x00002329, 0, 0, 0
|
||||
},
|
||||
{ L"__thiscall", 0xaa47736a, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"do", 0x000003f3, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__try", 0x000aba75, 0, 0, 0
|
||||
},
|
||||
{ L"xor_eq", 0x0078a2b6, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__nounwind", 0xa8d4dd78, 0, 0, 0
|
||||
},
|
||||
{ L"typedef", 0x042628b9, 0, 0, 0
|
||||
},
|
||||
{ L"void", 0x0001773a, 324, 1, 0
|
||||
},
|
||||
{ L"__int64", 0x0363da3b, 325, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"auto", 0x00013dc1, 0, 0, 0
|
||||
},
|
||||
{ L"signed", 0x00736d02, 0, 0, 0
|
||||
},
|
||||
{ L"__multiple_inheritance", 0x71a83643, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__FUNCTION__", 0x8057694a, 326, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"operator", 0x2398ea8c, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"catch", 0x000b2613, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__based", 0x03630355, 0, 0, 0
|
||||
},
|
||||
{ L"reinterpret_cast", 0x7c1a48d6, 327, 1, 0
|
||||
},
|
||||
{ L"if", 0x00000417, 328, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__delegate", 0xa5a0c0d9, 0, 0, 0
|
||||
},
|
||||
{ L"switch", 0x0074db5a, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__inline", 0x1e82a7dd, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"for", 0x0000249f, 329, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"cdecl", 0x000b29e3, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"not", 0x00002729, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"private", 0x03fee6eb, 330, 2, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__asm", 0x000ab46f, 0, 0, 0
|
||||
},
|
||||
{ L"bitor", 0x000b23b0, 0, 0, 0
|
||||
},
|
||||
{ L"goto", 0x00014cf1, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"double", 0x0066a733, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__event", 0x036387f8, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"mutable", 0x03ea253a, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__pragma", 0x1e893cfe, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"friend", 0x0068a040, 332, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__STDC__", 0x1e6bbc82, 0, 0, 0
|
||||
},
|
||||
{ L"__TIME__", 0x1e6ba383, 333, 1, 0
|
||||
},
|
||||
{ L"template", 0x24b3bc04, 0, 0, 0
|
||||
},
|
||||
{ L"_WCHAR_T_DEFINED", 0xe2efb485, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__forceinline", 0x3c22bf8c, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__novtordisp", 0x6bcd510e, 334, 1, 0
|
||||
},
|
||||
{ L"__hook", 0x00606b0f, 0, 0, 0
|
||||
},
|
||||
{ L"return", 0x00724790, 335, 2, 0
|
||||
},
|
||||
{ L"__single_inheritance", 0x22487011, 337, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__LINE__", 0x1e647114, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__resume", 0x1e89f4d7, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"or", 0x00000459, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__sealed", 0x1e8aa51c, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"sizeof", 0x0073a0a0, 0, 0, 0
|
||||
},
|
||||
{ L"union", 0x000d1561, 338, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__builtin_alignof", 0x94d63d24, 339, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__wchar_t", 0x12ff08e6, 0, 0, 0
|
||||
},
|
||||
{ L"__box", 0x000ab4a7, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"_NATIVE_WCHAR_T_DEFINED", 0xd0434ceb, 0, 0, 0
|
||||
},
|
||||
{ L"__assume", 0x1e7c0a6c, 0, 0, 0
|
||||
},
|
||||
{ L"register", 0x241bc32d, 0, 0, 0
|
||||
},
|
||||
{ L"float", 0x000b90ae, 340, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"long", 0x00015af0, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__abstract", 0xa4b56872, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"enum", 0x000146f5, 341, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__BOOL_DEFINED", 0xb3fb1eb8, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__feacpBreak", 0x92de20ba, 342, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__nodefault", 0xeee80ac0, 0, 0, 0
|
||||
},
|
||||
{ L"__identifier", 0xd7188001, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"virtual", 0x04285947, 0, 0, 0
|
||||
},
|
||||
{ L"and_eq", 0x0063a808, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"case", 0x00013d0c, 343, 1, 0
|
||||
},
|
||||
{ L"break", 0x000b380d, 344, 1, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__super", 0x0364ef15, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__SPREFIX", 0x11c76a17, 0, 0, 0
|
||||
},
|
||||
{ L"__gc", 0x00013098, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__CURSOR__", 0x9b9d12da, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"static", 0x007477e0, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"true", 0x000172e8, 0, 0, 0
|
||||
},
|
||||
{ L"while", 0x000d3769, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__compileBreak", 0xe0eef3ec, 345, 1, 0
|
||||
},
|
||||
{ L"continue", 0x202d692d, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__fastcall", 0xa61a0b70, 0, 0, 0
|
||||
},
|
||||
{ L"__declspec", 0xa5997eb1, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"compl", 0x000b4c33, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__finally", 0x127b2e35, 346, 2, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"__ptr32", 0x03649df9, 0, 0, 0
|
||||
},
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
@@ -1,58 +0,0 @@
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
#include "stdafx.h"
|
||||
#include "DiscoMapDocument.h"
|
||||
|
||||
CDiscoMapDocument::CDiscoMapDocument(void)
|
||||
{
|
||||
SetDocumentType(DMDOC);
|
||||
}
|
||||
|
||||
CDiscoMapDocument::~CDiscoMapDocument(void)
|
||||
{
|
||||
}
|
||||
|
||||
void CDiscoMapDocument::SetWSDLFile(const CStringW & wsdlFile)
|
||||
{
|
||||
CPathW cp;
|
||||
cp.Combine(GetPath(),wsdlFile);
|
||||
|
||||
m_wsdlFile = LPCWSTR(cp);
|
||||
}
|
||||
|
||||
void CDiscoMapDocument::AddSchema(const CStringW & url, const CStringW & filename)
|
||||
{
|
||||
CPathW cp;
|
||||
cp.Combine(GetPath(),filename);
|
||||
|
||||
m_schemaMap.SetAt(url,LPCWSTR(cp));
|
||||
}
|
||||
|
||||
CStringW & CDiscoMapDocument::GetWSDLFile(void)
|
||||
{
|
||||
return m_wsdlFile;
|
||||
}
|
||||
|
||||
CStringW & CDiscoMapDocument::GetValue(const CStringW & value)
|
||||
{
|
||||
return m_schemaMap[value];
|
||||
}
|
||||
|
||||
CStringW & CDiscoMapDocument::GetPath(void)
|
||||
{
|
||||
if(m_strPath.IsEmpty())
|
||||
{
|
||||
CStringW strDoc(GetDocumentUri());
|
||||
|
||||
wchar_t * pBuf = m_strPath.GetBuffer(MAX_PATH) ;
|
||||
wchar_t * p = NULL ;
|
||||
int nLength=GetFullPathNameW(LPCWSTR(strDoc),MAX_PATH,pBuf,&p);
|
||||
ATLENSURE(nLength!=0 && nLength<=MAX_PATH);
|
||||
ATLENSURE(p);
|
||||
*p = 0;
|
||||
m_strPath.ReleaseBuffer();
|
||||
|
||||
}
|
||||
return m_strPath;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
#pragma once
|
||||
#include "xmldocument.h"
|
||||
|
||||
class CDiscoMapDocument :
|
||||
public CXMLDocument
|
||||
{
|
||||
public:
|
||||
CDiscoMapDocument(void);
|
||||
~CDiscoMapDocument(void);
|
||||
private:
|
||||
typedef CAtlMap<CStringW, CStringW> SCHEMAMAP;
|
||||
|
||||
public:
|
||||
void SetWSDLFile(const CStringW & wsdlFile);
|
||||
private:
|
||||
CStringW m_wsdlFile;
|
||||
SCHEMAMAP m_schemaMap;
|
||||
public:
|
||||
void AddSchema(const CStringW & url, const CStringW & filename);
|
||||
CStringW & GetWSDLFile(void);
|
||||
CStringW & GetValue(const CStringW & value);
|
||||
private:
|
||||
CStringW m_strPath;
|
||||
protected:
|
||||
CStringW & GetPath(void);
|
||||
};
|
||||
@@ -1,82 +0,0 @@
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
#include "stdafx.h"
|
||||
#include "util.h"
|
||||
#include "DiscoMapparser.h"
|
||||
#include "DiscoMapDocument.h"
|
||||
CDiscoMapParser::CDiscoMapParser(void)
|
||||
:m_pDocument(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
CDiscoMapParser::~CDiscoMapParser(void)
|
||||
{
|
||||
}
|
||||
|
||||
CDiscoMapParser::CDiscoMapParser(ISAXXMLReader * pReader, CParserBase * pParent, DWORD dwLevel)
|
||||
:CParserBase(pReader, pParent, dwLevel), m_pDocument(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
CDiscoMapDocument * CDiscoMapParser::CreateDiscoMapDocument(void)
|
||||
{
|
||||
m_pDocument.Attach( new CDiscoMapDocument );
|
||||
return m_pDocument;
|
||||
}
|
||||
|
||||
|
||||
TAG_METHOD_IMPL(CDiscoMapParser, OnDiscoveryClientResultsFile)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CDiscoMapParser, OnResults)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CDiscoMapParser, OnDiscoveryClientResult)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CStringW strRT;
|
||||
HRESULT hr = GetAttribute(pAttributes, L"referenceType", sizeof("referenceType")-1, strRT);
|
||||
|
||||
if(FAILED(hr))
|
||||
return hr;
|
||||
|
||||
CDiscoMapDocument * pDoc = GetDiscoMapDocument();
|
||||
|
||||
if(strRT == "System.Web.Services.Discovery.SchemaReference")
|
||||
{
|
||||
CStringW strURL;
|
||||
hr = GetAttribute(pAttributes, L"url", sizeof("url")-1, strURL);
|
||||
if(FAILED(hr))
|
||||
return hr;
|
||||
|
||||
CStringW strFileName;
|
||||
hr = GetAttribute(pAttributes, L"filename", sizeof("filename")-1, strFileName);
|
||||
if(FAILED(hr))
|
||||
return hr;
|
||||
|
||||
pDoc->AddSchema(strURL,strFileName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if(strRT == "System.Web.Services.Discovery.ContractReference")
|
||||
{
|
||||
CStringW strWSDLFile;
|
||||
hr = GetAttribute(pAttributes, L"filename", sizeof("filename")-1, strWSDLFile);
|
||||
if(FAILED(hr))
|
||||
return hr;
|
||||
|
||||
pDoc->SetWSDLFile(strWSDLFile);
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
#pragma once
|
||||
#include "parser.h"
|
||||
|
||||
class CDiscoMapDocument;
|
||||
|
||||
class CDiscoMapParser :
|
||||
public CParserBase
|
||||
{
|
||||
public:
|
||||
CDiscoMapParser(void);
|
||||
~CDiscoMapParser(void);
|
||||
|
||||
BEGIN_XMLTAG_MAP()
|
||||
XMLTAG_ENTRY( "DiscoveryClientResultsFile", OnDiscoveryClientResultsFile )
|
||||
XMLTAG_ENTRY( "Results", OnResults)
|
||||
XMLTAG_ENTRY( "DiscoveryClientResult", OnDiscoveryClientResult )
|
||||
END_XMLTAG_MAP()
|
||||
|
||||
TAG_METHOD_DECL( OnDiscoveryClientResultsFile );
|
||||
TAG_METHOD_DECL( OnResults);
|
||||
TAG_METHOD_DECL( OnDiscoveryClientResult );
|
||||
|
||||
private:
|
||||
CAutoPtr<CDiscoMapDocument> m_pDocument;
|
||||
public:
|
||||
CDiscoMapParser(ISAXXMLReader * pReader, CParserBase * pParent, DWORD dwLevel);
|
||||
|
||||
CDiscoMapDocument * GetDiscoMapDocument(bool bReleaseOwnership = FALSE)
|
||||
{
|
||||
if (m_pDocument == NULL)
|
||||
{
|
||||
CreateDiscoMapDocument();
|
||||
}
|
||||
|
||||
if (bReleaseOwnership != FALSE)
|
||||
{
|
||||
return m_pDocument.Detach();
|
||||
}
|
||||
return m_pDocument;
|
||||
}
|
||||
CDiscoMapDocument * CreateDiscoMapDocument(void);
|
||||
};
|
||||
@@ -1,99 +0,0 @@
|
||||
//
|
||||
// Element.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Element.h"
|
||||
#include "ComplexType.h"
|
||||
#include "SimpleType.h"
|
||||
#include "Schema.h"
|
||||
#include "Attribute.h"
|
||||
#include "Content.h"
|
||||
|
||||
CComplexType * CElement::AddComplexType(CComplexType * p)
|
||||
{
|
||||
CAutoPtr<CComplexType> spOut;
|
||||
if (p== NULL)
|
||||
{
|
||||
spOut.Attach( new CComplexType );
|
||||
p = spOut;
|
||||
}
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (m_elements.AddTail(p) != NULL)
|
||||
{
|
||||
spOut.Detach();
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CSimpleType * CElement::AddSimpleType(CSimpleType * p)
|
||||
{
|
||||
CAutoPtr<CSimpleType> spOut;
|
||||
if (p== NULL)
|
||||
{
|
||||
spOut.Attach( new CSimpleType );
|
||||
p = spOut;
|
||||
}
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (m_elements.AddTail(p) != NULL)
|
||||
{
|
||||
spOut.Detach();
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CXSDElement * CElement::GetType()
|
||||
{
|
||||
CXSDElement *pRet = NULL;
|
||||
if (m_type.GetName().GetLength())
|
||||
{
|
||||
CSchema *pSchema = GetParentSchema();
|
||||
if (pSchema != NULL)
|
||||
{
|
||||
CStringW strUri;
|
||||
if (SUCCEEDED(/*pSchema->*/GetNamespaceUri(m_type.GetPrefix(), strUri)))
|
||||
{
|
||||
pRet = pSchema->GetNamedItem(strUri, m_type.GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// TODO: appropriate errors
|
||||
//
|
||||
|
||||
return pRet;
|
||||
}
|
||||
|
||||
const wchar_t * CElement::GetTargetNamespace()
|
||||
{
|
||||
if (m_type.GetName().GetLength())
|
||||
{
|
||||
// CSchema *pSchema = GetParentSchema();
|
||||
// if (pSchema != NULL)
|
||||
// {
|
||||
CStringW strUri;
|
||||
if (SUCCEEDED(/*pSchema->*/GetNamespaceUri(m_type.GetPrefix(), strUri)))
|
||||
{
|
||||
return strUri;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
EmitFileError(IDS_SDL_UNRESOLVED_NAMESPACE, const_cast<CElement*>(this), 0, m_type.GetPrefix());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -1,248 +0,0 @@
|
||||
//
|
||||
// Element.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "XSDElement.h"
|
||||
#include "QName.h"
|
||||
|
||||
class CComplexType;
|
||||
class CSimpleType;
|
||||
|
||||
#define MAXOCCURS_UNBOUNDED -2
|
||||
|
||||
class CElement : public CXSDElement
|
||||
{
|
||||
private:
|
||||
|
||||
CAtlPtrList<CXSDElement *> m_elements;
|
||||
CStringW m_strName;
|
||||
CStringW m_strID;
|
||||
CQName m_type;
|
||||
CQName m_ref;
|
||||
int m_nMinOccurs;
|
||||
int m_nMaxOccurs;
|
||||
BOOL m_bNullable;
|
||||
CStringW m_strArrayType;
|
||||
CStringW m_strSizeIs;
|
||||
|
||||
public:
|
||||
|
||||
CElement()
|
||||
:m_nMinOccurs(-1), m_nMaxOccurs(-1), m_bNullable(FALSE)
|
||||
{
|
||||
SetElementType(XSD_ELEMENT);
|
||||
}
|
||||
|
||||
CComplexType * AddComplexType(CComplexType * pComplexType = NULL);
|
||||
CSimpleType * AddSimpleType(CSimpleType * pSimpleType = NULL);
|
||||
CXSDElement * GetType();
|
||||
const wchar_t * GetTargetNamespace();
|
||||
|
||||
inline POSITION GetFirstElement()
|
||||
{
|
||||
return m_elements.GetHeadPosition();
|
||||
}
|
||||
|
||||
inline CXSDElement * GetNextElement(POSITION& pos)
|
||||
{
|
||||
return m_elements.GetNext(pos);
|
||||
}
|
||||
|
||||
inline size_t GetNumChildren()
|
||||
{
|
||||
return m_elements.GetCount();
|
||||
}
|
||||
|
||||
inline HRESULT SetName(const wchar_t *wszName, int cchName)
|
||||
{
|
||||
if (!wszName)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strName.SetString(wszName, cchName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetName(const CStringW& strName)
|
||||
{
|
||||
m_strName = strName;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetName()
|
||||
{
|
||||
return m_strName;
|
||||
}
|
||||
|
||||
inline HRESULT SetID(const wchar_t *wszID, int cchID)
|
||||
{
|
||||
if (!wszID)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strID.SetString(wszID, cchID);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetID(const CStringW& strID)
|
||||
{
|
||||
m_strID = strID;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetID()
|
||||
{
|
||||
return m_strID;
|
||||
}
|
||||
|
||||
inline HRESULT SetType(const CStringW& strQName)
|
||||
{
|
||||
m_type.SetQName(strQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetType(const CStringW& strPrefix, const CStringW& strName)
|
||||
{
|
||||
m_type.SetQName(strPrefix, strName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetType(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
m_type.SetQName(wszQName, cchQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline CQName& GetTypeName()
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
|
||||
inline HRESULT SetRef(const CStringW& strQName)
|
||||
{
|
||||
m_ref.SetQName(strQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetRef(const CStringW& strPrefix, const CStringW& strName)
|
||||
{
|
||||
m_ref.SetQName(strPrefix, strName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetRef(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
m_ref.SetQName(wszQName, cchQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CQName& GetRefName()
|
||||
{
|
||||
return m_ref;
|
||||
}
|
||||
|
||||
inline BOOL HasMinOccurs()
|
||||
{
|
||||
return (m_nMinOccurs != -1 ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
inline BOOL HasMaxOccurs()
|
||||
{
|
||||
return (m_nMaxOccurs != -1 ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
inline void SetMinOccurs(int nMinOccurs)
|
||||
{
|
||||
m_nMinOccurs = nMinOccurs;
|
||||
}
|
||||
|
||||
inline int GetMinOccurs()
|
||||
{
|
||||
return m_nMinOccurs;
|
||||
}
|
||||
|
||||
inline void SetMaxOccurs(int nMaxOccurs)
|
||||
{
|
||||
m_nMaxOccurs = nMaxOccurs;
|
||||
}
|
||||
|
||||
inline int GetMaxOccurs()
|
||||
{
|
||||
return m_nMaxOccurs;
|
||||
}
|
||||
|
||||
inline BOOL GetNullable()
|
||||
{
|
||||
return m_bNullable;
|
||||
}
|
||||
|
||||
inline void SetNullable(BOOL bNullable)
|
||||
{
|
||||
m_bNullable = bNullable;
|
||||
}
|
||||
|
||||
inline HRESULT SetArrayType(const wchar_t *wszArrayType, int cchArrayType)
|
||||
{
|
||||
if (!wszArrayType)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strArrayType.SetString(wszArrayType, cchArrayType);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetArrayType(const CStringW& strArrayType)
|
||||
{
|
||||
m_strArrayType = strArrayType;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetSizeIs(const wchar_t *wszSizeIs, int cchSizeIs)
|
||||
{
|
||||
if (!wszSizeIs)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strSizeIs.SetString(wszSizeIs, cchSizeIs);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetSizeIs(const CStringW& strSizeIs)
|
||||
{
|
||||
m_strSizeIs = strSizeIs;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetSizeIs()
|
||||
{
|
||||
return m_strSizeIs;
|
||||
}
|
||||
|
||||
inline const CStringW& GetArrayType()
|
||||
{
|
||||
return m_strArrayType;
|
||||
}
|
||||
};
|
||||
@@ -1,328 +0,0 @@
|
||||
//
|
||||
// ElementParser.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ElementParser.h"
|
||||
#include "ComplexTypeParser.h"
|
||||
#include "SimpleTypeParser.h"
|
||||
#include "Attribute.h"
|
||||
#include "Content.h"
|
||||
#include "Element.h"
|
||||
#include "ComplexType.h"
|
||||
#include "SimpleType.h"
|
||||
#include "Emit.h"
|
||||
#include "resource.h"
|
||||
#include "Util.h"
|
||||
|
||||
TAG_METHOD_IMPL(CElementParser, OnSimpleType)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CElement * pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
CSimpleType * pElem = pCurr->AddSimpleType();
|
||||
if (pElem != NULL)
|
||||
{
|
||||
SetXSDElementInfo(pElem, pCurr, GetLocator());
|
||||
|
||||
CAutoPtr<CSimpleTypeParser> p( new CSimpleTypeParser(GetReader(), this, GetLevel(), pElem) );
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
return p.Detach()->GetAttributes(pAttributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CElementParser, OnComplexType)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CElement * pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
CComplexType * pElem = pCurr->AddComplexType();
|
||||
if (pElem != NULL)
|
||||
{
|
||||
SetXSDElementInfo(pElem, pCurr, GetLocator());
|
||||
|
||||
CAutoPtr<CComplexTypeParser> p( new CComplexTypeParser(GetReader(), this, GetLevel(), pElem) );
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
return p.Detach()->GetAttributes(pAttributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CElementParser, OnKey)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CElementParser, OnKeyRef)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CElementParser, OnUnique)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnName)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CElement * pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetName(wszValue, cchValue);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnType)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CElement * pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetType(wszValue, cchValue);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnMinOccurs)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
int nMinOccurs = _wtoi(wszValue);
|
||||
if (nMinOccurs >= 0)
|
||||
{
|
||||
//
|
||||
// minOccurs must be >= 0
|
||||
//
|
||||
|
||||
CElement * pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
pCurr->SetMinOccurs(nMinOccurs);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
EmitInvalidValue("minOccurs", wszValue);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnMaxOccurs)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
if (cchValue==sizeof("unbounded")-1 && !wcsncmp(wszValue, L"unbounded", cchValue))
|
||||
{
|
||||
CElement * pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
pCurr->SetMaxOccurs(MAXOCCURS_UNBOUNDED);
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
int nMaxOccurs = 0;
|
||||
nMaxOccurs = _wtoi(wszValue);
|
||||
if (nMaxOccurs >= 0)
|
||||
{
|
||||
//
|
||||
// maxOccurs must be >= 0
|
||||
//
|
||||
|
||||
CElement * pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
pCurr->SetMaxOccurs(nMaxOccurs);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
EmitInvalidValue("maxOccurs", wszValue);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnNillable)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CElement * pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
bool bVal;
|
||||
HRESULT hr = GetBooleanValue(&bVal, wszValue, cchValue);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
pCurr->SetNullable(bVal);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
EmitInvalidValue("nillable", wszValue);
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnRef)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CElement * pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetRef(wszValue, cchValue);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnID)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CElement * pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetID(wszValue, cchValue);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnAbstract)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnBlock)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnDefault)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnEquivClass)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnFinal)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnFixed)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnForm)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnArrayType)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CElement *pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetArrayType(wszValue, cchValue);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CElementParser, OnSizeIs)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CElement *pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetSizeIs(wszValue, cchValue);
|
||||
}
|
||||
|
||||
EmitError(IDS_SDL_INTERNAL);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CElementParser::startPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix,
|
||||
const wchar_t *wszUri,
|
||||
int cchUri)
|
||||
{
|
||||
CElement * pCurr = GetElement();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetNamespaceUri(wszPrefix, cchPrefix, wszUri, cchUri);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
//
|
||||
// ElementParser.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Parser.h"
|
||||
#include "Emit.h"
|
||||
#include "resource.h"
|
||||
|
||||
class CElement;
|
||||
|
||||
class CElementParser : public CParserBase
|
||||
{
|
||||
private:
|
||||
|
||||
CElement * m_pElem;
|
||||
|
||||
public:
|
||||
|
||||
inline CElementParser(ISAXXMLReader *pReader, CParserBase *pParent, DWORD dwLevel, CElement * pElem)
|
||||
:CParserBase(pReader, pParent, dwLevel), m_pElem(pElem)
|
||||
{
|
||||
}
|
||||
|
||||
inline CElement * GetElement()
|
||||
{
|
||||
return m_pElem;
|
||||
}
|
||||
|
||||
inline void SetElement(CElement * pElem)
|
||||
{
|
||||
m_pElem = pElem;
|
||||
}
|
||||
|
||||
inline void MarkUnsupported(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int nLine;
|
||||
int nCol;
|
||||
GetLocator()->getLineNumber(&nLine);
|
||||
GetLocator()->getColumnNumber(&nCol);
|
||||
ATLTRACE( _T("%sUnsupported tag@(%d, %d) : %.*ws -- skipping element\n"), GetTabs(GetLevel()),
|
||||
nLine, nCol,
|
||||
cchQName, wszQName );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
simpleType, complexType, key, keyref, unique
|
||||
*/
|
||||
BEGIN_XMLTAG_MAP()
|
||||
XMLTAG_ENTRY_EX("simpleType", XSD_NAMESPACEA, OnSimpleType)
|
||||
XMLTAG_ENTRY_EX("complexType", XSD_NAMESPACEA, OnComplexType)
|
||||
XMLTAG_ENTRY_EX("key", XSD_NAMESPACEA, OnKey)
|
||||
XMLTAG_ENTRY_EX("keyRef", XSD_NAMESPACEA, OnKeyRef)
|
||||
XMLTAG_ENTRY_EX("unique", XSD_NAMESPACEA, OnUnique)
|
||||
END_XMLTAG_MAP()
|
||||
|
||||
/*
|
||||
<element
|
||||
abstract = "boolean"
|
||||
block = "#all or (possibly empty) subset of {equivClass, extension, restriction}"
|
||||
default = "string"
|
||||
equivClass = "QName"
|
||||
final = "#all or (possibly empty) subset of {extension, restriction}"
|
||||
fixed = "string"
|
||||
form = "qualified | unqualified"
|
||||
id = "ID"
|
||||
maxOccurs = "nonNegativeInteger | unbounded"
|
||||
minOccurs = "nonNegativeInteger"
|
||||
name = "NCName"
|
||||
nullable = "boolean"
|
||||
ref = "QName"
|
||||
type = "QName"
|
||||
{any attributes with non-schema namespace}
|
||||
>
|
||||
*/
|
||||
BEGIN_XMLATTR_MAP()
|
||||
XMLATTR_ENTRY("name", OnName)
|
||||
XMLATTR_ENTRY("type", OnType)
|
||||
XMLATTR_ENTRY("minOccurs", OnMinOccurs)
|
||||
XMLATTR_ENTRY("maxOccurs", OnMaxOccurs)
|
||||
XMLATTR_ENTRY("nillable", OnNillable)
|
||||
XMLATTR_ENTRY("ref", OnRef)
|
||||
XMLATTR_ENTRY("id", OnID)
|
||||
XMLATTR_ENTRY("abstract", OnAbstract)
|
||||
XMLATTR_ENTRY("block", OnBlock)
|
||||
XMLATTR_ENTRY("default", OnDefault)
|
||||
XMLATTR_ENTRY("equivClass", OnEquivClass)
|
||||
XMLATTR_ENTRY("final", OnFinal)
|
||||
XMLATTR_ENTRY("fixed", OnFixed)
|
||||
XMLATTR_ENTRY("form", OnForm)
|
||||
XMLATTR_ENTRY_EX("arrayType", SOAP_NAMESPACEA, OnArrayType)
|
||||
XMLATTR_ENTRY_EX("SizeIs", ATLS_NAMESPACEA, OnSizeIs)
|
||||
END_XMLATTR_MAP()
|
||||
|
||||
TAG_METHOD_DECL(OnSimpleType);
|
||||
TAG_METHOD_DECL(OnComplexType);
|
||||
TAG_METHOD_DECL(OnKey);
|
||||
TAG_METHOD_DECL(OnKeyRef);
|
||||
TAG_METHOD_DECL(OnUnique);
|
||||
|
||||
ATTR_METHOD_DECL(OnName);
|
||||
ATTR_METHOD_DECL(OnType);
|
||||
ATTR_METHOD_DECL(OnMinOccurs);
|
||||
ATTR_METHOD_DECL(OnMaxOccurs);
|
||||
ATTR_METHOD_DECL(OnNillable);
|
||||
ATTR_METHOD_DECL(OnRef);
|
||||
ATTR_METHOD_DECL(OnID);
|
||||
ATTR_METHOD_DECL(OnAbstract);
|
||||
ATTR_METHOD_DECL(OnBlock);
|
||||
ATTR_METHOD_DECL(OnDefault);
|
||||
ATTR_METHOD_DECL(OnEquivClass);
|
||||
ATTR_METHOD_DECL(OnFinal);
|
||||
ATTR_METHOD_DECL(OnFixed);
|
||||
ATTR_METHOD_DECL(OnForm);
|
||||
ATTR_METHOD_DECL(OnArrayType);
|
||||
ATTR_METHOD_DECL(OnSizeIs);
|
||||
|
||||
HRESULT __stdcall startPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix,
|
||||
const wchar_t *wszUri,
|
||||
int cchUri);
|
||||
};
|
||||
@@ -1,92 +0,0 @@
|
||||
//
|
||||
// Emit.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Emit.h"
|
||||
#include "errordefs.h"
|
||||
#include "XMLDocument.h"
|
||||
|
||||
void EmitError(UINT uID, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
va_start(arglist, uID);
|
||||
g_Emit.EmitError(uID, arglist);
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
void EmitErrorHr(HRESULT hr)
|
||||
{
|
||||
g_Emit.EmitErrorHr(hr);
|
||||
}
|
||||
|
||||
void EmitWarning(UINT uID, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
va_start(arglist, uID);
|
||||
g_Emit.EmitWarning(uID, arglist);
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
void Emit(UINT uID, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
va_start(arglist, uID);
|
||||
g_Emit.Emit(uID, arglist);
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
bool SetEmitWarnings(bool bWarn)
|
||||
{
|
||||
return g_Emit.SetEmitWarnings(bWarn);
|
||||
}
|
||||
|
||||
void EmitCmdLineError(UINT uID, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
va_start(arglist, uID);
|
||||
g_Emit.EmitCmdLineError(uID, arglist);
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
void EmitCmdLineWarning(UINT uID, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
va_start(arglist, uID);
|
||||
g_Emit.EmitCmdLineWarning(uID, arglist);
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
void EmitFileWarning(UINT uID, LPCWSTR wszFile, int nLine, int nCol, UINT uIDExtra, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
va_start(arglist, uIDExtra);
|
||||
g_Emit.EmitFileWarning(uID, wszFile, nLine, nCol, uIDExtra, arglist);
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
void EmitFileError(UINT uID, LPCWSTR wszFile, int nLine, int nCol, UINT uIDExtra, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
va_start(arglist, uIDExtra);
|
||||
g_Emit.EmitFileError(uID, wszFile, nLine, nCol, uIDExtra, arglist);
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
void EmitFileWarning(UINT uID, CXMLElement *pElem, UINT uIDExtra, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
va_start(arglist, uIDExtra);
|
||||
g_Emit.EmitFileWarning(uID, pElem->GetParentDocument()->GetDocumentUri(), pElem->GetLineNumber(), pElem->GetColumnNumber(), uIDExtra, arglist);
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
void EmitFileError(UINT uID, CXMLElement *pElem, UINT uIDExtra, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
va_start(arglist, uIDExtra);
|
||||
g_Emit.EmitFileError(uID, pElem->GetParentDocument()->GetDocumentUri(), pElem->GetLineNumber(), pElem->GetColumnNumber(), uIDExtra, arglist);
|
||||
va_end(arglist);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
//
|
||||
// Emit.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
class CXMLElement;
|
||||
|
||||
void EmitError(UINT uID, ...);
|
||||
void EmitErrorHr(HRESULT hr);
|
||||
|
||||
void EmitWarning(UINT uID, ...);
|
||||
|
||||
void Emit(UINT uID, ...);
|
||||
|
||||
bool SetEmitWarnings(bool bWarn);
|
||||
|
||||
void EmitCmdLineError(UINT uID, ...);
|
||||
void EmitCmdLineWarning(UINT uID, ...);
|
||||
|
||||
void EmitFileWarning(UINT uID, LPCWSTR wszFile, int nLine, int nCol, UINT uIDExtra, ...);
|
||||
void EmitFileError(UINT uID, LPCWSTR wszFile, int nLine, int nCol, UINT uIDExtra, ...);
|
||||
|
||||
void EmitFileWarning(UINT uID, CXMLElement *pElem, UINT uIDExtra, ...);
|
||||
void EmitFileError(UINT uID, CXMLElement *pElem, UINT uIDExtra, ...);
|
||||
@@ -1,92 +0,0 @@
|
||||
//
|
||||
// ErrorHandler.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ErrorHandler.h"
|
||||
#include "Emit.h"
|
||||
#include "resource.h"
|
||||
#include "Parser.h"
|
||||
|
||||
HRESULT __stdcall CErrorHandler::QueryInterface(REFIID riid, void **ppv)
|
||||
{
|
||||
if (!ppv)
|
||||
{
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
if (InlineIsEqualGUID(riid, __uuidof(ISAXErrorHandler)) ||
|
||||
InlineIsEqualGUID(riid, __uuidof(IUnknown)))
|
||||
{
|
||||
*ppv = static_cast<IUnknown*>(this);
|
||||
return S_OK;
|
||||
}
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
ULONG __stdcall CErrorHandler::AddRef()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
ULONG __stdcall CErrorHandler::Release()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CErrorHandler::error(
|
||||
ISAXLocator *pLocator,
|
||||
const wchar_t *wszErrorMessage,
|
||||
HRESULT hrErrorCode)
|
||||
{
|
||||
int nLine;
|
||||
int nCol;
|
||||
|
||||
pLocator->getLineNumber(&nLine);
|
||||
pLocator->getColumnNumber(&nCol);
|
||||
ATLTRACE( _T("error@(%d, %d): %ws\n"), nLine, nCol, wszErrorMessage );
|
||||
|
||||
EmitFileError(IDS_SDL_PARSE_ERROR, m_wszLocation, nLine, nCol, IDS_SDL_PARSE, wszErrorMessage);
|
||||
g_ParserList.RemoveAll();
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CErrorHandler::fatalError(
|
||||
ISAXLocator *pLocator,
|
||||
const wchar_t *wszErrorMessage,
|
||||
HRESULT hrErrorCode)
|
||||
{
|
||||
int nLine;
|
||||
int nCol;
|
||||
|
||||
pLocator->getLineNumber(&nLine);
|
||||
pLocator->getColumnNumber(&nCol);
|
||||
ATLTRACE( _T("fatalError@(%d, %d): %ws\n"), nLine, nCol, wszErrorMessage );
|
||||
|
||||
EmitFileError(IDS_SDL_PARSE_ERROR, m_wszLocation, nLine, nCol, IDS_SDL_PARSE, wszErrorMessage);
|
||||
g_ParserList.RemoveAll();
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CErrorHandler::ignorableWarning(
|
||||
ISAXLocator *pLocator,
|
||||
const wchar_t *wszErrorMessage,
|
||||
HRESULT hrErrorCode)
|
||||
{
|
||||
|
||||
int nLine;
|
||||
int nCol;
|
||||
|
||||
pLocator->getLineNumber(&nLine);
|
||||
pLocator->getColumnNumber(&nCol);
|
||||
|
||||
ATLTRACE( _T("ignorableWarning@(%d, %d): %ws\n"), nLine, nCol, wszErrorMessage );
|
||||
|
||||
EmitFileWarning(IDS_SDL_PARSE_WARNING, m_wszLocation, nLine, nCol, IDS_SDL_PARSE, wszErrorMessage);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
//
|
||||
// ErrorHandler.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
class CErrorHandler : public ISAXErrorHandler
|
||||
{
|
||||
private:
|
||||
const wchar_t * m_wszLocation;
|
||||
public:
|
||||
CErrorHandler()
|
||||
:m_wszLocation(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
void SetLocation(const wchar_t * wszLocation)
|
||||
{
|
||||
m_wszLocation = wszLocation;
|
||||
}
|
||||
|
||||
virtual ~CErrorHandler() {}
|
||||
|
||||
HRESULT __stdcall QueryInterface(REFIID riid, void **ppv);
|
||||
ULONG __stdcall AddRef();
|
||||
ULONG __stdcall Release();
|
||||
|
||||
HRESULT __stdcall error(
|
||||
ISAXLocator *pLocator,
|
||||
const wchar_t *wszErrorMessage,
|
||||
HRESULT hrErrorCode);
|
||||
|
||||
HRESULT __stdcall fatalError(
|
||||
ISAXLocator *pLocator,
|
||||
const wchar_t *wszErrorMessage,
|
||||
HRESULT hrErrorCode);
|
||||
|
||||
HRESULT __stdcall ignorableWarning(
|
||||
ISAXLocator *pLocator,
|
||||
const wchar_t *wszErrorMessage,
|
||||
HRESULT hrErrorCode);
|
||||
};
|
||||
@@ -1,202 +0,0 @@
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
#include <string.h>
|
||||
|
||||
enum FACET_TYPE
|
||||
{
|
||||
//
|
||||
// value is timeDuration
|
||||
//
|
||||
FACET_DURATION = 1,
|
||||
|
||||
//
|
||||
// value is "hex" or "base64"
|
||||
//
|
||||
FACET_ENCODING = 2,
|
||||
|
||||
//
|
||||
// specified set of values -- this constrains
|
||||
// the datatype to the specified values
|
||||
//
|
||||
FACET_ENUMERATION = 4,
|
||||
|
||||
//
|
||||
// number of units of length
|
||||
// units of length depends on the data type
|
||||
// value is nonNegativeInteger
|
||||
//
|
||||
FACET_LENGTH = 8,
|
||||
|
||||
//
|
||||
// Upper bound value (all values are less than this value).
|
||||
// This value must be the same data type as the inherited data type.
|
||||
//
|
||||
FACET_MAXEXCLUSIVE = 16,
|
||||
|
||||
//
|
||||
// Maximum value.
|
||||
// This value must be the same data type as the inherited data type.
|
||||
//
|
||||
FACET_MAXINCLUSIVE = 32,
|
||||
|
||||
//
|
||||
// Maximum number of units of length.
|
||||
// Units of length depends on the data type.
|
||||
// This value must be nonNegativeInteger.
|
||||
//
|
||||
FACET_MAXLENGTH = 64,
|
||||
|
||||
//
|
||||
// Lower bound value (all values are greater than this value).
|
||||
// This value must be the same data type as the inherited data type.
|
||||
//
|
||||
FACET_MINEXCLUSIVE = 128,
|
||||
|
||||
//
|
||||
// Minimum value.
|
||||
// This value must be the same data type as the inherited data type.
|
||||
//
|
||||
FACET_MININCLUSIVE = 256,
|
||||
|
||||
//
|
||||
// Maximum number of units of length.
|
||||
// Units of length depends on the data type.
|
||||
// This value must be nonNegativeInteger.
|
||||
//
|
||||
FACET_MINLENGTH = 512,
|
||||
|
||||
//
|
||||
// Specific pattern that the data type<70>s values must match.
|
||||
// This constrains the data type to literals that match the
|
||||
// specified pattern.
|
||||
// The pattern value must be a regular expression.
|
||||
//
|
||||
FACET_PATTERN = 1024,
|
||||
|
||||
//
|
||||
// Frequency of recurrence for recurringDuration and its derivatives.
|
||||
// This value must be timeDuration.
|
||||
//
|
||||
FACET_PERIOD = 2048,
|
||||
|
||||
//
|
||||
// Maximum number of digits for data types derived from decimal.
|
||||
// This value must a positiveInteger.
|
||||
//
|
||||
FACET_PRECISION = 4096,
|
||||
|
||||
//
|
||||
// Maximum number of digits in the fractional portion for data types
|
||||
// derived from decimal.
|
||||
// This value must a nonNegativeInteger.
|
||||
//
|
||||
FACET_SCALE = 8192,
|
||||
|
||||
//
|
||||
// whiteSpace provides for: constraining a value space to the white space
|
||||
// normalization rules.
|
||||
//
|
||||
FACET_WHITESPACE = 16384
|
||||
};
|
||||
|
||||
class CFacetLookup
|
||||
{
|
||||
public:
|
||||
|
||||
struct HashNode
|
||||
{
|
||||
wchar_t * key;
|
||||
unsigned long hash;
|
||||
size_t link;
|
||||
size_t entries;
|
||||
FACET_TYPE data;
|
||||
};
|
||||
|
||||
protected:
|
||||
const static HashNode m_data[34];
|
||||
const static size_t m_size = 30;
|
||||
const static size_t m_tableSize = 15;
|
||||
|
||||
public:
|
||||
|
||||
static unsigned long Hash( const wchar_t * sz )
|
||||
{
|
||||
unsigned long hash;
|
||||
hash = 0;
|
||||
while ( *sz != 0 )
|
||||
{
|
||||
hash = (hash<<3)+hash+(*sz);
|
||||
sz++;
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
static const HashNode * Lookup( const wchar_t * key )
|
||||
{
|
||||
unsigned long hash;
|
||||
const HashNode * p;
|
||||
unsigned long index;
|
||||
hash = Hash(key);
|
||||
index = hash % m_size;
|
||||
p = &m_data[index];
|
||||
while (p->key)
|
||||
{
|
||||
if (p->hash==hash && !wcscmp(key, p->key))
|
||||
break;
|
||||
|
||||
if (p->link)
|
||||
{
|
||||
p = &m_data[p->link];
|
||||
}
|
||||
else
|
||||
{
|
||||
p = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (p && p->key)
|
||||
return p;
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
const CFacetLookup::HashNode CFacetLookup::m_data[34] =
|
||||
{
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"pattern", 0x03f0ab26, 0, 0, FACET_PATTERN },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"minExclusive", 0x68be850c, 30, 1, FACET_MINEXCLUSIVE },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"duration", 0x20a8dd8e, 0, 0, FACET_DURATION },
|
||||
{ L"whiteSpace", 0xe8cc7a8d, 0, 0, FACET_WHITESPACE },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"length", 0x006cca22, 0, 0, FACET_LENGTH },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"maxInclusive", 0xd872dfa8, 0, 0, FACET_MAXINCLUSIVE },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"encoding", 0x20accab7, 31, 1, FACET_ENCODING },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"maxExclusive", 0xd109555e, 32, 1, FACET_MAXEXCLUSIVE },
|
||||
{ L"enumeration", 0x39b9a407, 0, 0, FACET_ENUMERATION },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"scale", 0x000cc020, 0, 0, FACET_SCALE },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"minInclusive", 0x70280f56, 33, 1, FACET_MININCLUSIVE },
|
||||
{ 0, 0x00000000, 0, 0, },
|
||||
{ L"minLength", 0x3966c1de, 0, 0, FACET_MINLENGTH },
|
||||
{ L"period", 0x0070709b, 0, 0, FACET_PERIOD },
|
||||
{ L"maxLength", 0x376ffd80, 0, 0, FACET_MAXLENGTH },
|
||||
{ L"precision", 0x437651d4, 0, 0, FACET_PRECISION },
|
||||
};
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// Namespaces.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#define WSDL_NAMESPACEA "http://schemas.xmlsoap.org/wsdl/"
|
||||
#define WSDL_NAMESPACEW MAKEWIDESTR( WSDL_NAMESPACEA )
|
||||
|
||||
#define HTTP_NAMESPACEA "http://schemas.xmlsoap.org/wsdl/http/"
|
||||
#define HTTP_NAMESPACEW MAKEWIDESTR( HTTP_NAMESPACEA )
|
||||
|
||||
#define MIME_NAMESPACEA "http://schemas.xmlsoap.org/wsdl/mime/"
|
||||
#define MIME_NAMESPACEW MAKEWIDESTR( MIME_NAMESPACEA )
|
||||
|
||||
#define SOAP_NAMESPACEA "http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
#define SOAP_NAMESPACEW MAKEWIDESTR( SOAP_NAMESPACEA )
|
||||
|
||||
#define XSI_NAMESPACEA "http://www.w3.org/2001/XMLSchema-instance"
|
||||
#define XSI_NAMESPACEW MAKEWIDESTR( XSI_NAMESPACEA )
|
||||
|
||||
#define XSD_NAMESPACEA "http://www.w3.org/2001/XMLSchema"
|
||||
#define XSD_NAMESPACEW MAKEWIDESTR( XSD_NAMESPACEA )
|
||||
|
||||
#define SOAP_ENCODINGSTYLEA "http://schemas.xmlsoap.org/soap/encoding/"
|
||||
#define SOAP_ENCODINGSTYLEW MAKEWIDESTR( SOAP_ENCODINGSTYLEA )
|
||||
|
||||
#define ATLS_NAMESPACEA "http://tempuri.org/vc/atl/server/"
|
||||
#define ATLS_NAMESPACEW MAKEWIDESTR( ATLS_NAMESPACEA )
|
||||
|
||||
#define FX_TYPES_NAMESPACEA "http://microsoft.com/wsdl/types/"
|
||||
#define FX_TYPES_NAMESPACEW MAKEWIDESTR( FX_TYPES_NAMESPACEA )
|
||||
|
||||
#define CLR_TYPES_NAMESPACEA "http://schemas.microsoft.com/clr/ns/System"
|
||||
#define CLR_TYPES_NAMESPACEW MAKEWIDESTR( CLR_TYPES_NAMESPACEA )
|
||||
|
||||
#if 0
|
||||
|
||||
#define SUDS_NAMESPACEA "http://www.w3.org/2000/wsdl/suds"
|
||||
#define SUDS_NAMESPACEW MAKEWIDESTR( SUDS_NAMESPACEA )
|
||||
|
||||
#define STK_PREFERREDENCODING_NAMESPACEA "http://schemas.microsoft.com/soap-toolkit/wsdl-extension"
|
||||
#define STK_PREFERREDENCODING_NAMESPACEW MAKEWIDESTR( STK_PREFERREDENCODING_NAMESPACEA )
|
||||
|
||||
#endif
|
||||
@@ -1,485 +0,0 @@
|
||||
//
|
||||
// Parser.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Parser.h"
|
||||
#include "SkipParser.h"
|
||||
#include "resource.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CParserBase interface
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
HRESULT CParserBase::DispatchElement(
|
||||
const XMLTAG *pEntry,
|
||||
const wchar_t *wszNamespaceUri, int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName, int cchLocalName,
|
||||
const wchar_t *wszQName, int cchQName,
|
||||
ISAXAttributes *pAttributes) throw()
|
||||
{
|
||||
if (!pEntry)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
while (pEntry->szElemName)
|
||||
{
|
||||
if (CheckTagElement(pEntry,
|
||||
wszNamespaceUri, cchNamespaceUri,
|
||||
wszLocalName, cchLocalName,
|
||||
wszQName, cchQName))
|
||||
{
|
||||
return (this->*pEntry->pfnTag)(wszNamespaceUri,
|
||||
cchNamespaceUri, wszLocalName, cchLocalName,
|
||||
wszQName, cchQName, pAttributes);
|
||||
}
|
||||
pEntry++;
|
||||
}
|
||||
|
||||
//
|
||||
// unrecognized tag
|
||||
//
|
||||
return OnUnrecognizedTag(wszNamespaceUri,
|
||||
cchNamespaceUri, wszLocalName, cchLocalName,
|
||||
wszQName, cchQName, pAttributes);
|
||||
}
|
||||
|
||||
HRESULT CParserBase::GetAttributes(const XMLATTR *pEntry, ISAXAttributes *pAttributes)
|
||||
{
|
||||
if (!pAttributes)
|
||||
{
|
||||
EmitError(IDS_SDL_INTERNAL);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (GetGotAttributes() != FALSE)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (!pEntry)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
int nAttrs = 0;
|
||||
HRESULT hr = pAttributes->getLength(&nAttrs);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
EmitError(IDS_SDL_MSXML);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
while (pEntry->wszElemName)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<nAttrs; i++)
|
||||
{
|
||||
const wchar_t *wszNamespaceUri = NULL;
|
||||
const wchar_t *wszLocalName = NULL;
|
||||
const wchar_t *wszQName = NULL;
|
||||
int cchUri = 0;
|
||||
int cchLocalName = 0;
|
||||
int cchQName = 0;
|
||||
|
||||
hr = pAttributes->getName(i, &wszNamespaceUri, &cchUri, &wszLocalName, &cchLocalName, &wszQName, &cchQName);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
EmitError(IDS_SDL_MSXML);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (CheckTagElement(pEntry,
|
||||
wszNamespaceUri, cchUri,
|
||||
wszLocalName, cchLocalName,
|
||||
wszQName, cchQName))
|
||||
{
|
||||
const wchar_t *wszValue = NULL;
|
||||
int cchValue = 0;
|
||||
|
||||
hr = pAttributes->getValue(i, &wszValue, &cchValue);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = (this->*pEntry->pfnAttr)(wszNamespaceUri,
|
||||
cchUri, wszLocalName, cchLocalName,
|
||||
wszQName, cchQName, wszValue, cchValue,
|
||||
pAttributes);
|
||||
}
|
||||
else
|
||||
{
|
||||
EmitError(IDS_SDL_MSXML);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= nAttrs)
|
||||
{
|
||||
hr = OnMissingAttribute(pEntry->bRequired, pEntry->wszElemName, pEntry->cchElem,
|
||||
pEntry->wszElemNamespace, pEntry->cchNamespaceUri);
|
||||
}
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
pEntry++;
|
||||
}
|
||||
|
||||
SetGotAttributes(TRUE);
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT CParserBase::DispatchElement(
|
||||
const wchar_t *wszNamespaceUri, int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName, int cchLocalName,
|
||||
const wchar_t *wszQName, int cchQName,
|
||||
ISAXAttributes *pAttributes) throw()
|
||||
{
|
||||
|
||||
if (FAILED(GetAttributes(pAttributes)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
const XMLTAG * pEntry = GetXMLTAGMap();
|
||||
|
||||
return DispatchElement(pEntry, wszNamespaceUri,
|
||||
cchNamespaceUri, wszLocalName, cchLocalName,
|
||||
wszQName, cchQName, pAttributes);
|
||||
}
|
||||
|
||||
HRESULT CParserBase::GetAttributes(ISAXAttributes *pAttributes)
|
||||
{
|
||||
const XMLATTR * pEntry = GetXMLATTRMap();
|
||||
return GetAttributes(pEntry, pAttributes);
|
||||
}
|
||||
|
||||
BOOL CParserBase::CheckTagElement(
|
||||
const XMLTAG *pTag,
|
||||
const wchar_t *wszNamespaceUri, int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName, int cchLocalName,
|
||||
const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
if (!pTag->wszElemName)
|
||||
{
|
||||
EmitError(IDS_SDL_INTERNAL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (pTag->cchElem == cchLocalName &&
|
||||
!wcsncmp(pTag->wszElemName, wszLocalName, pTag->cchElem))
|
||||
{
|
||||
//
|
||||
// Don't need to check default namespace for tags since SAX gives it in wszElemNamespace
|
||||
//
|
||||
if ((!pTag->wszElemNamespace) ||
|
||||
(!pTag->cchNamespaceUri && !cchNamespaceUri) ||
|
||||
(pTag->cchNamespaceUri == cchNamespaceUri &&
|
||||
!wcsncmp(pTag->wszElemNamespace, wszNamespaceUri, pTag->cchNamespaceUri)))
|
||||
{
|
||||
//
|
||||
// namespace and tag match
|
||||
// it is okay if there is no namespace ("") or if the user doesn't care (NULL)
|
||||
//
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void CParserBase::CrackQName(const wchar_t *wszQName, int cchQName,
|
||||
wchar_t **pwszNs, int *pcchNs,
|
||||
wchar_t **pwszName, int *pcchName)
|
||||
{
|
||||
wchar_t * wszQNameTmp = (wchar_t *) wszQName;
|
||||
wchar_t * wszColon = wcschr(wszQNameTmp, L':');
|
||||
if (wszColon && (wszColon-wszQNameTmp) <= cchQName)
|
||||
{
|
||||
*pwszNs = wszQNameTmp;
|
||||
*pcchNs = (int)(wszColon-wszQNameTmp);
|
||||
|
||||
*pwszName = wszColon+1;
|
||||
*pcchName = cchQName-(*pcchNs)-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
*pwszNs = NULL;
|
||||
*pcchNs = 0;
|
||||
*pwszName = wszQNameTmp;
|
||||
*pcchName = cchQName;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CParserBase::OnUnrecognizedTag(
|
||||
const wchar_t *wszNamespaceUri, int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName, int cchLocalName,
|
||||
const wchar_t *wszQName, int cchQName,
|
||||
ISAXAttributes *pAttributes) throw()
|
||||
{
|
||||
wszNamespaceUri;
|
||||
cchNamespaceUri;
|
||||
wszLocalName;
|
||||
cchLocalName;
|
||||
wszQName;
|
||||
cchQName;
|
||||
pAttributes;
|
||||
|
||||
ATLTRACE( _T("%sUnrecoginzed Tag: %.*ws\n"), GetTabs(m_dwLevel), cchQName, wszQName );
|
||||
|
||||
int nLine;
|
||||
int nCol;
|
||||
|
||||
GetLocator()->getLineNumber(&nLine);
|
||||
GetLocator()->getColumnNumber(&nCol);
|
||||
|
||||
EmitFileError(IDS_SDL_UNRECOGNIZED_TAG, GetWSDLFile(), nLine, nCol, 0, wszNamespaceUri, wszLocalName);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT CParserBase::OnMissingAttribute(BOOL bRequired,
|
||||
const wchar_t *wszName, int cchName,
|
||||
const wchar_t *wszNamespace, int cchNamespace)
|
||||
{
|
||||
if (bRequired != FALSE)
|
||||
{
|
||||
ATLTRACE( _T("%sMissing Required Attribute: name %.*ws, uri %.*ws\n"),
|
||||
GetTabs(m_dwLevel), cchName, wszName, cchNamespace, wszNamespace );
|
||||
|
||||
int nLine;
|
||||
int nCol;
|
||||
|
||||
GetLocator()->getLineNumber(&nLine);
|
||||
GetLocator()->getColumnNumber(&nCol);
|
||||
|
||||
EmitFileError(IDS_SDL_MISSING_ATTRIBUTE, GetWSDLFile(), nLine, nCol, 0, wszNamespace, wszName);
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CParserBase::EmitInvalidValue(const char *szName, const wchar_t *wszValue)
|
||||
{
|
||||
int nLine;
|
||||
int nCol;
|
||||
GetLocator()->getLineNumber(&nLine);
|
||||
GetLocator()->getColumnNumber(&nCol);
|
||||
EmitFileError(IDS_SDL_INVALID_VALUE, GetWSDLFile(), nLine, nCol, 0, szName, wszValue);
|
||||
}
|
||||
|
||||
void CParserBase::EmitUnsupported(UINT nID, const wchar_t *wszUri, const wchar_t *wszName)
|
||||
{
|
||||
int nLine;
|
||||
int nCol;
|
||||
GetLocator()->getLineNumber(&nLine);
|
||||
GetLocator()->getColumnNumber(&nCol);
|
||||
EmitFileWarning(nID, GetWSDLFile(), nLine, nCol, 0, wszUri, wszName);
|
||||
}
|
||||
|
||||
void CParserBase::EmitSkip(const wchar_t *wszUri, const wchar_t *wszName)
|
||||
{
|
||||
EmitUnsupported(IDS_SDL_UNSUPPORTED_TAG, wszUri, wszName);
|
||||
}
|
||||
|
||||
void CParserBase::EmitString(const wchar_t *wszUri, const wchar_t *wszName)
|
||||
{
|
||||
EmitUnsupported(IDS_SDL_UNSUPPORTED_STRING, wszUri, wszName);
|
||||
}
|
||||
|
||||
HRESULT CParserBase::SkipElement()
|
||||
{
|
||||
CAutoPtr<CSkipParser> p( new CSkipParser(m_spReader, this, GetLevel()) );
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
p.Detach();
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IUnknown
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
HRESULT __stdcall CParserBase::QueryInterface(REFIID riid, void **ppv)
|
||||
{
|
||||
if (!ppv)
|
||||
{
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
if (InlineIsEqualGUID(riid, __uuidof(ISAXContentHandler)) ||
|
||||
InlineIsEqualGUID(riid, __uuidof(IUnknown)))
|
||||
{
|
||||
*ppv = static_cast<IUnknown*>(this);
|
||||
return S_OK;
|
||||
}
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
ULONG __stdcall CParserBase::AddRef()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
ULONG __stdcall CParserBase::Release()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ISAXContentHandler
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
HRESULT __stdcall CParserBase::putDocumentLocator(ISAXLocator *pLocator)
|
||||
{
|
||||
m_spLocator = pLocator;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CParserBase::startDocument()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CParserBase::endDocument()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CParserBase::startPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix,
|
||||
const wchar_t *wszUri,
|
||||
int cchUri)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CParserBase::endPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix)
|
||||
{
|
||||
wszPrefix;
|
||||
cchPrefix;
|
||||
|
||||
// REVIEW: remove from map?
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CParserBase::startElement(
|
||||
const wchar_t *wszNamespaceUri,
|
||||
int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName,
|
||||
int cchLocalName,
|
||||
const wchar_t *wszQName,
|
||||
int cchQName,
|
||||
ISAXAttributes *pAttributes)
|
||||
{
|
||||
return DispatchElement(wszNamespaceUri, cchNamespaceUri,
|
||||
wszLocalName, cchLocalName,
|
||||
wszQName, cchQName,
|
||||
pAttributes);
|
||||
}
|
||||
|
||||
HRESULT __stdcall CParserBase::endElement(
|
||||
const wchar_t *wszNamespaceUri,
|
||||
int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName,
|
||||
int cchLocalName,
|
||||
const wchar_t *wszQName,
|
||||
int cchQName)
|
||||
{
|
||||
HRESULT hr = ValidateElement();
|
||||
|
||||
if (GetReset() > 0)
|
||||
{
|
||||
EnableReset();
|
||||
return hr;
|
||||
}
|
||||
|
||||
//
|
||||
// Restore the parent handler
|
||||
//
|
||||
CComPtr<CParserBase> spParentHandler = GetParentHandler();
|
||||
if (spParentHandler.p != NULL)
|
||||
{
|
||||
m_spReader->putContentHandler(spParentHandler);
|
||||
}
|
||||
|
||||
if (GetDynamicAlloc() != FALSE)
|
||||
{
|
||||
POSITION pos = g_ParserList.Find(this);
|
||||
if (pos != NULL)
|
||||
{
|
||||
g_ParserList.RemoveAt(pos);
|
||||
}
|
||||
delete this;
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CParserBase::characters(
|
||||
const wchar_t *wszChars,
|
||||
int cchChars)
|
||||
{
|
||||
//
|
||||
// REVIEW: what to do here?
|
||||
//
|
||||
// ATLTRACE( _T("CParserBase::characters: %*.ws\n"), cchChars, wszChars );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CParserBase::ignorableWhitespace(
|
||||
const wchar_t *wszChars,
|
||||
int cchChars)
|
||||
{
|
||||
// ATLTRACE( _T("CParserBase::ignorableWhitespace: %.*ws\n"), cchChars, wszChars );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CParserBase::processingInstruction(
|
||||
const wchar_t *wszTarget,
|
||||
int cchTarget,
|
||||
const wchar_t *wszData,
|
||||
int cchData)
|
||||
{
|
||||
wszTarget;
|
||||
cchTarget;
|
||||
wszData;
|
||||
cchData;
|
||||
|
||||
ATLTRACE( _T("CParserBase::processingInstruction: target: %.*ws, data: %.*ws\n"), cchTarget, wszTarget, cchData, wszData );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CParserBase::skippedEntity(
|
||||
const wchar_t *wszName,
|
||||
int cchName)
|
||||
{
|
||||
wszName;
|
||||
cchName;
|
||||
|
||||
ATLTRACE( _T("CParserBase::skippedEntity: %.*ws\n"), wszName, cchName );
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1,517 +0,0 @@
|
||||
//
|
||||
// Parser.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "XMLDocument.h"
|
||||
#include "XSDElement.h"
|
||||
#include "Emit.h"
|
||||
#include "SproxyColl.h"
|
||||
|
||||
#define PTM_WARNING_DISABLE \
|
||||
__pragma(warning( push )) \
|
||||
__pragma(warning( disable : 4867 ))
|
||||
|
||||
#define PTM_WARNING_RESTORE \
|
||||
__pragma(warning( pop ))
|
||||
|
||||
#define EMPTY_XMLTAG_MAP() \
|
||||
virtual const XMLTAG * GetXMLTAGMap() \
|
||||
{ \
|
||||
return NULL; \
|
||||
}
|
||||
|
||||
#define EMPTY_XMLATTR_MAP() \
|
||||
virtual const XMLATTR * GetXMLATTRMap() \
|
||||
{ \
|
||||
return NULL; \
|
||||
}
|
||||
|
||||
#define BEGIN_XMLTAG_MAP() \
|
||||
virtual const XMLTAG * GetXMLTAGMap() \
|
||||
{ \
|
||||
PTM_WARNING_DISABLE \
|
||||
static const XMLTAG map[] = \
|
||||
{
|
||||
|
||||
#define END_XMLTAG_MAP() \
|
||||
{ NULL, NULL } }; \
|
||||
PTM_WARNING_RESTORE \
|
||||
return map; \
|
||||
}
|
||||
|
||||
#define _XMLTAG_ENTRY_EX(elementName, elementNamespace, elementFunc) \
|
||||
{ L ## elementName, elementName, sizeof(elementName)-1, \
|
||||
L ## elementNamespace, elementNamespace, sizeof(elementNamespace)-1, \
|
||||
static_cast<TAG_DISPATCH_FUNC>(elementFunc), NULL, FALSE },
|
||||
|
||||
#define XMLTAG_ENTRY_EX(elementName, elementNamespace, elementFunc) _XMLTAG_ENTRY_EX(elementName, elementNamespace, elementFunc)
|
||||
|
||||
#define _XMLTAG_ENTRY(elementName, elementFunc) \
|
||||
{ L ## elementName, elementName, sizeof(elementName)-1, \
|
||||
NULL, NULL, 0, \
|
||||
static_cast<TAG_DISPATCH_FUNC>(elementFunc), NULL, FALSE },
|
||||
|
||||
#define XMLTAG_ENTRY(elementName, elementFunc) _XMLTAG_ENTRY(elementName, elementFunc)
|
||||
|
||||
#define BEGIN_XMLATTR_MAP() \
|
||||
virtual const XMLATTR * GetXMLATTRMap() \
|
||||
{ \
|
||||
PTM_WARNING_DISABLE \
|
||||
static const XMLTAG map[] = \
|
||||
{
|
||||
|
||||
#define END_XMLATTR_MAP() \
|
||||
{ NULL, NULL } }; \
|
||||
PTM_WARNING_RESTORE \
|
||||
return map; \
|
||||
}
|
||||
|
||||
#define _XMLATTR_ENTRY_EX(elementName, elementNamespace, elementFunc, required) \
|
||||
{ L ## elementName, elementName, sizeof(elementName)-1, \
|
||||
L ## elementNamespace, elementNamespace, sizeof(elementNamespace)-1, \
|
||||
NULL, static_cast<ATTR_DISPATCH_FUNC>(elementFunc), required },
|
||||
|
||||
#define XMLATTR_ENTRY_EX(elementName, elementNamespace, elementFunc) \
|
||||
_XMLATTR_ENTRY_EX(elementName, elementNamespace, elementFunc, FALSE)
|
||||
|
||||
#define XMLATTR_ENTRY_EX2(elementName, elementNamespace, elementFunc, required) \
|
||||
_XMLATTR_ENTRY_EX(elementName, elementNamespace, elementFunc, required)
|
||||
|
||||
#define _XMLATTR_ENTRY(elementName, elementFunc, required) \
|
||||
{ L ## elementName, elementName, sizeof(elementName)-1, \
|
||||
NULL, NULL, 0, \
|
||||
NULL, static_cast<ATTR_DISPATCH_FUNC>(elementFunc), required },
|
||||
|
||||
#define XMLATTR_ENTRY(elementName, elementFunc) _XMLATTR_ENTRY(elementName, elementFunc, FALSE)
|
||||
#define XMLATTR_ENTRY2(elementName, elementFunc, required) _XMLATTR_ENTRY(elementName, elementFunc, required)
|
||||
|
||||
class CParserBase;
|
||||
|
||||
typedef HRESULT (CParserBase::*TAG_DISPATCH_FUNC)(
|
||||
const wchar_t *wszNamespaceUri, int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName, int cchLocalName,
|
||||
const wchar_t *wszQName, int cchQName,
|
||||
ISAXAttributes *pAttributes);
|
||||
|
||||
typedef HRESULT (CParserBase::*ATTR_DISPATCH_FUNC)(
|
||||
const wchar_t *wszNamespaceUri, int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName, int cchLocalName,
|
||||
const wchar_t *wszQName, int cchQName,
|
||||
const wchar_t *wszValue, int cchValue,
|
||||
ISAXAttributes *pAttributes);
|
||||
|
||||
#define TAG_METHOD_DECL( name ) \
|
||||
HRESULT name(const wchar_t *wszNamespaceUri, int cchNamespaceUri, \
|
||||
const wchar_t *wszLocalName, int cchLocalName, \
|
||||
const wchar_t *wszQName, int cchQName, \
|
||||
ISAXAttributes *pAttributes)
|
||||
|
||||
#define TAG_METHOD_IMPL( class, name ) \
|
||||
HRESULT class ## :: ## name(const wchar_t *wszNamespaceUri, int cchNamespaceUri, \
|
||||
const wchar_t *wszLocalName, int cchLocalName, \
|
||||
const wchar_t *wszQName, int cchQName, \
|
||||
ISAXAttributes *pAttributes)
|
||||
|
||||
#define ATTR_METHOD_DECL( name ) \
|
||||
HRESULT name(const wchar_t *wszNamespaceUri, int cchNamespaceUri, \
|
||||
const wchar_t *wszLocalName, int cchLocalName, \
|
||||
const wchar_t *wszQName, int cchQName, \
|
||||
const wchar_t *wszValue, int cchValue, \
|
||||
ISAXAttributes *pAttributes)
|
||||
|
||||
#define ATTR_METHOD_IMPL( class, name ) \
|
||||
HRESULT class ## :: ## name(const wchar_t *wszNamespaceUri, int cchNamespaceUri, \
|
||||
const wchar_t *wszLocalName, int cchLocalName, \
|
||||
const wchar_t *wszQName, int cchQName, \
|
||||
const wchar_t *wszValue, int cchValue, \
|
||||
ISAXAttributes *pAttributes)
|
||||
|
||||
typedef NAMESPACEMAP URIMAP;
|
||||
|
||||
#ifndef _PREFIX_
|
||||
#define TRACE_PARSE_ENTRY() \
|
||||
ATLTRACE( _T("%s") __FUNCTION__ _T("\n"), GetTabs(GetLevel()))
|
||||
#else
|
||||
#define TRACE_PARSE_ENTRY() \
|
||||
ATLTRACE( _T("%s") _T("\n"), GetTabs(GetLevel()))
|
||||
#endif // _PREFIX_
|
||||
|
||||
|
||||
//
|
||||
// XMLTAG struct
|
||||
// used for dispatching XML entries
|
||||
//
|
||||
struct XMLTAG
|
||||
{
|
||||
LPCWSTR wszElemName;
|
||||
LPCSTR szElemName;
|
||||
int cchElem;
|
||||
|
||||
LPCWSTR wszElemNamespace;
|
||||
LPCSTR szElemNamespace;
|
||||
int cchNamespaceUri;
|
||||
|
||||
//
|
||||
// REVIEW: union doesn't work for initialization
|
||||
//
|
||||
TAG_DISPATCH_FUNC pfnTag;
|
||||
ATTR_DISPATCH_FUNC pfnAttr;
|
||||
|
||||
//
|
||||
// attribute must be present
|
||||
//
|
||||
BOOL bRequired;
|
||||
};
|
||||
|
||||
typedef XMLTAG XMLATTR;
|
||||
|
||||
//
|
||||
// dummy classes for multiple inheritance
|
||||
// (tell compiler to use big pointers for CParserBase member function pointers)
|
||||
//
|
||||
class CDummy1 {};
|
||||
class CDummy2 {};
|
||||
|
||||
//
|
||||
// The base parser class
|
||||
//
|
||||
class CParserBase : public ISAXContentHandler, public CDummy1, public CDummy2
|
||||
{
|
||||
private:
|
||||
|
||||
CComPtr<CParserBase> m_spParent;
|
||||
CComPtr<ISAXXMLReader> m_spReader;
|
||||
CComPtr<ISAXLocator> m_spLocator;
|
||||
|
||||
//
|
||||
// how many levels deep
|
||||
//
|
||||
DWORD m_dwLevel;
|
||||
|
||||
//
|
||||
// reset to parent handler on endElement
|
||||
//
|
||||
DWORD m_dwReset;
|
||||
|
||||
//
|
||||
// get only top-level attributes
|
||||
//
|
||||
BOOL m_bGotAttributes;
|
||||
|
||||
//
|
||||
// dynamically allocated
|
||||
//
|
||||
BOOL m_bDynamicAlloc;
|
||||
|
||||
private:
|
||||
|
||||
HRESULT DispatchElement(
|
||||
const XMLTAG *pMap,
|
||||
const wchar_t *wszNamespaceUri, int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName, int cchLocalName,
|
||||
const wchar_t *wszQName, int cchQName,
|
||||
ISAXAttributes *pAttributes) throw ();
|
||||
|
||||
HRESULT GetAttributes(const XMLATTR *pMap, ISAXAttributes *pAttributes);
|
||||
|
||||
BOOL CheckTagElement(
|
||||
const XMLTAG *pTag,
|
||||
const wchar_t *wszNamespaceUri, int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName, int cchLocalName,
|
||||
const wchar_t *wszQName, int cchQName);
|
||||
|
||||
void CrackQName(const wchar_t *wszQName, int cchQName,
|
||||
wchar_t **pwszNs, int *pcchNs,
|
||||
wchar_t **pwszName, int *pcchName);
|
||||
|
||||
public:
|
||||
|
||||
//
|
||||
// CParserBase interface
|
||||
//
|
||||
inline CParserBase()
|
||||
:m_dwLevel(0), m_dwReset(0), m_bDynamicAlloc(TRUE), m_bGotAttributes(FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
inline CParserBase(ISAXXMLReader *pReader, CParserBase *pParent, DWORD dwLevel)
|
||||
:m_spReader(pReader), m_spParent(pParent), m_dwLevel(dwLevel+1), m_dwReset(0), m_bDynamicAlloc(TRUE), m_bGotAttributes(FALSE)
|
||||
{
|
||||
if (m_spReader.p != NULL)
|
||||
{
|
||||
m_spReader->putContentHandler(this);
|
||||
}
|
||||
}
|
||||
|
||||
inline HRESULT Initialize(ISAXXMLReader *pReader, CParserBase *pParent, DWORD dwLevel, BOOL bDynamicAlloc = FALSE)
|
||||
{
|
||||
m_spReader = pReader;
|
||||
m_spParent = pParent;
|
||||
m_dwLevel = dwLevel+1;
|
||||
m_bDynamicAlloc = bDynamicAlloc;
|
||||
m_bGotAttributes = FALSE;
|
||||
m_dwReset = 0;
|
||||
|
||||
if (m_spReader.p != NULL)
|
||||
{
|
||||
return m_spReader->putContentHandler(this);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
virtual ~CParserBase()
|
||||
{
|
||||
if ((m_spParent.p != NULL) && (m_spReader.p != NULL))
|
||||
{
|
||||
m_spReader->putContentHandler(m_spParent);
|
||||
}
|
||||
}
|
||||
|
||||
EMPTY_XMLTAG_MAP()
|
||||
EMPTY_XMLATTR_MAP()
|
||||
|
||||
HRESULT DispatchElement(
|
||||
const wchar_t *wszNamespaceUri, int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName, int cchLocalName,
|
||||
const wchar_t *wszQName, int cchQName,
|
||||
ISAXAttributes *pAttributes) throw ();
|
||||
|
||||
HRESULT GetAttributes(ISAXAttributes *pAttributes);
|
||||
|
||||
inline CParserBase * GetParentHandler()
|
||||
{
|
||||
return m_spParent;
|
||||
}
|
||||
|
||||
inline void SetParentHandler(CParserBase *pParent)
|
||||
{
|
||||
m_spParent = pParent;
|
||||
}
|
||||
|
||||
ISAXXMLReader * GetReader()
|
||||
{
|
||||
return m_spReader;
|
||||
}
|
||||
|
||||
inline void SetReader(ISAXXMLReader *pReader)
|
||||
{
|
||||
m_spReader = pReader;
|
||||
}
|
||||
|
||||
inline DWORD GetLevel()
|
||||
{
|
||||
return m_dwLevel;
|
||||
}
|
||||
|
||||
inline void SetLevel(DWORD dwLevel)
|
||||
{
|
||||
m_dwLevel = dwLevel;
|
||||
}
|
||||
|
||||
virtual HRESULT OnUnrecognizedTag(
|
||||
const wchar_t *wszNamespaceUri, int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName, int cchLocalName,
|
||||
const wchar_t *wszQName, int cchQName,
|
||||
ISAXAttributes *pAttributes) throw ();
|
||||
|
||||
virtual HRESULT OnMissingAttribute(BOOL bRequired,
|
||||
const wchar_t *wszName, int cchName,
|
||||
const wchar_t *wszNamespace, int cchNamespace);
|
||||
|
||||
HRESULT SkipElement();
|
||||
void EmitInvalidValue(const char *szName, const wchar_t *wszValue);
|
||||
void EmitUnsupported(UINT nID, const wchar_t *wszUri, const wchar_t *wszName);
|
||||
void EmitSkip(const wchar_t *wszUri, const wchar_t *wszName);
|
||||
void EmitString(const wchar_t *wszUri, const wchar_t *wszName);
|
||||
|
||||
inline ISAXLocator * GetLocator()
|
||||
{
|
||||
if (m_spLocator.p != NULL)
|
||||
{
|
||||
return m_spLocator;
|
||||
}
|
||||
if (m_spParent.p != NULL)
|
||||
{
|
||||
return m_spParent->GetLocator();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virtual HRESULT ValidateElement()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline void SetGotAttributes(BOOL bGotAttributes)
|
||||
{
|
||||
m_bGotAttributes = bGotAttributes;
|
||||
}
|
||||
|
||||
inline BOOL GetGotAttributes()
|
||||
{
|
||||
return m_bGotAttributes;
|
||||
}
|
||||
|
||||
inline DWORD GetReset()
|
||||
{
|
||||
return m_dwReset;
|
||||
}
|
||||
|
||||
inline void EnableReset(BOOL bForce = FALSE)
|
||||
{
|
||||
if (bForce != FALSE)
|
||||
{
|
||||
m_dwReset = 0;
|
||||
}
|
||||
else if (m_dwReset > 0)
|
||||
{
|
||||
m_dwReset--;
|
||||
}
|
||||
}
|
||||
|
||||
inline void DisableReset(DWORD dwCnt = 1)
|
||||
{
|
||||
m_dwReset+= dwCnt;
|
||||
}
|
||||
|
||||
inline BOOL GetDynamicAlloc()
|
||||
{
|
||||
return m_bDynamicAlloc;
|
||||
}
|
||||
|
||||
inline void SetDynamicAlloc(BOOL bDynamicAlloc)
|
||||
{
|
||||
m_bDynamicAlloc = bDynamicAlloc;
|
||||
}
|
||||
|
||||
//
|
||||
// IUnknown interface
|
||||
//
|
||||
HRESULT __stdcall QueryInterface(REFIID riid, void **ppv);
|
||||
ULONG __stdcall AddRef();
|
||||
ULONG __stdcall Release();
|
||||
|
||||
//
|
||||
// ISAXContentHandler interface
|
||||
//
|
||||
HRESULT __stdcall putDocumentLocator(ISAXLocator *pLocator);
|
||||
|
||||
HRESULT __stdcall startDocument();
|
||||
|
||||
HRESULT __stdcall endDocument();
|
||||
|
||||
HRESULT __stdcall startPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix,
|
||||
const wchar_t *wszUri,
|
||||
int cchUri);
|
||||
|
||||
HRESULT __stdcall endPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix);
|
||||
|
||||
HRESULT __stdcall startElement(
|
||||
const wchar_t *wszNamespaceUri,
|
||||
int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName,
|
||||
int cchLocalName,
|
||||
const wchar_t *wszQName,
|
||||
int cchQName,
|
||||
ISAXAttributes *pAttributes);
|
||||
|
||||
HRESULT __stdcall endElement(
|
||||
const wchar_t *wszNamespaceUri,
|
||||
int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName,
|
||||
int cchLocalName,
|
||||
const wchar_t *wszQName,
|
||||
int cchQName);
|
||||
|
||||
HRESULT __stdcall characters(
|
||||
const wchar_t *wszChars,
|
||||
int cchChars);
|
||||
|
||||
HRESULT __stdcall ignorableWhitespace(
|
||||
const wchar_t *wszChars,
|
||||
int cchChars);
|
||||
|
||||
HRESULT __stdcall processingInstruction(
|
||||
const wchar_t *wszTarget,
|
||||
int cchTarget,
|
||||
const wchar_t *wszData,
|
||||
int cchData);
|
||||
|
||||
HRESULT __stdcall skippedEntity(
|
||||
const wchar_t *wszName,
|
||||
int cchName);
|
||||
};
|
||||
|
||||
inline HRESULT CopyNamespaceMap(const NAMESPACEMAP& in, NAMESPACEMAP& out)
|
||||
{
|
||||
out.InitHashTable(in.GetHashTableSize());
|
||||
out.DisableAutoRehash();
|
||||
POSITION pos = in.GetStartPosition();
|
||||
while (pos != NULL)
|
||||
{
|
||||
const NAMESPACEMAP::CPair *p = in.GetNext(pos);
|
||||
if (!out.SetAt(p->m_key, p->m_value))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
out.EnableAutoRehash();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// for cleanup purposes
|
||||
#ifndef _PREFIX_
|
||||
__declspec(selectany) CAtlPtrList<CParserBase *> g_ParserList;
|
||||
#else
|
||||
CAtlPtrList<CParserBase *> g_ParserList;
|
||||
#endif // _PREFIX_
|
||||
|
||||
inline void SetLocatorInfo(CXMLElement *pElem, ISAXLocator *pLocator)
|
||||
{
|
||||
ATLASSERT( pLocator != NULL );
|
||||
ATLASSERT( pElem != NULL );
|
||||
|
||||
int nLine = 0;
|
||||
int nCol = 0;
|
||||
|
||||
pLocator->getLineNumber(&nLine);
|
||||
pLocator->getColumnNumber(&nCol);
|
||||
|
||||
pElem->SetLineNumber(nLine);
|
||||
pElem->SetColumnNumber(nCol);
|
||||
}
|
||||
|
||||
|
||||
ATL_NOINLINE inline void SetXMLElementInfo(CXMLElement *pElem, CXMLElement *pParent, ISAXLocator *pLocator)
|
||||
{
|
||||
ATLASSERT( pElem != NULL );
|
||||
ATLASSERT( pParent != NULL );
|
||||
ATLASSERT( pLocator != NULL );
|
||||
|
||||
pElem->SetParentElement(pParent);
|
||||
pElem->SetParentDocument(pParent->GetParentDocument());
|
||||
SetLocatorInfo(pElem, pLocator);
|
||||
}
|
||||
|
||||
ATL_NOINLINE inline void SetXSDElementInfo(CXSDElement *pElem, CXSDElement *pParent, ISAXLocator *pLocator)
|
||||
{
|
||||
ATLASSERT( pElem != NULL );
|
||||
ATLASSERT( pParent != NULL );
|
||||
ATLASSERT( pLocator != NULL );
|
||||
|
||||
pElem->SetParentSchema(pParent->GetParentSchema());
|
||||
pElem->SetParentElement(pParent);
|
||||
pElem->SetParentDocument(pParent->GetParentDocument());
|
||||
SetLocatorInfo(pElem, pLocator);
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
//
|
||||
// QName.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "QName.h"
|
||||
|
||||
void CQName::CrackQName(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
if (cchQName == -1)
|
||||
{
|
||||
cchQName = (int)wcslen(wszQName);
|
||||
}
|
||||
|
||||
wchar_t * wszQNameTmp = (wchar_t *) wszQName;
|
||||
wchar_t * wszColon = wcschr(wszQNameTmp, L':');
|
||||
if (wszColon && (wszColon-wszQNameTmp) <= cchQName)
|
||||
{
|
||||
m_strPrefix.SetString(wszQNameTmp, (int)(wszColon-wszQNameTmp));
|
||||
m_strName.SetString(wszColon+1, (int)(cchQName-m_strPrefix.GetLength()-1));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_strName.SetString(wszQName, cchQName);
|
||||
}
|
||||
}
|
||||
|
||||
CQName::CQName(const CStringW& strQName)
|
||||
{
|
||||
SetQName(strQName);
|
||||
}
|
||||
|
||||
CQName::CQName(const CStringW& strPrefix, const CStringW& strName)
|
||||
:m_strPrefix(strPrefix), m_strName(strName)
|
||||
{
|
||||
}
|
||||
|
||||
CQName::CQName(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
SetQName(wszQName, cchQName);
|
||||
}
|
||||
|
||||
void CQName::SetQName(const CStringW& strQName)
|
||||
{
|
||||
CrackQName((LPCWSTR) strQName, strQName.GetLength());
|
||||
}
|
||||
|
||||
void CQName::SetQName(const CStringW& strPrefix, const CStringW& strName)
|
||||
{
|
||||
m_strPrefix = strPrefix;
|
||||
m_strName = strName;
|
||||
}
|
||||
|
||||
void CQName::SetQName(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
CrackQName(wszQName, cchQName);
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
//
|
||||
// QName.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
class CQName
|
||||
{
|
||||
private:
|
||||
|
||||
CStringW m_strPrefix;
|
||||
CStringW m_strName;
|
||||
|
||||
void CrackQName(const wchar_t *wszQName, int cchQName);
|
||||
|
||||
public:
|
||||
|
||||
CQName()
|
||||
{
|
||||
}
|
||||
|
||||
CQName(const CStringW& strQName);
|
||||
CQName(const CStringW& strPrefix, const CStringW& strName);
|
||||
CQName(const wchar_t *wszQName, int cchQName);
|
||||
|
||||
inline CQName(const CQName& that)
|
||||
{
|
||||
*this = that;
|
||||
}
|
||||
|
||||
inline const CQName& operator=(const CQName& that)
|
||||
{
|
||||
if (this != &that)
|
||||
{
|
||||
m_strPrefix = that.m_strPrefix;
|
||||
m_strName = that.m_strName;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void SetQName(const CStringW& strQName);
|
||||
void SetQName(const CStringW& strPrefix, const CStringW& strName);
|
||||
void SetQName(const wchar_t *wszQName, int cchQName);
|
||||
|
||||
inline void SetPrefix(const CStringW& strPrefix)
|
||||
{
|
||||
m_strPrefix = strPrefix;
|
||||
}
|
||||
|
||||
inline CStringW& GetPrefix()
|
||||
{
|
||||
return m_strPrefix;
|
||||
}
|
||||
|
||||
inline CStringW& GetName()
|
||||
{
|
||||
return m_strName;
|
||||
}
|
||||
|
||||
inline void SetName(const CStringW& strName)
|
||||
{
|
||||
m_strName = strName;
|
||||
}
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
This is placeholder for a readme file to Sproxy tool
|
||||
@@ -1,85 +0,0 @@
|
||||
//
|
||||
// Schema.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "Attribute.h"
|
||||
#include "Schema.h"
|
||||
#include "Element.h"
|
||||
#include "SimpleType.h"
|
||||
#include "ComplexType.h"
|
||||
#include "WSDLDocument.h"
|
||||
|
||||
CComplexType * CSchema::AddComplexType(CComplexType * p)
|
||||
{
|
||||
if (p != NULL)
|
||||
{
|
||||
if (p->GetName().GetLength() != 0)
|
||||
{
|
||||
if (m_complexTypes.SetAt(p->GetName(), p) != NULL)
|
||||
{
|
||||
return p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// TODO: error
|
||||
//
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CSimpleType * CSchema::AddSimpleType(CSimpleType * p)
|
||||
{
|
||||
if (p != NULL)
|
||||
{
|
||||
if (p->GetName().GetLength() != 0)
|
||||
{
|
||||
if (m_simpleTypes.SetAt(p->GetName(), p) != NULL)
|
||||
{
|
||||
return p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CElement * CSchema::AddElement(CElement * p)
|
||||
{
|
||||
if (p != NULL)
|
||||
{
|
||||
if (p->GetName().GetLength() != 0)
|
||||
{
|
||||
if (m_elements.SetAt(p->GetName(), p) != NULL)
|
||||
{
|
||||
return p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CXSDElement * CSchema::GetNamedItemFromParent(const CStringW& strUri, const CStringW& strName)
|
||||
{
|
||||
CXSDElement *pRet = NULL;
|
||||
CXMLDocument *pParentDoc = GetParentDocument();
|
||||
if ((pParentDoc != NULL) && (pParentDoc->GetDocumentType() == WSDLDOC))
|
||||
{
|
||||
CWSDLDocument *pWSDLDocument = static_cast<CWSDLDocument *>(pParentDoc);
|
||||
pRet = pWSDLDocument->GetComplexType(strName, strUri);
|
||||
if (pRet == NULL)
|
||||
{
|
||||
pRet = pWSDLDocument->GetSimpleType(strName, strUri);
|
||||
if (pRet == NULL)
|
||||
{
|
||||
pRet = pWSDLDocument->GetElement(strName, strUri);
|
||||
}
|
||||
}
|
||||
}
|
||||
return pRet;
|
||||
}
|
||||
@@ -1,201 +0,0 @@
|
||||
//
|
||||
// Schema.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "XMLElement.h"
|
||||
#include "XSDElement.h"
|
||||
#include "ComplexType.h"
|
||||
#include "SimpleType.h"
|
||||
#include "Element.h"
|
||||
//#include "UnsupportedElement.h"
|
||||
|
||||
#include "Emit.h"
|
||||
#include "resource.h"
|
||||
|
||||
class CSchema : public CXSDElement
|
||||
{
|
||||
private:
|
||||
|
||||
typedef CAtlPtrMap<CStringW, CComplexType *, CStringRefElementTraits<CStringW> > COMPLEXTYPEMAP;
|
||||
typedef CAtlPtrMap<CStringW, CSimpleType *, CStringRefElementTraits<CStringW> > SIMPLETYPEMAP;
|
||||
typedef CAtlPtrMap<CStringW, CElement *, CStringRefElementTraits<CStringW> > ELEMENTMAP;
|
||||
// typedef CAtlPtrMap<CStringW, CUnsupportedElement *, CStringRefElementTraits<CStringW> > UNSUPPORTEDMAP;
|
||||
|
||||
COMPLEXTYPEMAP m_complexTypes;
|
||||
SIMPLETYPEMAP m_simpleTypes;
|
||||
ELEMENTMAP m_elements;
|
||||
// UNSUPPORTEDMAP m_unsupportedTypes;
|
||||
|
||||
CStringW m_strTargetNamespace;
|
||||
CStringW m_strName;
|
||||
CStringW m_strID;
|
||||
|
||||
public:
|
||||
|
||||
CComplexType * AddComplexType(CComplexType * p);
|
||||
CSimpleType * AddSimpleType(CSimpleType * p);
|
||||
CElement * AddElement(CElement * p);
|
||||
|
||||
CXSDElement * GetNamedItemFromParent(const CStringW& strUri, const CStringW& strName);
|
||||
|
||||
inline CXSDElement * GetNamedItem(const CStringW& strUri, const CStringW& strName)
|
||||
{
|
||||
CXSDElement *pRet = NULL;
|
||||
if (strUri.GetLength() == 0 || strUri == GetTargetNamespace())
|
||||
{
|
||||
CStringW str;
|
||||
pRet = GetComplexType(str, strName);
|
||||
if (pRet == NULL)
|
||||
{
|
||||
pRet = GetSimpleType(str, strName);
|
||||
if (pRet == NULL)
|
||||
{
|
||||
pRet = GetElement(str, strName);
|
||||
// if (pRet == NULL)
|
||||
// {
|
||||
// pRet = GetUnsupportedElement(str, strName);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pRet = GetNamedItemFromParent(strUri, strName);
|
||||
}
|
||||
|
||||
return pRet;
|
||||
}
|
||||
|
||||
inline CComplexType * GetComplexType(const CStringW& strUri, const CStringW& strName)
|
||||
{
|
||||
if (strUri.GetLength() == 0 || strUri == GetTargetNamespace())
|
||||
{
|
||||
const COMPLEXTYPEMAP::CPair *p = m_complexTypes.Lookup(strName);
|
||||
if (p != NULL)
|
||||
{
|
||||
return p->m_value;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline CSimpleType * GetSimpleType(const CStringW& strUri, const CStringW& strName)
|
||||
{
|
||||
if (strUri.GetLength() == 0 || strUri == GetTargetNamespace())
|
||||
{
|
||||
const SIMPLETYPEMAP::CPair *p = m_simpleTypes.Lookup(strName);
|
||||
if (p != NULL)
|
||||
{
|
||||
return p->m_value;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline CElement * GetElement(const CStringW& strUri, const CStringW& strName)
|
||||
{
|
||||
if (strUri.GetLength() == 0 || strUri == GetTargetNamespace())
|
||||
{
|
||||
const ELEMENTMAP::CPair *p = m_elements.Lookup(strName);
|
||||
if (p != NULL)
|
||||
{
|
||||
return p->m_value;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// inline CUnsupportedElement * GetUnsupportedElement(const CStringW& strUri, const CStringW& strName)
|
||||
// {
|
||||
// if (strUri.GetLength() == 0 || strUri == GetTargetNamespace())
|
||||
// {
|
||||
// const UNSUPPORTEDMAP::CPair *p = m_unsupportedTypes.Lookup(strName);
|
||||
// if (p != NULL)
|
||||
// {
|
||||
// return p->m_value;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return NULL;
|
||||
// }
|
||||
|
||||
inline HRESULT SetName(const wchar_t *wszName, int cchName)
|
||||
{
|
||||
if (!wszName)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strName.SetString(wszName, cchName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetName(const CStringW& strName)
|
||||
{
|
||||
m_strName = strName;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetName()
|
||||
{
|
||||
return m_strName;
|
||||
}
|
||||
|
||||
inline HRESULT SetTargetNamespace(const wchar_t *wszTargetNamespace, int cchTargetNamespace)
|
||||
{
|
||||
if (!wszTargetNamespace)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strTargetNamespace.SetString(wszTargetNamespace, cchTargetNamespace);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetTargetNamespace(const CStringW& strTargetNamespace)
|
||||
{
|
||||
m_strTargetNamespace = strTargetNamespace;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetTargetNamespace()
|
||||
{
|
||||
return m_strTargetNamespace;
|
||||
}
|
||||
|
||||
inline HRESULT SetID(const wchar_t *wszID, int cchID)
|
||||
{
|
||||
if (!wszID)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strID.SetString(wszID, cchID);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetID(const CStringW& strID)
|
||||
{
|
||||
m_strID = strID;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetID()
|
||||
{
|
||||
return m_strID;
|
||||
}
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// SchemaDocument.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Schema.h"
|
||||
|
||||
class CSchemaDocument : public CXMLDocument
|
||||
{
|
||||
private:
|
||||
|
||||
CSchema m_schema;
|
||||
|
||||
public:
|
||||
|
||||
inline CSchema * GetSchema()
|
||||
{
|
||||
return m_&schema;
|
||||
}
|
||||
};
|
||||
@@ -1,353 +0,0 @@
|
||||
//
|
||||
// SchemaParser.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "SchemaParser.h"
|
||||
#include "ComplexTypeParser.h"
|
||||
#include "ElementParser.h"
|
||||
#include "SimpleTypeParser.h"
|
||||
#include "Schema.h"
|
||||
#include "Attribute.h"
|
||||
#include "Content.h"
|
||||
#include "Element.h"
|
||||
#include "ComplexType.h"
|
||||
|
||||
TAG_METHOD_IMPL(CSchemaParser, OnInclude)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSchemaParser, OnImport)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
//
|
||||
// TODO: do imports here (or delay?)
|
||||
//
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSchemaParser, OnAnnotation)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSchemaParser, OnRedefine)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSchemaParser, OnAttribute)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
/*
|
||||
// TODO: investigate supporting this stuff
|
||||
CSchema *pCurr = GetSchema();
|
||||
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
CAttribute *pElem = pCurr->AddAttribute();
|
||||
if (pElem != NULL)
|
||||
{
|
||||
pElem->SetParentDocument(pCurr->GetParentDocument());
|
||||
pElem->SetParentElement(pCurr);
|
||||
|
||||
CAutoPtr<CAttributeParser> p( new CAttributeParser(GetReader(), this, GetLevel(), pElem) );
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
p.Detach();
|
||||
return p->GetAttributes(pAttributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
|
||||
return E_FAIL;
|
||||
*/
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
//
|
||||
// TODO: investigate supporting this
|
||||
//
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSchemaParser, OnAttributeGroup)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSchemaParser, OnElement)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CSchema * pCurr = GetSchema();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
CAutoPtr<CElement> spElem;
|
||||
spElem.Attach( new CElement );
|
||||
if (spElem != NULL)
|
||||
{
|
||||
SetXSDElementInfo(spElem, pCurr, GetLocator());
|
||||
spElem->SetParentSchema(pCurr);
|
||||
|
||||
CAutoPtr<CElementParser> p( new CElementParser(GetReader(), this, GetLevel(), spElem) );
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
if (SUCCEEDED(p.Detach()->GetAttributes(pAttributes)))
|
||||
{
|
||||
if (spElem->GetName().GetLength() != 0)
|
||||
{
|
||||
if (pCurr->AddElement(spElem) != NULL)
|
||||
{
|
||||
spElem.Detach();
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
EmitNamedElementError("element");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSchemaParser, OnGroup)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSchemaParser, OnNotation)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSchemaParser, OnSimpleType)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CSchema * pCurr = GetSchema();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
CAutoPtr<CSimpleType> spElem;
|
||||
spElem.Attach( new CSimpleType );
|
||||
if (spElem != NULL)
|
||||
{
|
||||
SetXSDElementInfo(spElem, pCurr, GetLocator());
|
||||
spElem->SetParentSchema(pCurr);
|
||||
|
||||
CAutoPtr<CSimpleTypeParser> p( new CSimpleTypeParser(GetReader(), this, GetLevel(), spElem) );
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
if (SUCCEEDED(p.Detach()->GetAttributes(pAttributes)))
|
||||
{
|
||||
if (spElem->GetName().GetLength() != 0)
|
||||
{
|
||||
if (pCurr->AddSimpleType(spElem) != NULL)
|
||||
{
|
||||
spElem.Detach();
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
EmitNamedElementError("simpleType");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSchemaParser, OnComplexType)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CSchema * pCurr = GetSchema();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
CAutoPtr<CComplexType> spElem;
|
||||
spElem.Attach( new CComplexType );
|
||||
if (spElem != NULL)
|
||||
{
|
||||
SetXSDElementInfo(spElem, pCurr, GetLocator());
|
||||
spElem->SetParentSchema(pCurr);
|
||||
|
||||
CAutoPtr<CComplexTypeParser> p( new CComplexTypeParser(GetReader(), this, GetLevel(), spElem) );
|
||||
if (p != NULL)
|
||||
{
|
||||
if (g_ParserList.AddHead(p) != NULL)
|
||||
{
|
||||
if (SUCCEEDED(p.Detach()->GetAttributes(pAttributes)))
|
||||
{
|
||||
if (spElem->GetName().GetLength() != 0)
|
||||
{
|
||||
if (pCurr->AddComplexType(spElem) != NULL)
|
||||
{
|
||||
spElem.Detach();
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
EmitNamedElementError("complexType");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
ATTR_METHOD_IMPL(CSchemaParser, OnName)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CSchema * pCurr = GetSchema();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetName(wszValue, cchValue);
|
||||
}
|
||||
|
||||
EmitError(IDS_SDL_INTERNAL);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CSchemaParser, OnTargetNamespace)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CSchema * pCurr = GetSchema();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetTargetNamespace(wszValue, cchValue);
|
||||
}
|
||||
|
||||
EmitError(IDS_SDL_INTERNAL);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CSchemaParser, OnID)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CSchemaParser, OnAttributeFormDefault)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CSchemaParser, OnBlockDefault)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CSchemaParser, OnElementFormDefault)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CSchemaParser, OnFinalDefault)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CSchemaParser, OnVersion)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CSchemaParser::startPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix,
|
||||
const wchar_t *wszUri,
|
||||
int cchUri)
|
||||
{
|
||||
CSchema * pCurr = GetSchema();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetNamespaceUri(wszPrefix, cchPrefix, wszUri, cchUri);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CSchemaParser::EmitNamedElementError(const char *szElem)
|
||||
{
|
||||
int nLine = 0;
|
||||
int nCol = 0;
|
||||
GetLocator()->getLineNumber(&nLine);
|
||||
GetLocator()->getColumnNumber(&nCol);
|
||||
CSchema *pCurr = GetSchema();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
EmitFileError(IDS_SDL_SCHEMALEVEL_NAME,
|
||||
(LPCWSTR) pCurr->GetParentDocument()->GetDocumentUri(),
|
||||
nLine, nCol, 0, szElem);
|
||||
}
|
||||
EmitError(IDS_SDL_INTERNAL);
|
||||
}
|
||||
@@ -1,124 +0,0 @@
|
||||
//
|
||||
// SchemaParser.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Parser.h"
|
||||
#include "Emit.h"
|
||||
#include "resource.h"
|
||||
|
||||
class CSchema;
|
||||
|
||||
class CSchemaParser : public CParserBase
|
||||
{
|
||||
private:
|
||||
|
||||
CSchema * m_pSchema;
|
||||
|
||||
public:
|
||||
|
||||
inline CSchemaParser(ISAXXMLReader *pReader, CParserBase *pParent, DWORD dwLevel, CSchema *pSchema = NULL)
|
||||
:CParserBase(pReader, pParent, dwLevel), m_pSchema(pSchema)
|
||||
{
|
||||
}
|
||||
|
||||
inline CSchema * GetSchema()
|
||||
{
|
||||
return m_pSchema;
|
||||
}
|
||||
|
||||
inline void SetSchema(CSchema *pSchema)
|
||||
{
|
||||
m_pSchema = pSchema;
|
||||
}
|
||||
|
||||
void EmitNamedElementError(const char *szElem);
|
||||
|
||||
inline void MarkUnsupported(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int nLine;
|
||||
int nCol;
|
||||
GetLocator()->getLineNumber(&nLine);
|
||||
GetLocator()->getColumnNumber(&nCol);
|
||||
ATLTRACE( _T("%sUnsupported tag@(%d, %d) : %.*ws -- skipping element\n"), GetTabs(GetLevel()),
|
||||
nLine, nCol,
|
||||
cchQName, wszQName );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
include, import, annotation, redefine
|
||||
attribute, attributeGroup, element, group, notation, simpleType, complexType
|
||||
*/
|
||||
|
||||
BEGIN_XMLTAG_MAP()
|
||||
XMLTAG_ENTRY_EX("include", XSD_NAMESPACEA, OnInclude)
|
||||
XMLTAG_ENTRY_EX("import", XSD_NAMESPACEA, OnImport)
|
||||
XMLTAG_ENTRY_EX("annotation", XSD_NAMESPACEA, OnAnnotation)
|
||||
XMLTAG_ENTRY_EX("redefine", XSD_NAMESPACEA, OnRedefine)
|
||||
XMLTAG_ENTRY_EX("attribute", XSD_NAMESPACEA, OnAttribute)
|
||||
XMLTAG_ENTRY_EX("attributeGroup", XSD_NAMESPACEA, OnAttributeGroup)
|
||||
XMLTAG_ENTRY_EX("element", XSD_NAMESPACEA, OnElement)
|
||||
XMLTAG_ENTRY_EX("group", XSD_NAMESPACEA, OnGroup)
|
||||
XMLTAG_ENTRY_EX("notation", XSD_NAMESPACEA, OnNotation)
|
||||
XMLTAG_ENTRY_EX("simpleType", XSD_NAMESPACEA, OnSimpleType)
|
||||
XMLTAG_ENTRY_EX("complexType", XSD_NAMESPACEA, OnComplexType)
|
||||
END_XMLTAG_MAP()
|
||||
|
||||
/*
|
||||
<schema
|
||||
attributeFormDefault = "{ qualified | unqualified }"
|
||||
blockDefault = "#all or (possibly empty) subset of {equivClass, extension, restriction}"
|
||||
elementFormDefault = "{ qualified | unqualified }"
|
||||
finalDefault = "#all or (possibly empty) subset of {extension, restriction}"
|
||||
id = "ID"
|
||||
name="schema-name"
|
||||
targetNamespace = "uriReference"
|
||||
version = "string"
|
||||
xmlns="uriReference"
|
||||
{any attributes with non-schema namespace}
|
||||
>
|
||||
*/
|
||||
BEGIN_XMLATTR_MAP()
|
||||
XMLATTR_ENTRY("name", OnName)
|
||||
XMLATTR_ENTRY("targetNamespace", OnTargetNamespace)
|
||||
XMLATTR_ENTRY("id", OnID)
|
||||
XMLATTR_ENTRY("attributeFormDefault", OnAttributeFormDefault)
|
||||
XMLATTR_ENTRY("blockDefault", OnBlockDefault)
|
||||
XMLATTR_ENTRY("elementFormDefault", OnElementFormDefault)
|
||||
XMLATTR_ENTRY("finalDefault", OnFinalDefault)
|
||||
XMLATTR_ENTRY("version", OnVersion)
|
||||
END_XMLATTR_MAP()
|
||||
|
||||
TAG_METHOD_DECL(OnInclude);
|
||||
TAG_METHOD_DECL(OnImport);
|
||||
TAG_METHOD_DECL(OnAnnotation);
|
||||
TAG_METHOD_DECL(OnRedefine);
|
||||
TAG_METHOD_DECL(OnAttribute);
|
||||
TAG_METHOD_DECL(OnAttributeGroup);
|
||||
TAG_METHOD_DECL(OnElement);
|
||||
TAG_METHOD_DECL(OnGroup);
|
||||
TAG_METHOD_DECL(OnNotation);
|
||||
TAG_METHOD_DECL(OnSimpleType);
|
||||
TAG_METHOD_DECL(OnComplexType);
|
||||
|
||||
ATTR_METHOD_DECL(OnName);
|
||||
ATTR_METHOD_DECL(OnTargetNamespace);
|
||||
ATTR_METHOD_DECL(OnID);
|
||||
ATTR_METHOD_DECL(OnAttributeFormDefault);
|
||||
ATTR_METHOD_DECL(OnBlockDefault);
|
||||
ATTR_METHOD_DECL(OnElementFormDefault);
|
||||
ATTR_METHOD_DECL(OnFinalDefault);
|
||||
ATTR_METHOD_DECL(OnVersion);
|
||||
|
||||
HRESULT __stdcall startPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix,
|
||||
const wchar_t *wszUri,
|
||||
int cchUri);
|
||||
};
|
||||
@@ -1,276 +0,0 @@
|
||||
//
|
||||
// SimpleType.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "XSDElement.h"
|
||||
#include "QName.h"
|
||||
|
||||
// typedef CStringW CEnumeration;
|
||||
// typedef CStringElementTraits<CStringW> CEnumerationElementTraits;
|
||||
|
||||
class CEnumeration
|
||||
{
|
||||
private:
|
||||
|
||||
CStringW m_strValue;
|
||||
|
||||
public:
|
||||
|
||||
inline HRESULT SetValue(const wchar_t *wszValue, int cchValue)
|
||||
{
|
||||
if (!wszValue)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strValue.SetString(wszValue, cchValue);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetValue(const CStringW& strValue)
|
||||
{
|
||||
m_strValue = strValue;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
const CStringW& GetValue()
|
||||
{
|
||||
return m_strValue;
|
||||
}
|
||||
|
||||
const CStringW& GetValue() const
|
||||
{
|
||||
return m_strValue;
|
||||
}
|
||||
};
|
||||
|
||||
class CEnumerationElementTraits :
|
||||
public CElementTraitsBase<CEnumeration>
|
||||
{
|
||||
public:
|
||||
|
||||
static ULONG Hash( INARGTYPE e )
|
||||
{
|
||||
LPCWSTR wsz = (LPCWSTR) e.GetValue();
|
||||
ULONG nHash = 0;
|
||||
while (*wsz != 0)
|
||||
{
|
||||
nHash = (nHash<<5)+nHash+(*wsz);
|
||||
wsz++;
|
||||
}
|
||||
|
||||
return nHash;
|
||||
}
|
||||
|
||||
static bool CompareElements(INARGTYPE e1, INARGTYPE e2)
|
||||
{
|
||||
return e1.GetValue() == e2.GetValue();
|
||||
}
|
||||
|
||||
static int CompareElementsOrdered(INARGTYPE e1, INARGTYPE e2)
|
||||
{
|
||||
return (CStringW::StrTraits::StringCompare(e1.GetValue(), e2.GetValue()));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
enum ENCODING_TYPE
|
||||
{
|
||||
ENCODING_ERR = 0,
|
||||
ENCODING_UNK,
|
||||
ENCODING_HEX,
|
||||
ENCODING_BASE64
|
||||
};
|
||||
|
||||
ENCODING_TYPE GetEncodingAttribute(const wchar_t *wszVal, int cchVal);
|
||||
|
||||
class CSimpleType : public CXSDElement
|
||||
{
|
||||
private:
|
||||
|
||||
CAtlList<CEnumeration, CEnumerationElementTraits > m_enumerations;
|
||||
ENCODING_TYPE m_encType;
|
||||
int m_nLength;
|
||||
int m_nMaxLength;
|
||||
int m_nMinLength;
|
||||
|
||||
CStringW m_strName;
|
||||
CQName m_base;
|
||||
|
||||
public:
|
||||
|
||||
CSimpleType()
|
||||
:m_encType(ENCODING_UNK), m_nLength(-1), m_nMaxLength(-1), m_nMinLength(-1)
|
||||
{
|
||||
SetElementType(XSD_SIMPLETYPE);
|
||||
}
|
||||
|
||||
inline HRESULT SetName(const wchar_t *wszName, int cchName)
|
||||
{
|
||||
if (!wszName)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strName.SetString(wszName, cchName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetName(const CStringW& strName)
|
||||
{
|
||||
m_strName = strName;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetBase(const CStringW& strQName)
|
||||
{
|
||||
m_base.SetQName(strQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetBase(const CStringW& strPrefix, const CStringW& strName)
|
||||
{
|
||||
m_base.SetQName(strPrefix, strName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetBase(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
m_base.SetQName(wszQName, cchQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline CQName& GetBase()
|
||||
{
|
||||
return m_base;
|
||||
}
|
||||
|
||||
inline const CStringW& GetName()
|
||||
{
|
||||
return m_strName;
|
||||
}
|
||||
|
||||
inline ENCODING_TYPE GetEncodingType()
|
||||
{
|
||||
return m_encType;
|
||||
}
|
||||
|
||||
inline ENCODING_TYPE SetEncodingType(ENCODING_TYPE encType)
|
||||
{
|
||||
return m_encType = encType;
|
||||
}
|
||||
|
||||
inline HRESULT SetEncodingType(const wchar_t * wszVal, int cchVal)
|
||||
{
|
||||
m_encType = GetEncodingAttribute(wszVal, cchVal);
|
||||
if ((m_encType != ENCODING_ERR) &&
|
||||
(m_encType != ENCODING_UNK))
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
inline CEnumeration * AddEnumeration(CEnumeration* pEnum = NULL)
|
||||
{
|
||||
POSITION pos = NULL;
|
||||
if (pEnum != NULL)
|
||||
{
|
||||
pos = m_enumerations.AddTail(*pEnum);
|
||||
}
|
||||
else
|
||||
{
|
||||
CEnumeration e;
|
||||
pos = m_enumerations.AddTail(e);
|
||||
}
|
||||
|
||||
if (pos != NULL)
|
||||
{
|
||||
return &(m_enumerations.GetAt(pos));
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline POSITION GetFirstEnumeration()
|
||||
{
|
||||
return m_enumerations.GetHeadPosition();
|
||||
}
|
||||
|
||||
inline CEnumeration * GetNextEnumeration(POSITION &pos)
|
||||
{
|
||||
return &m_enumerations.GetNext(pos);
|
||||
}
|
||||
|
||||
inline BOOL HasLength()
|
||||
{
|
||||
return (m_nLength != -1 ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
inline BOOL HasMinLength()
|
||||
{
|
||||
return (m_nMinLength != -1 ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
inline BOOL HasMaxLength()
|
||||
{
|
||||
return (m_nMaxLength != -1 ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
inline int GetLength()
|
||||
{
|
||||
return m_nLength;
|
||||
}
|
||||
|
||||
inline void SetLength(int nLength)
|
||||
{
|
||||
m_nLength = nLength;
|
||||
}
|
||||
|
||||
inline int GetMinLength()
|
||||
{
|
||||
return m_nMinLength;
|
||||
}
|
||||
|
||||
inline void SetMinLength(int nLength)
|
||||
{
|
||||
m_nMinLength = nLength;
|
||||
}
|
||||
|
||||
inline int GetMaxLength()
|
||||
{
|
||||
return m_nMaxLength;
|
||||
}
|
||||
|
||||
inline void SetMaxLength(int nLength)
|
||||
{
|
||||
m_nMaxLength = nLength;
|
||||
}
|
||||
};
|
||||
|
||||
inline ENCODING_TYPE GetEncodingAttribute(const wchar_t *wszVal, int cchVal)
|
||||
{
|
||||
ENCODING_TYPE ret = ENCODING_ERR;
|
||||
if (cchVal == sizeof("hex")-1 && !wcsncmp(wszVal, L"hex", cchVal))
|
||||
{
|
||||
ret = ENCODING_HEX;
|
||||
}
|
||||
else if (cchVal == sizeof("base64")-1 && !wcsncmp(wszVal, L"base64", cchVal))
|
||||
{
|
||||
ret = ENCODING_BASE64;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1,260 +0,0 @@
|
||||
//
|
||||
// SimpleTypeParser.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "SimpleTypeParser.h"
|
||||
#include "SimpleType.h"
|
||||
#include "Util.h"
|
||||
#include "Emit.h"
|
||||
#include "resource.h"
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnAnnotation)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnLength)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnPattern)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnEnumeration)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CSimpleType * pCurr = GetSimpleType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
CEnumeration *pElem = pCurr->AddEnumeration();
|
||||
if (pElem != NULL)
|
||||
{
|
||||
CStringW strValue;
|
||||
if (SUCCEEDED(GetAttribute(pAttributes, L"value", sizeof("value")-1, strValue)))
|
||||
{
|
||||
if (SUCCEEDED(pElem->SetValue(strValue)))
|
||||
{
|
||||
return SkipElement();
|
||||
}
|
||||
}
|
||||
OnMissingAttribute(TRUE, L"value", sizeof("value")-1, L"", 0);
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnScale)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnPeriod)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnDuration)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnMaxLength)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnPrecision)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnMinInclusive)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnMinExclusive)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnMaxInclusive)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnMaxExclusive)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnMinLength)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
MarkUnsupported(wszQName, cchQName);
|
||||
EmitSkip(wszNamespaceUri, wszLocalName);
|
||||
|
||||
return SkipElement();
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnEncoding)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
DisableReset();
|
||||
|
||||
CSimpleType * pCurr = GetSimpleType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
const wchar_t *wsz = NULL;
|
||||
int cch = 0;
|
||||
HRESULT hr = GetAttribute(pAttributes, L"value", sizeof("value")-1, &wsz, &cch);
|
||||
if ((SUCCEEDED(hr)) && (wsz != NULL))
|
||||
{
|
||||
return pCurr->SetEncodingType(wsz, cch);
|
||||
}
|
||||
|
||||
OnMissingAttribute(TRUE, L"value", sizeof("value")-1, L"", 0);
|
||||
}
|
||||
|
||||
EmitError(IDS_SDL_INTERNAL);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TAG_METHOD_IMPL(CSimpleTypeParser, OnRestriction)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
DisableReset();
|
||||
|
||||
CSimpleType * pCurr = GetSimpleType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
const wchar_t *wsz = NULL;
|
||||
int cch = 0;
|
||||
HRESULT hr = GetAttribute(pAttributes, L"base", sizeof("base")-1,
|
||||
&wsz, &cch);
|
||||
if ((hr == S_OK) && (wsz != NULL))
|
||||
{
|
||||
return pCurr->SetBase(wsz, cch);
|
||||
}
|
||||
OnMissingAttribute(TRUE, L"base", sizeof("base")-1, L"", 0);
|
||||
}
|
||||
|
||||
EmitError(IDS_SDL_INTERNAL);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
ATTR_METHOD_IMPL(CSimpleTypeParser, OnName)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
CSimpleType * pCurr = GetSimpleType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetName(wszValue, cchValue);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CSimpleTypeParser, OnID)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ATTR_METHOD_IMPL(CSimpleTypeParser, OnAbstract)
|
||||
{
|
||||
TRACE_PARSE_ENTRY();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall CSimpleTypeParser::startPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix,
|
||||
const wchar_t *wszUri,
|
||||
int cchUri)
|
||||
{
|
||||
CSimpleType * pCurr = GetSimpleType();
|
||||
if (pCurr != NULL)
|
||||
{
|
||||
return pCurr->SetNamespaceUri(wszPrefix, cchPrefix, wszUri, cchUri);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
//
|
||||
// SimpleTypeParser.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Parser.h"
|
||||
#include "resource.h"
|
||||
|
||||
class CSimpleType;
|
||||
|
||||
class CSimpleTypeParser : public CParserBase
|
||||
{
|
||||
private:
|
||||
|
||||
CSimpleType * m_pType;
|
||||
|
||||
public:
|
||||
|
||||
inline CSimpleTypeParser(ISAXXMLReader *pReader, CParserBase *pParent, DWORD dwLevel, CSimpleType * pType)
|
||||
:CParserBase(pReader, pParent, dwLevel), m_pType(pType)
|
||||
{
|
||||
}
|
||||
|
||||
inline CSimpleType * GetSimpleType()
|
||||
{
|
||||
return m_pType;
|
||||
}
|
||||
|
||||
inline void SetSimpleType(CSimpleType * pType)
|
||||
{
|
||||
m_pType = pType;
|
||||
}
|
||||
|
||||
inline void MarkUnsupported(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int nLine;
|
||||
int nCol;
|
||||
GetLocator()->getLineNumber(&nLine);
|
||||
GetLocator()->getColumnNumber(&nCol);
|
||||
ATLTRACE( _T("%sUnsupported tag@(%d, %d) : %.*ws -- skipping element\n"), GetTabs(GetLevel()),
|
||||
nLine, nCol,
|
||||
cchQName, wszQName );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
annotation, length, enumeration, pattern, scale, period, duration,
|
||||
maxLength, precision, minInclusive, minExclusive, maxInclusive,
|
||||
maxExclusive, minLength, encoding
|
||||
*/
|
||||
BEGIN_XMLTAG_MAP()
|
||||
XMLTAG_ENTRY_EX("enumeration", XSD_NAMESPACEA, OnEnumeration)
|
||||
XMLTAG_ENTRY_EX("annotation", XSD_NAMESPACEA, OnAnnotation)
|
||||
XMLTAG_ENTRY_EX("length", XSD_NAMESPACEA, OnLength)
|
||||
XMLTAG_ENTRY_EX("pattern", XSD_NAMESPACEA, OnPattern)
|
||||
XMLTAG_ENTRY_EX("scale", XSD_NAMESPACEA, OnScale)
|
||||
XMLTAG_ENTRY_EX("period", XSD_NAMESPACEA, OnPeriod)
|
||||
XMLTAG_ENTRY_EX("duration", XSD_NAMESPACEA, OnDuration)
|
||||
XMLTAG_ENTRY_EX("maxLength", XSD_NAMESPACEA, OnMaxLength)
|
||||
XMLTAG_ENTRY_EX("precision", XSD_NAMESPACEA, OnPrecision)
|
||||
XMLTAG_ENTRY_EX("minInclusive", XSD_NAMESPACEA, OnMinInclusive)
|
||||
XMLTAG_ENTRY_EX("minExclusive", XSD_NAMESPACEA, OnMinExclusive)
|
||||
XMLTAG_ENTRY_EX("maxInclusive", XSD_NAMESPACEA, OnMaxInclusive)
|
||||
XMLTAG_ENTRY_EX("maxExclusive", XSD_NAMESPACEA, OnMaxExclusive)
|
||||
XMLTAG_ENTRY_EX("minLength", XSD_NAMESPACEA, OnMinLength)
|
||||
XMLTAG_ENTRY_EX("encoding", XSD_NAMESPACEA, OnEncoding)
|
||||
|
||||
// REVIEW: new one
|
||||
XMLTAG_ENTRY_EX("restriction", XSD_NAMESPACEA, OnRestriction)
|
||||
END_XMLTAG_MAP()
|
||||
|
||||
/*
|
||||
<simpleType
|
||||
abstract = "boolean"
|
||||
id = "ID"
|
||||
name="NCName"
|
||||
{any attributes with non-schema namespace}
|
||||
>
|
||||
*/
|
||||
BEGIN_XMLATTR_MAP()
|
||||
XMLATTR_ENTRY("name", OnName)
|
||||
XMLATTR_ENTRY("id", OnID)
|
||||
XMLATTR_ENTRY("abstract", OnAbstract)
|
||||
END_XMLATTR_MAP()
|
||||
|
||||
TAG_METHOD_DECL(OnAnnotation);
|
||||
TAG_METHOD_DECL(OnLength);
|
||||
TAG_METHOD_DECL(OnPattern);
|
||||
TAG_METHOD_DECL(OnEnumeration);
|
||||
TAG_METHOD_DECL(OnScale);
|
||||
TAG_METHOD_DECL(OnPeriod);
|
||||
TAG_METHOD_DECL(OnDuration);
|
||||
TAG_METHOD_DECL(OnMaxLength);
|
||||
TAG_METHOD_DECL(OnPrecision);
|
||||
TAG_METHOD_DECL(OnMinInclusive);
|
||||
TAG_METHOD_DECL(OnMinExclusive);
|
||||
TAG_METHOD_DECL(OnMaxInclusive);
|
||||
TAG_METHOD_DECL(OnMaxExclusive);
|
||||
TAG_METHOD_DECL(OnMinLength);
|
||||
TAG_METHOD_DECL(OnEncoding);
|
||||
TAG_METHOD_DECL(OnRestriction);
|
||||
|
||||
ATTR_METHOD_DECL(OnName);
|
||||
ATTR_METHOD_DECL(OnID);
|
||||
ATTR_METHOD_DECL(OnAbstract);
|
||||
|
||||
HRESULT __stdcall startPrefixMapping(
|
||||
const wchar_t *wszPrefix,
|
||||
int cchPrefix,
|
||||
const wchar_t *wszUri,
|
||||
int cchUri);
|
||||
};
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// SkipParser.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Parser.h"
|
||||
|
||||
class CSkipParser : public CParserBase
|
||||
{
|
||||
public:
|
||||
|
||||
inline CSkipParser(ISAXXMLReader *pReader, CParserBase *pParent, DWORD dwLevel)
|
||||
:CParserBase(pReader, pParent, dwLevel)
|
||||
{
|
||||
}
|
||||
|
||||
virtual HRESULT OnUnrecognizedTag(
|
||||
const wchar_t *wszNamespaceUri, int cchNamespaceUri,
|
||||
const wchar_t *wszLocalName, int cchLocalName,
|
||||
const wchar_t *wszQName, int cchQName,
|
||||
ISAXAttributes *pAttributes) throw()
|
||||
{
|
||||
DisableReset();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
BEGIN_XMLTAG_MAP()
|
||||
END_XMLTAG_MAP()
|
||||
};
|
||||
@@ -1,92 +0,0 @@
|
||||
//
|
||||
// SproxyColl.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
template <typename E, class ETraits = CElementTraits<E> >
|
||||
class CAtlPtrList : public CAtlList<E, ETraits>
|
||||
{
|
||||
private:
|
||||
typedef CAtlList<E, ETraits> Base;
|
||||
BOOL m_bAttached;
|
||||
|
||||
public:
|
||||
|
||||
CAtlPtrList()
|
||||
:m_bAttached(TRUE)
|
||||
{
|
||||
}
|
||||
|
||||
void Detach()
|
||||
{
|
||||
m_bAttached = FALSE;
|
||||
}
|
||||
|
||||
void RemoveAll()
|
||||
{
|
||||
if (m_bAttached)
|
||||
{
|
||||
POSITION pos = GetHeadPosition();
|
||||
while (pos != NULL)
|
||||
{
|
||||
delete (GetAt(pos));
|
||||
GetAt(pos) = NULL;
|
||||
GetNext(pos);
|
||||
}
|
||||
}
|
||||
Base::RemoveAll();
|
||||
}
|
||||
|
||||
~CAtlPtrList()
|
||||
{
|
||||
RemoveAll();
|
||||
}
|
||||
}; // class CAtlPtrList
|
||||
|
||||
|
||||
template <typename K, typename V, class KTraits = CElementTraits<K>, class VTraits = CElementTraits<V> >
|
||||
class CAtlPtrMap : public CAtlMap<K, V, KTraits, VTraits>
|
||||
{
|
||||
private:
|
||||
typedef CAtlMap<K, V, KTraits, VTraits> Base;
|
||||
BOOL m_bAttached;
|
||||
|
||||
public:
|
||||
|
||||
CAtlPtrMap()
|
||||
:m_bAttached(TRUE)
|
||||
{
|
||||
}
|
||||
|
||||
void Detach()
|
||||
{
|
||||
m_bAttached = FALSE;
|
||||
}
|
||||
|
||||
void RemoveAll()
|
||||
{
|
||||
Base::DisableAutoRehash();
|
||||
if (m_bAttached)
|
||||
{
|
||||
POSITION pos = GetStartPosition();
|
||||
while (pos != NULL)
|
||||
{
|
||||
delete (GetValueAt(pos));
|
||||
GetValueAt(pos) = NULL;
|
||||
GetNext(pos);
|
||||
}
|
||||
}
|
||||
Base::RemoveAll();
|
||||
Base::EnableAutoRehash();
|
||||
}
|
||||
|
||||
~CAtlPtrMap()
|
||||
{
|
||||
RemoveAll();
|
||||
}
|
||||
}; // class CAtlPtrMap
|
||||
@@ -1,9 +0,0 @@
|
||||
//
|
||||
// SproxyError.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
@@ -1,11 +0,0 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// sproxy.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
@@ -1,72 +0,0 @@
|
||||
//
|
||||
// stdafx.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma warning(1: 4927)
|
||||
#pragma warning(1: 4928)
|
||||
|
||||
#define _WIN32_WINNT 0x0502
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define ATL_DEBUG_STENCILS
|
||||
#endif
|
||||
|
||||
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlpath.h>
|
||||
#include <msxml2.h>
|
||||
#include <atlstencil.h>
|
||||
#include "SproxyColl.h"
|
||||
#include "resource.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
|
||||
#define _MAKEWIDESTR( str ) L ## str
|
||||
#define MAKEWIDESTR( str ) _MAKEWIDESTR( str )
|
||||
|
||||
#include "Namespaces.h"
|
||||
|
||||
typedef CAtlMap<CStringW, CStringW, CStringRefElementTraits<CStringW>, CStringRefElementTraits<CStringW> > NAMESPACEMAP;
|
||||
|
||||
const wchar_t * GetWSDLFile();
|
||||
|
||||
#include "DiscoMapDocument.h"
|
||||
|
||||
CDiscoMapDocument * GetDiscoMapDocument();
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
inline const TCHAR * GetTabs(DWORD dwLevel)
|
||||
{
|
||||
static TCHAR s_szTabs[2048];
|
||||
|
||||
dwLevel = min(dwLevel, 2047);
|
||||
for (DWORD i=0; i<dwLevel; i++)
|
||||
{
|
||||
s_szTabs[i] = _T('\t');
|
||||
}
|
||||
|
||||
s_szTabs[dwLevel] = _T('\0');
|
||||
|
||||
return s_szTabs;
|
||||
}
|
||||
#else // _DEBUG
|
||||
|
||||
#define GetTabs __noop
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CreateSafeCppName(char **ppszName, const wchar_t *wszName);
|
||||
HRESULT CreateSafeCppName(char **ppszName, const char *wszName);
|
||||
|
||||
HRESULT CreateSafeCppName(CStringA& strSafeName, const wchar_t *wszName);
|
||||
HRESULT CreateSafeCppName(CStringA& strSafeName, const char *wszName);
|
||||
|
||||
#pragma warning(disable:4100)
|
||||
@@ -1,212 +0,0 @@
|
||||
//
|
||||
// Util.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Util.h"
|
||||
#include "CppKeywordTable.h"
|
||||
|
||||
HRESULT GetAttribute(
|
||||
ISAXAttributes *pAttributes,
|
||||
const wchar_t *wszAttrName, int cchName,
|
||||
const wchar_t **pwszValue, int *pcchValue,
|
||||
wchar_t *wszNamespace, int cchNamespace)
|
||||
{
|
||||
if (!pAttributes || !wszAttrName || !pwszValue || !pcchValue)
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
*pwszValue = NULL;
|
||||
*pcchValue = 0;
|
||||
if (!wszNamespace)
|
||||
{
|
||||
return (pAttributes->getValueFromQName(wszAttrName, cchName, pwszValue, pcchValue) == S_OK ? S_OK : E_FAIL);
|
||||
}
|
||||
return (pAttributes->getValueFromName(wszNamespace, cchNamespace,
|
||||
wszAttrName, cchName, pwszValue, pcchValue) == S_OK ? S_OK : E_FAIL);
|
||||
}
|
||||
|
||||
HRESULT GetAttribute(
|
||||
ISAXAttributes *pAttributes,
|
||||
const wchar_t *wszAttrName, int cchName,
|
||||
CStringW &strValue,
|
||||
wchar_t *wszNamespace, int cchNamespace)
|
||||
{
|
||||
const wchar_t *wszValue = NULL;
|
||||
int cchValue = 0;
|
||||
|
||||
if (!pAttributes || !wszAttrName)
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
HRESULT hr;
|
||||
if (!wszNamespace)
|
||||
{
|
||||
hr = (pAttributes->getValueFromQName(wszAttrName, cchName, &wszValue, &cchValue) == S_OK ? S_OK : E_FAIL);
|
||||
}
|
||||
else
|
||||
{
|
||||
hr = (pAttributes->getValueFromName(wszNamespace, cchNamespace,
|
||||
wszAttrName, cchName, &wszValue, &cchValue) == S_OK ? S_OK : E_FAIL);
|
||||
}
|
||||
|
||||
if (hr == S_OK)
|
||||
{
|
||||
strValue.SetString(wszValue, cchValue);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
inline int IsUnsafeCppChar(char ch)
|
||||
{
|
||||
return (!isalnum((unsigned char)ch) && ch != '_');
|
||||
}
|
||||
|
||||
void _CreateSafeCppName(
|
||||
char *szSafeName,
|
||||
const char *szName,
|
||||
const wchar_t *wszName,
|
||||
size_t nMaxLen)
|
||||
{
|
||||
ATLASSERT( szSafeName != NULL );
|
||||
ATLASSERT( szName != NULL );
|
||||
ATLASSERT( wszName != NULL );
|
||||
|
||||
static CCppKeywordLookup cppkwLookup;
|
||||
const CCppKeywordLookup::HashNode *p = cppkwLookup.Lookup(wszName);
|
||||
|
||||
char *pszOut = szSafeName;
|
||||
|
||||
size_t nLen = 0;
|
||||
if (p != NULL)
|
||||
{
|
||||
// append 3 underscores for a reserved keyword -- ugly, but hey...
|
||||
memcpy(pszOut, "___", 3);
|
||||
pszOut+= 3;
|
||||
nLen+= 3;
|
||||
}
|
||||
|
||||
if (isdigit((unsigned char)(*szName)))
|
||||
{
|
||||
*pszOut++ = '_';
|
||||
nLen++;
|
||||
}
|
||||
|
||||
while (*szName)
|
||||
{
|
||||
if (nLen == nMaxLen)
|
||||
{
|
||||
// just truncate
|
||||
break;
|
||||
}
|
||||
|
||||
if (IsUnsafeCppChar(*szName))
|
||||
{
|
||||
*pszOut = '_';
|
||||
}
|
||||
else
|
||||
{
|
||||
*pszOut = *szName;
|
||||
}
|
||||
pszOut++;
|
||||
szName++;
|
||||
nLen++;
|
||||
}
|
||||
|
||||
*pszOut = '\0';
|
||||
}
|
||||
|
||||
size_t AllocateNameString(char **ppszName, const char *szName)
|
||||
{
|
||||
ATLASSERT( ppszName != NULL );
|
||||
ATLASSERT( szName != NULL );
|
||||
|
||||
size_t nMaxLen = 3*strlen(szName);
|
||||
*ppszName = (char *)malloc(nMaxLen+1);
|
||||
if (!*ppszName)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return nMaxLen;
|
||||
}
|
||||
|
||||
size_t AllocateNameString(char **ppszName, const wchar_t *wszName)
|
||||
{
|
||||
ATLASSERT( ppszName != NULL );
|
||||
ATLASSERT( wszName != NULL );
|
||||
|
||||
size_t nMaxLen = 3*wcslen(wszName);
|
||||
*ppszName = (char *)malloc(nMaxLen+1);
|
||||
if (!*ppszName)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return nMaxLen;
|
||||
}
|
||||
|
||||
HRESULT CreateSafeCppName(char **ppszName, const char *szName)
|
||||
{
|
||||
ATLASSERT( ppszName != NULL );
|
||||
ATLASSERT( szName != NULL );
|
||||
|
||||
size_t nMaxLen = AllocateNameString(ppszName, szName);
|
||||
if (!nMaxLen)
|
||||
{
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
_CreateSafeCppName(*ppszName, szName, CA2W( szName ), nMaxLen);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CreateSafeCppName(char **ppszName, const wchar_t *wszName)
|
||||
{
|
||||
ATLASSERT( ppszName != NULL );
|
||||
ATLASSERT( wszName != NULL );
|
||||
|
||||
size_t nMaxLen = AllocateNameString(ppszName, wszName);
|
||||
if (!nMaxLen)
|
||||
{
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
_CreateSafeCppName(*ppszName, CW2A( wszName ), wszName, nMaxLen);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CreateSafeCppName(CStringA& strSafeName, const wchar_t *wszName)
|
||||
{
|
||||
ATLASSERT( wszName != NULL );
|
||||
|
||||
size_t nMaxLen = 3*wcslen(wszName);
|
||||
|
||||
char *szSafeName = strSafeName.GetBuffer((int) nMaxLen);
|
||||
|
||||
_CreateSafeCppName(szSafeName, CW2A( wszName ), wszName, nMaxLen);
|
||||
|
||||
strSafeName.ReleaseBuffer();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CreateSafeCppName(CStringA& strSafeName, const char *szName)
|
||||
{
|
||||
ATLASSERT( szName != NULL );
|
||||
|
||||
size_t nMaxLen = 3*strlen(szName);
|
||||
|
||||
char *szSafeName = strSafeName.GetBuffer((int) nMaxLen);
|
||||
|
||||
_CreateSafeCppName(szSafeName, szName, CA2W( szName ), nMaxLen);
|
||||
|
||||
strSafeName.ReleaseBuffer();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
//
|
||||
// Util.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
HRESULT GetAttribute(
|
||||
ISAXAttributes *pAttributes,
|
||||
const wchar_t *wszAttrName, int cchName,
|
||||
const wchar_t **pwszValue, int *pcchValue,
|
||||
wchar_t *wszNamespace = NULL, int cchNamespace = 0);
|
||||
|
||||
HRESULT GetAttribute(
|
||||
ISAXAttributes *pAttributes,
|
||||
const wchar_t *wszAttrName, int cchName,
|
||||
CStringW &strValue,
|
||||
wchar_t *wszNamespace = NULL, int cchNamespace = 0);
|
||||
|
||||
inline HRESULT GetBooleanValue(bool *pbOut, const wchar_t *wsz, int cch)
|
||||
{
|
||||
if (pbOut == NULL)
|
||||
{
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
if (wsz == NULL)
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
HRESULT hr = E_FAIL;
|
||||
|
||||
switch (wsz[0])
|
||||
{
|
||||
case L'1':
|
||||
{
|
||||
if (cch == 1)
|
||||
{
|
||||
*pbOut = true;
|
||||
hr = S_OK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case L'0':
|
||||
{
|
||||
if (cch == 1)
|
||||
{
|
||||
*pbOut = false;
|
||||
hr = S_OK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case L't':
|
||||
{
|
||||
if ((cch==sizeof("true")-1) && (!wcsncmp(wsz, L"true", cch)))
|
||||
{
|
||||
*pbOut = true;
|
||||
hr = S_OK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case L'f':
|
||||
{
|
||||
if ((cch==sizeof("false")-1) && (!wcsncmp(wsz, L"false", cch)))
|
||||
{
|
||||
*pbOut = false;
|
||||
hr = S_OK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
//
|
||||
// WSDLBinding.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "WSDLBinding.h"
|
||||
#include "WSDLPortType.h"
|
||||
#include "WSDLDocument.h"
|
||||
#include "Emit.h"
|
||||
#include "resource.h"
|
||||
|
||||
#include "Attribute.h"
|
||||
#include "Content.h"
|
||||
#include "Element.h"
|
||||
#include "ComplexType.h"
|
||||
|
||||
CWSDLPortType * CWSDLBinding::GetPortType()
|
||||
{
|
||||
if (m_pPortType != NULL)
|
||||
{
|
||||
return m_pPortType;
|
||||
}
|
||||
|
||||
CXMLDocument *pDoc = GetParentDocument();
|
||||
if (pDoc != NULL)
|
||||
{
|
||||
CStringW strUri;
|
||||
if (SUCCEEDED(GetNamespaceUri(m_type.GetPrefix(), strUri)))
|
||||
{
|
||||
if (strUri == pDoc->GetTargetNamespace())
|
||||
{
|
||||
if (pDoc->GetDocumentType() == WSDLDOC)
|
||||
{
|
||||
CWSDLDocument *pWSDLDoc = static_cast<CWSDLDocument *>(pDoc);
|
||||
m_pPortType = pWSDLDoc->GetPortType(m_type.GetName());
|
||||
}
|
||||
if (m_pPortType == NULL)
|
||||
{
|
||||
EmitFileError(IDS_SDL_UNRESOLVED_ELEM2, const_cast<CWSDLBinding *>(this), 0,
|
||||
"portType", strUri, m_type.GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EmitFileError(IDS_SDL_UNRESOLVED_NAMESPACE, const_cast<CWSDLBinding *>(this), 0, m_type.GetPrefix());
|
||||
}
|
||||
}
|
||||
|
||||
return m_pPortType;
|
||||
}
|
||||
@@ -1,260 +0,0 @@
|
||||
//
|
||||
// WSDLBinding.h
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "XMLElement.h"
|
||||
#include "QName.h"
|
||||
#include "Emit.h"
|
||||
|
||||
#include "WSDLPortTypeOperation.h"
|
||||
|
||||
class CWSDLPortType;
|
||||
|
||||
class CSoapBinding : public CXMLElement
|
||||
{
|
||||
private:
|
||||
CStringW m_strTransport;
|
||||
SOAPSTYLE m_style;
|
||||
|
||||
inline HRESULT ValidateStyle(const wchar_t *wsz, int cch)
|
||||
{
|
||||
m_style = ::GetStyle(wsz, cch);
|
||||
if (m_style != SOAPSTYLE_UNK)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
CSoapBinding()
|
||||
:m_style(SOAPSTYLE_UNK)
|
||||
{
|
||||
}
|
||||
|
||||
inline HRESULT SetTransport(const wchar_t *wszName, int cchName)
|
||||
{
|
||||
if (!wszName)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strTransport.SetString(wszName, cchName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline void SetTransport(const CStringW& strName)
|
||||
{
|
||||
m_strTransport = strName;
|
||||
}
|
||||
|
||||
inline const CStringW& GetTransport()
|
||||
{
|
||||
return m_strTransport;
|
||||
}
|
||||
|
||||
inline HRESULT SetStyle(const wchar_t *wszName, int cchName)
|
||||
{
|
||||
if (!wszName)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return ValidateStyle(wszName, cchName);
|
||||
}
|
||||
|
||||
inline HRESULT SetStyle(const CStringW& strName)
|
||||
{
|
||||
return ValidateStyle(strName, strName.GetLength());
|
||||
}
|
||||
|
||||
inline const SOAPSTYLE GetStyle()
|
||||
{
|
||||
return m_style;
|
||||
}
|
||||
};
|
||||
|
||||
class CHttpBinding : public CXMLElement
|
||||
{
|
||||
private:
|
||||
|
||||
CStringW m_strVerb;
|
||||
|
||||
public:
|
||||
|
||||
inline HRESULT SetVerb(const wchar_t *wszName, int cchName)
|
||||
{
|
||||
if (!wszName)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strVerb.SetString(wszName, cchName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetVerb(const CStringW& strName)
|
||||
{
|
||||
m_strVerb = strName;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetVerb()
|
||||
{
|
||||
return m_strVerb;
|
||||
}
|
||||
};
|
||||
|
||||
class CWSDLBinding : public CXMLElement
|
||||
{
|
||||
private:
|
||||
|
||||
CStringW m_strName;
|
||||
CQName m_type;
|
||||
|
||||
CWSDLPortType * m_pPortType;
|
||||
|
||||
CAutoPtr<CSoapBinding> m_pSoapBinding;
|
||||
CAutoPtr<CHttpBinding> m_pHttpBinding;
|
||||
|
||||
typedef CAtlPtrMap<CStringW, CWSDLPortTypeOperation *, CStringRefElementTraits<CStringW> > PORTYPEOPERATIONMAP;
|
||||
|
||||
PORTYPEOPERATIONMAP m_operations;
|
||||
|
||||
public:
|
||||
|
||||
inline CWSDLBinding()
|
||||
:m_pPortType(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
CWSDLPortType * GetPortType();
|
||||
|
||||
inline CWSDLPortTypeOperation * AddOperation(CWSDLPortTypeOperation *p)
|
||||
{
|
||||
if (p != NULL)
|
||||
{
|
||||
if (p->GetName().GetLength() != 0)
|
||||
{
|
||||
if (m_operations.SetAt(p->GetName(), p) != NULL)
|
||||
{
|
||||
return p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EmitErrorHr(E_OUTOFMEMORY);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline CSoapBinding * AddSoapBinding(CSoapBinding *pBinding = NULL)
|
||||
{
|
||||
if (pBinding == NULL)
|
||||
{
|
||||
pBinding = new CSoapBinding;
|
||||
}
|
||||
|
||||
m_pSoapBinding.Attach( pBinding );
|
||||
return m_pSoapBinding;
|
||||
}
|
||||
|
||||
inline CSoapBinding * GetSoapBinding()
|
||||
{
|
||||
return m_pSoapBinding;
|
||||
}
|
||||
|
||||
inline CHttpBinding * AddHttpBinding(CHttpBinding *pBinding = NULL)
|
||||
{
|
||||
if (pBinding == NULL)
|
||||
{
|
||||
pBinding = new CHttpBinding;
|
||||
}
|
||||
|
||||
m_pHttpBinding.Attach( pBinding );
|
||||
return m_pHttpBinding;
|
||||
}
|
||||
|
||||
inline CHttpBinding * GetHttpBinding()
|
||||
{
|
||||
return m_pHttpBinding;
|
||||
}
|
||||
|
||||
inline CWSDLPortTypeOperation * GetOperation(const CStringW& strName)
|
||||
{
|
||||
const PORTYPEOPERATIONMAP::CPair *p = m_operations.Lookup(strName);
|
||||
if (p != NULL)
|
||||
{
|
||||
return p->m_value;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline POSITION GetFirstOperation()
|
||||
{
|
||||
return m_operations.GetStartPosition();
|
||||
}
|
||||
|
||||
inline CWSDLPortTypeOperation * GetNextOperation(POSITION &pos)
|
||||
{
|
||||
return m_operations.GetNextValue(pos);
|
||||
}
|
||||
|
||||
inline HRESULT SetName(const wchar_t *wszName, int cchName)
|
||||
{
|
||||
if (!wszName)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strName.SetString(wszName, cchName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetName(const CStringW& strName)
|
||||
{
|
||||
m_strName = strName;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CStringW& GetName()
|
||||
{
|
||||
return m_strName;
|
||||
}
|
||||
|
||||
inline HRESULT SetType(const CStringW& strQName)
|
||||
{
|
||||
m_type.SetQName(strQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetType(const CStringW& strPrefix, const CStringW& strName)
|
||||
{
|
||||
m_type.SetQName(strPrefix, strName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline HRESULT SetType(const wchar_t *wszQName, int cchQName)
|
||||
{
|
||||
m_type.SetQName(wszQName, cchQName);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
inline const CQName& GetType()
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user