Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS

Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
This commit is contained in:
Cyd
2026-06-24 21:28:16 -05:00
commit 2b8ca921cb
66341 changed files with 7923174 additions and 0 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,12 @@
// This is a part of the Active Template Library.
// Copyright (C) 1996-1998 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.
///////////////////////////////////////
// No longer used
@@ -0,0 +1,365 @@
// This is a part of the Active Template Library.
// Copyright (C) 1996-1998 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 __ATLCONV_H__
#define __ATLCONV_H__
#ifndef __cplusplus
#error ATL requires C++ compilation (use a .cpp suffix)
#endif
#include <atldef.h>
#ifndef _INC_MALLOC
#include <malloc.h>
#endif // _INC_MALLOC
#pragma pack(push,8)
#ifdef _CONVERSION_USES_THREAD_LOCALE
#ifndef _DEBUG
#define USES_CONVERSION int _convert; _convert; UINT _acp = GetACP(); _acp; LPCWSTR _lpw; _lpw; LPCSTR _lpa; _lpa
#else
#define USES_CONVERSION int _convert = 0; _convert; UINT _acp = GetACP(); _acp; LPCWSTR _lpw = NULL; _lpw; LPCSTR _lpa = NULL; _lpa
#endif
#else
#ifndef _DEBUG
#define USES_CONVERSION int _convert; _convert; UINT _acp = CP_ACP; _acp; LPCWSTR _lpw; _lpw; LPCSTR _lpa; _lpa
#else
#define USES_CONVERSION int _convert = 0; _convert; UINT _acp = CP_ACP; _acp; LPCWSTR _lpw = NULL; _lpw; LPCSTR _lpa = NULL; _lpa
#endif
#endif
#ifdef _WINGDI_
ATLAPI_(LPDEVMODEA) AtlDevModeW2A(LPDEVMODEA lpDevModeA, LPDEVMODEW lpDevModeW);
#endif
/////////////////////////////////////////////////////////////////////////////
// Global UNICODE<>ANSI translation helpers
inline LPWSTR WINAPI AtlA2WHelper(LPWSTR lpw, LPCSTR lpa, int nChars, UINT acp)
{
ATLASSERT(lpa != NULL);
ATLASSERT(lpw != NULL);
// verify that no illegal character present
// since lpw was allocated based on the size of lpa
// don't worry about the number of chars
lpw[0] = '\0';
MultiByteToWideChar(acp, 0, lpa, -1, lpw, nChars);
return lpw;
}
inline LPSTR WINAPI AtlW2AHelper(LPSTR lpa, LPCWSTR lpw, int nChars, UINT acp)
{
ATLASSERT(lpw != NULL);
ATLASSERT(lpa != NULL);
// verify that no illegal character present
// since lpa was allocated based on the size of lpw
// don't worry about the number of chars
lpa[0] = '\0';
WideCharToMultiByte(acp, 0, lpw, -1, lpa, nChars, NULL, NULL);
return lpa;
}
inline LPWSTR WINAPI AtlA2WHelper(LPWSTR lpw, LPCSTR lpa, int nChars)
{
return AtlA2WHelper(lpw, lpa, nChars, CP_ACP);
}
inline LPSTR WINAPI AtlW2AHelper(LPSTR lpa, LPCWSTR lpw, int nChars)
{
return AtlW2AHelper(lpa, lpw, nChars, CP_ACP);
}
#ifdef _CONVERSION_USES_THREAD_LOCALE
#ifdef ATLA2WHELPER
#undef ATLA2WHELPER
#undef ATLW2AHELPER
#endif
#define ATLA2WHELPER AtlA2WHelper
#define ATLW2AHELPER AtlW2AHelper
#else
#ifndef ATLA2WHELPER
#define ATLA2WHELPER AtlA2WHelper
#define ATLW2AHELPER AtlW2AHelper
#endif
#endif
#ifdef _CONVERSION_USES_THREAD_LOCALE
#define A2W(lpa) (\
((_lpa = lpa) == NULL) ? NULL : (\
_convert = (lstrlenA(_lpa)+1),\
ATLA2WHELPER((LPWSTR) alloca(_convert*2), _lpa, _convert, _acp)))
#else
#define A2W(lpa) (\
((_lpa = lpa) == NULL) ? NULL : (\
_convert = (lstrlenA(_lpa)+1),\
ATLA2WHELPER((LPWSTR) alloca(_convert*2), _lpa, _convert)))
#endif
#ifdef _CONVERSION_USES_THREAD_LOCALE
#define W2A(lpw) (\
((_lpw = lpw) == NULL) ? NULL : (\
_convert = (lstrlenW(_lpw)+1)*2,\
ATLW2AHELPER((LPSTR) alloca(_convert), _lpw, _convert, _acp)))
#else
#define W2A(lpw) (\
((_lpw = lpw) == NULL) ? NULL : (\
_convert = (lstrlenW(_lpw)+1)*2,\
ATLW2AHELPER((LPSTR) alloca(_convert), _lpw, _convert)))
#endif
#define A2CW(lpa) ((LPCWSTR)A2W(lpa))
#define W2CA(lpw) ((LPCSTR)W2A(lpw))
#if defined(_UNICODE)
// in these cases the default (TCHAR) is the same as OLECHAR
inline size_t ocslen(LPCOLESTR x) { return lstrlenW(x); }
inline OLECHAR* ocscpy(LPOLESTR dest, LPCOLESTR src) { return lstrcpyW(dest, src); }
inline OLECHAR* ocscat(LPOLESTR dest, LPCOLESTR src) { return lstrcatW(dest, src); }
inline LPCOLESTR T2COLE(LPCTSTR lp) { return lp; }
inline LPCTSTR OLE2CT(LPCOLESTR lp) { return lp; }
inline LPOLESTR T2OLE(LPTSTR lp) { return lp; }
inline LPTSTR OLE2T(LPOLESTR lp) { return lp; }
inline LPOLESTR CharNextO(LPCOLESTR lp) {return CharNextW(lp);}
#elif defined(OLE2ANSI)
// in these cases the default (TCHAR) is the same as OLECHAR
inline size_t ocslen(LPCOLESTR x) { return lstrlen(x); }
inline OLECHAR* ocscpy(LPOLESTR dest, LPCOLESTR src) { return lstrcpy(dest, src); }
inline OLECHAR* ocscat(LPOLESTR dest, LPCOLESTR src) { return ocscpy(dest+ocslen(dest), src); }
inline LPCOLESTR T2COLE(LPCTSTR lp) { return lp; }
inline LPCTSTR OLE2CT(LPCOLESTR lp) { return lp; }
inline LPOLESTR T2OLE(LPTSTR lp) { return lp; }
inline LPTSTR OLE2T(LPOLESTR lp) { return lp; }
inline LPOLESTR CharNextO(LPCOLESTR lp) {return CharNext(lp);}
#else
inline size_t ocslen(LPCOLESTR x) { return lstrlenW(x); }
//lstrcpyW doesn't work on Win95, so we do this
inline OLECHAR* ocscpy(LPOLESTR dest, LPCOLESTR src)
{return (LPOLESTR) memcpy(dest, src, (lstrlenW(src)+1)*sizeof(WCHAR));}
inline OLECHAR* ocscat(LPOLESTR dest, LPCOLESTR src) { return ocscpy(dest+ocslen(dest), src); }
//CharNextW doesn't work on Win95 so we use this
#define T2COLE(lpa) A2CW(lpa)
#define T2OLE(lpa) A2W(lpa)
#define OLE2CT(lpo) W2CA(lpo)
#define OLE2T(lpo) W2A(lpo)
inline LPOLESTR CharNextO(LPCOLESTR lp) {return (LPOLESTR) ((*lp) ? (lp+1) : lp);}
#endif
#ifdef OLE2ANSI
inline LPOLESTR A2OLE(LPSTR lp) { return lp;}
inline LPSTR OLE2A(LPOLESTR lp) { return lp;}
#define W2OLE W2A
#define OLE2W A2W
inline LPCOLESTR A2COLE(LPCSTR lp) { return lp;}
inline LPCSTR OLE2CA(LPCOLESTR lp) { return lp;}
#define W2COLE W2CA
#define OLE2CW A2CW
#else
inline LPOLESTR W2OLE(LPWSTR lp) { return lp; }
inline LPWSTR OLE2W(LPOLESTR lp) { return lp; }
#define A2OLE A2W
#define OLE2A W2A
inline LPCOLESTR W2COLE(LPCWSTR lp) { return lp; }
inline LPCWSTR OLE2CW(LPCOLESTR lp) { return lp; }
#define A2COLE A2CW
#define OLE2CA W2CA
#endif
#ifdef _UNICODE
#define T2A W2A
#define A2T A2W
inline LPWSTR T2W(LPTSTR lp) { return lp; }
inline LPTSTR W2T(LPWSTR lp) { return lp; }
#define T2CA W2CA
#define A2CT A2CW
inline LPCWSTR T2CW(LPCTSTR lp) { return lp; }
inline LPCTSTR W2CT(LPCWSTR lp) { return lp; }
#else
#define T2W A2W
#define W2T W2A
inline LPSTR T2A(LPTSTR lp) { return lp; }
inline LPTSTR A2T(LPSTR lp) { return lp; }
#define T2CW A2CW
#define W2CT W2CA
inline LPCSTR T2CA(LPCTSTR lp) { return lp; }
inline LPCTSTR A2CT(LPCSTR lp) { return lp; }
#endif
inline BSTR A2WBSTR(LPCSTR lp, int nLen = -1)
{
USES_CONVERSION;
BSTR str = NULL;
int nConvertedLen = MultiByteToWideChar(_acp, 0, lp,
nLen, NULL, NULL)-1;
str = ::SysAllocStringLen(NULL, nConvertedLen);
if (str != NULL)
{
MultiByteToWideChar(_acp, 0, lp, -1,
str, nConvertedLen);
}
return str;
}
inline BSTR OLE2BSTR(LPCOLESTR lp) {return ::SysAllocString(lp);}
#if defined(_UNICODE)
// in these cases the default (TCHAR) is the same as OLECHAR
inline BSTR T2BSTR(LPCTSTR lp) {return ::SysAllocString(lp);}
inline BSTR A2BSTR(LPCSTR lp) {USES_CONVERSION; return A2WBSTR(lp);}
inline BSTR W2BSTR(LPCWSTR lp) {return ::SysAllocString(lp);}
#elif defined(OLE2ANSI)
// in these cases the default (TCHAR) is the same as OLECHAR
inline BSTR T2BSTR(LPCTSTR lp) {return ::SysAllocString(lp);}
inline BSTR A2BSTR(LPCSTR lp) {return ::SysAllocString(lp);}
inline BSTR W2BSTR(LPCWSTR lp) {USES_CONVERSION; return ::SysAllocString(W2COLE(lp));}
#else
inline BSTR T2BSTR(LPCTSTR lp) {USES_CONVERSION; return A2WBSTR(lp);}
inline BSTR A2BSTR(LPCSTR lp) {USES_CONVERSION; return A2WBSTR(lp);}
inline BSTR W2BSTR(LPCWSTR lp) {return ::SysAllocString(lp);}
#endif
#ifdef _WINGDI_
/////////////////////////////////////////////////////////////////////////////
// Global UNICODE<>ANSI translation helpers
inline LPDEVMODEW AtlDevModeA2W(LPDEVMODEW lpDevModeW, LPDEVMODEA lpDevModeA)
{
USES_CONVERSION;
if (lpDevModeA == NULL)
return NULL;
ATLASSERT(lpDevModeW != NULL);
AtlA2WHelper(lpDevModeW->dmDeviceName, (LPCSTR)lpDevModeA->dmDeviceName, 32*sizeof(WCHAR), _acp);
memcpy(&lpDevModeW->dmSpecVersion, &lpDevModeA->dmSpecVersion,
offsetof(DEVMODEW, dmFormName) - offsetof(DEVMODEW, dmSpecVersion));
AtlA2WHelper(lpDevModeW->dmFormName, (LPCSTR)lpDevModeA->dmFormName, 32*sizeof(WCHAR), _acp);
memcpy(&lpDevModeW->dmLogPixels, &lpDevModeA->dmLogPixels,
sizeof(DEVMODEW) - offsetof(DEVMODEW, dmLogPixels));
if (lpDevModeA->dmDriverExtra != 0)
memcpy(lpDevModeW+1, lpDevModeA+1, lpDevModeA->dmDriverExtra);
lpDevModeW->dmSize = sizeof(DEVMODEW);
return lpDevModeW;
}
inline LPTEXTMETRICW AtlTextMetricA2W(LPTEXTMETRICW lptmW, LPTEXTMETRICA lptmA)
{
USES_CONVERSION;
if (lptmA == NULL)
return NULL;
ATLASSERT(lptmW != NULL);
memcpy(lptmW, lptmA, sizeof(LONG) * 11);
memcpy(&lptmW->tmItalic, &lptmA->tmItalic, sizeof(BYTE) * 5);
MultiByteToWideChar(_acp, 0, (LPCSTR)&lptmA->tmFirstChar, 1, &lptmW->tmFirstChar, 1);
MultiByteToWideChar(_acp, 0, (LPCSTR)&lptmA->tmLastChar, 1, &lptmW->tmLastChar, 1);
MultiByteToWideChar(_acp, 0, (LPCSTR)&lptmA->tmDefaultChar, 1, &lptmW->tmDefaultChar, 1);
MultiByteToWideChar(_acp, 0, (LPCSTR)&lptmA->tmBreakChar, 1, &lptmW->tmBreakChar, 1);
return lptmW;
}
inline LPTEXTMETRICA AtlTextMetricW2A(LPTEXTMETRICA lptmA, LPTEXTMETRICW lptmW)
{
USES_CONVERSION;
if (lptmW == NULL)
return NULL;
ATLASSERT(lptmA != NULL);
memcpy(lptmA, lptmW, sizeof(LONG) * 11);
memcpy(&lptmA->tmItalic, &lptmW->tmItalic, sizeof(BYTE) * 5);
WideCharToMultiByte(_acp, 0, &lptmW->tmFirstChar, 1, (LPSTR)&lptmA->tmFirstChar, 1, NULL, NULL);
WideCharToMultiByte(_acp, 0, &lptmW->tmLastChar, 1, (LPSTR)&lptmA->tmLastChar, 1, NULL, NULL);
WideCharToMultiByte(_acp, 0, &lptmW->tmDefaultChar, 1, (LPSTR)&lptmA->tmDefaultChar, 1, NULL, NULL);
WideCharToMultiByte(_acp, 0, &lptmW->tmBreakChar, 1, (LPSTR)&lptmA->tmBreakChar, 1, NULL, NULL);
return lptmA;
}
#ifndef ATLDEVMODEA2W
#define ATLDEVMODEA2W AtlDevModeA2W
#define ATLDEVMODEW2A AtlDevModeW2A
#define ATLTEXTMETRICA2W AtlTextMetricA2W
#define ATLTEXTMETRICW2A AtlTextMetricW2A
#endif
#define DEVMODEW2A(lpw)\
((lpw == NULL) ? NULL : ATLDEVMODEW2A((LPDEVMODEA)alloca(sizeof(DEVMODEA)+lpw->dmDriverExtra), lpw))
#define DEVMODEA2W(lpa)\
((lpa == NULL) ? NULL : ATLDEVMODEA2W((LPDEVMODEW)alloca(sizeof(DEVMODEW)+lpa->dmDriverExtra), lpa))
#define TEXTMETRICW2A(lptmw)\
((lptmw == NULL) ? NULL : ATLTEXTMETRICW2A((LPTEXTMETRICA)alloca(sizeof(TEXTMETRICA)), lptmw))
#define TEXTMETRICA2W(lptma)\
((lptma == NULL) ? NULL : ATLTEXTMETRICA2W((LPTEXTMETRICW)alloca(sizeof(TEXTMETRICW)), lptma))
#ifdef OLE2ANSI
#define DEVMODEOLE DEVMODEA
#define LPDEVMODEOLE LPDEVMODEA
#define TEXTMETRICOLE TEXTMETRICA
#define LPTEXTMETRICOLE LPTEXTMETRICA
#else
#define DEVMODEOLE DEVMODEW
#define LPDEVMODEOLE LPDEVMODEW
#define TEXTMETRICOLE TEXTMETRICW
#define LPTEXTMETRICOLE LPTEXTMETRICW
#endif
#if defined(_UNICODE)
// in these cases the default (TCHAR) is the same as OLECHAR
inline LPDEVMODEW DEVMODEOLE2T(LPDEVMODEOLE lp) { return lp; }
inline LPDEVMODEOLE DEVMODET2OLE(LPDEVMODEW lp) { return lp; }
inline LPTEXTMETRICW TEXTMETRICOLE2T(LPTEXTMETRICOLE lp) { return lp; }
inline LPTEXTMETRICOLE TEXTMETRICT2OLE(LPTEXTMETRICW lp) { return lp; }
#elif defined(OLE2ANSI)
// in these cases the default (TCHAR) is the same as OLECHAR
inline LPDEVMODE DEVMODEOLE2T(LPDEVMODEOLE lp) { return lp; }
inline LPDEVMODEOLE DEVMODET2OLE(LPDEVMODE lp) { return lp; }
inline LPTEXTMETRIC TEXTMETRICOLE2T(LPTEXTMETRICOLE lp) { return lp; }
inline LPTEXTMETRICOLE TEXTMETRICT2OLE(LPTEXTMETRIC lp) { return lp; }
#else
#define DEVMODEOLE2T(lpo) DEVMODEW2A(lpo)
#define DEVMODET2OLE(lpa) DEVMODEA2W(lpa)
#define TEXTMETRICOLE2T(lptmw) TEXTMETRICW2A(lptmw)
#define TEXTMETRICT2OLE(lptma) TEXTMETRICA2W(lptma)
#endif
#endif //_WINGDI_
#pragma pack(pop)
#ifndef _ATL_DLL_IMPL
#ifndef _ATL_DLL
#define _ATLCONV_IMPL
#endif
#endif
#endif // __ATLCONV_H__
/////////////////////////////////////////////////////////////////////////////
#ifdef _ATLCONV_IMPL
#ifdef _WINGDI_
ATLINLINE ATLAPI_(LPDEVMODEA) AtlDevModeW2A(LPDEVMODEA lpDevModeA, LPDEVMODEW lpDevModeW)
{
USES_CONVERSION;
if (lpDevModeW == NULL)
return NULL;
ATLASSERT(lpDevModeA != NULL);
AtlW2AHelper((LPSTR)lpDevModeA->dmDeviceName, lpDevModeW->dmDeviceName, 32*sizeof(char), _acp);
memcpy(&lpDevModeA->dmSpecVersion, &lpDevModeW->dmSpecVersion,
offsetof(DEVMODEA, dmFormName) - offsetof(DEVMODEA, dmSpecVersion));
AtlW2AHelper((LPSTR)lpDevModeA->dmFormName, lpDevModeW->dmFormName, 32*sizeof(char), _acp);
memcpy(&lpDevModeA->dmLogPixels, &lpDevModeW->dmLogPixels,
sizeof(DEVMODEA) - offsetof(DEVMODEA, dmLogPixels));
if (lpDevModeW->dmDriverExtra != 0)
memcpy(lpDevModeA+1, lpDevModeW+1, lpDevModeW->dmDriverExtra);
lpDevModeA->dmSize = sizeof(DEVMODEA);
return lpDevModeA;
}
#endif //_WINGDI
//Prevent pulling in second time
#undef _ATLCONV_IMPL
#endif // _ATLCONV_IMPL
@@ -0,0 +1,12 @@
// This is a part of the Active Template Library.
// Copyright (C) 1996-1998 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.
///////////////////////////////////////
// No longer used
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
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,133 @@
// This is a part of the Active Template Library.
// Copyright (C) 1996-1998 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 __ATLDEF_H__
#define __ATLDEF_H__
#ifndef __cplusplus
#error ATL requires C++ compilation (use a .cpp suffix)
#endif
#ifdef UNDER_CE
#error ATL not currently supported for CE
#endif
#ifdef _UNICODE
#ifndef UNICODE
#define UNICODE // UNICODE is used by Windows headers
#endif
#endif
#ifdef UNICODE
#ifndef _UNICODE
#define _UNICODE // _UNICODE is used by C-runtime/MFC headers
#endif
#endif
#ifdef _DEBUG
#ifndef DEBUG
#define DEBUG
#endif
#endif
#ifndef ATLASSERT
#define ATLASSERT(expr) _ASSERTE(expr)
#endif
///////////////////////////////////////////////////////////////////////////////
// __declspec(novtable) is used on a class declaration to prevent the vtable
// pointer from being initialized in the constructor and destructor for the
// class. This has many benefits because the linker can now eliminate the
// vtable and all the functions pointed to by the vtable. Also, the actual
// constructor and destructor code are now smaller.
///////////////////////////////////////////////////////////////////////////////
// This should only be used on a class that is not directly createable but is
// rather only used as a base class. Additionally, the constructor and
// destructor (if provided by the user) should not call anything that may cause
// a virtual function call to occur back on the object.
///////////////////////////////////////////////////////////////////////////////
// By default, the wizards will generate new ATL object classes with this
// attribute (through the ATL_NO_VTABLE macro). This is normally safe as long
// the restriction mentioned above is followed. It is always safe to remove
// this macro from your class, so if in doubt, remove it.
///////////////////////////////////////////////////////////////////////////////
#ifdef _ATL_DISABLE_NO_VTABLE
#define ATL_NO_VTABLE
#else
#define ATL_NO_VTABLE __declspec(novtable)
#endif
#ifdef _ATL_DEBUG_REFCOUNT
#ifndef _ATL_DEBUG_INTERFACES
#define _ATL_DEBUG_INTERFACES
#endif
#endif
#ifdef _ATL_DEBUG_INTERFACES
#ifndef _ATL_DEBUG
#define _ATL_DEBUG
#endif // _ATL_DEBUG
#endif // _ATL_DEBUG_INTERFACES
#ifndef _ATL_HEAPFLAGS
#ifdef _MALLOC_ZEROINIT
#define _ATL_HEAPFLAGS HEAP_ZERO_MEMORY
#else
#define _ATL_HEAPFLAGS 0
#endif
#endif
#ifndef _ATL_PACKING
#define _ATL_PACKING 8
#endif
#if defined(_ATL_DLL)
#define ATLAPI extern "C" HRESULT __declspec(dllimport) __stdcall
#define ATLAPI_(x) extern "C" __declspec(dllimport) x __stdcall
#define ATLINLINE
#elif defined(_ATL_DLL_IMPL)
#define ATLAPI extern "C" HRESULT __declspec(dllexport) __stdcall
#define ATLAPI_(x) extern "C" __declspec(dllexport) x __stdcall
#define ATLINLINE
#else
#define ATLAPI HRESULT __stdcall
#define ATLAPI_(x) x __stdcall
#define ATLINLINE inline
#endif
#if defined (_CPPUNWIND) & (defined(_ATL_EXCEPTIONS) | defined(_AFX))
#define ATLTRY(x) try{x;} catch(...) {}
#else
#define ATLTRY(x) x;
#endif
#define offsetofclass(base, derived) ((DWORD)(static_cast<base*>((derived*)_ATL_PACKING))-_ATL_PACKING)
/////////////////////////////////////////////////////////////////////////////
// Master version numbers
#define _ATL 1 // Active Template Library
#define _ATL_VER 0x0300 // Active Template Library version 3.0
/////////////////////////////////////////////////////////////////////////////
// Threading
#ifndef _ATL_SINGLE_THREADED
#ifndef _ATL_APARTMENT_THREADED
#ifndef _ATL_FREE_THREADED
#define _ATL_FREE_THREADED
#endif
#endif
#endif
#endif // __ATLDEF_H__
/////////////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,293 @@
// This is a part of the Active Template Library.
// Copyright (C) 1996-1998 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.
// atliface.idl : IDL source for atl.dll
//
cpp_quote("EXTERN_C const CLSID CLSID_Registrar;")
// This file will be processed by the MIDL tool to
// produce the type library (atl.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
#include <olectl.h>
[
object,
uuid(44EC053B-400F-11D0-9DCD-00A0C90391D3),
helpstring("IRegistrar Interface"),
pointer_default(unique)
]
interface IRegistrar : IUnknown
{
//////////////////////////////////////////////////////////
// Script based methods
//////////////////////////////////////////////////////////
[id(100)] HRESULT AddReplacement([in] LPCOLESTR key, [in] LPCOLESTR item);
[id(101)] HRESULT ClearReplacements();
[id(102)] HRESULT ResourceRegisterSz([in] LPCOLESTR resFileName, [in] LPCOLESTR szID, [in] LPCOLESTR szType);
[id(103)] HRESULT ResourceUnregisterSz([in] LPCOLESTR resFileName, [in] LPCOLESTR szID, [in] LPCOLESTR szType);
[id(104)] HRESULT FileRegister([in] LPCOLESTR fileName);
[id(105)] HRESULT FileUnregister([in] LPCOLESTR fileName);
[id(106)] HRESULT StringRegister([in] LPCOLESTR data);
[id(107)] HRESULT StringUnregister([in] LPCOLESTR data);
[id(120)] HRESULT ResourceRegister([in] LPCOLESTR resFileName, [in] UINT nID, [in] LPCOLESTR szType);
[id(121)] HRESULT ResourceUnregister([in] LPCOLESTR resFileName, [in] UINT nID, [in] LPCOLESTR szType);
};
//////////////////////////////////////////////////////////
// Control hosting interfaces
//////////////////////////////////////////////////////////
[
uuid(425B5AF0-65F1-11d1-9611-0000F81E0D0D),
helpstring("IDocHostUIHandlerDispatch Interface"),
pointer_default(unique)
]
interface IDocHostUIHandlerDispatch : IDispatch
{
typedef enum tagDOCHOSTUIDBLCLKDispatch {
docHostUIDblClkDEFAULT = 0,
docHostUIDblClkSHOWPROPERTIES = 1,
docHostUIDblClkSHOWCODE = 2,
} DOCHOSTUIDBLCLKDispatch ;
typedef enum tagDocHostUIFlagDispatch {
docHostUIFlagDIALOG = 1,
docHostUIFlagDISABLE_HELP_MENU = 2,
docHostUIFlagNO3DBORDER = 4,
docHostUIFlagSCROLL_NO = 8,
docHostUIFlagDISABLE_SCRIPT_INACTIVE = 16,
docHostUIFlagOPENNEWWIN = 32,
docHostUIFlagDISABLE_OFFSCREEN = 64,
docHostUIFlagFLAT_SCROLLBAR = 128,
docHostUIFlagDIV_BLOCKDEFAULT = 256,
docHostUIFlagACTIVATE_CLIENTHIT_ONLY = 512,
} DocHostUIFlagDispatch ;
HRESULT ShowContextMenu(
[in] DWORD dwID,
[in] DWORD x,
[in] DWORD y,
[in] IUnknown* pcmdtReserved,
[in] IDispatch* pdispReserved,
[out, retval] HRESULT* dwRetVal);
HRESULT GetHostInfo(
[in, out] DWORD* pdwFlags,
[in, out] DWORD* pdwDoubleClick);
HRESULT ShowUI(
[in] DWORD dwID,
[in] IUnknown* pActiveObject,
[in] IUnknown* pCommandTarget,
[in] IUnknown* pFrame,
[in] IUnknown* pDoc,
[out, retval] HRESULT* dwRetVal);
HRESULT HideUI();
HRESULT UpdateUI();
HRESULT EnableModeless(
[in] VARIANT_BOOL fEnable);
HRESULT OnDocWindowActivate(
[in] VARIANT_BOOL fActivate);
HRESULT OnFrameWindowActivate(
[in] VARIANT_BOOL fActivate);
HRESULT ResizeBorder(
[in] long left,
[in] long top,
[in] long right,
[in] long bottom,
[in] IUnknown * pUIWindow,
[in] VARIANT_BOOL fFrameWindow);
HRESULT TranslateAccelerator(
[in] DWORD hWnd,
[in] DWORD nMessage,
[in] DWORD wParam,
[in] DWORD lParam,
[in] BSTR bstrGuidCmdGroup,
[in] DWORD nCmdID,
[out, retval] HRESULT* dwRetVal);
HRESULT GetOptionKeyPath(
[out] BSTR* pbstrKey,
[in] DWORD dw);
HRESULT GetDropTarget(
[in] IUnknown* pDropTarget,
[out] IUnknown** ppDropTarget);
HRESULT GetExternal(
[out] IDispatch **ppDispatch);
HRESULT TranslateUrl(
[in] DWORD dwTranslate,
[in] BSTR bstrURLIn,
[out] BSTR* pbstrURLOut);
HRESULT FilterDataObject(
[in] IUnknown *pDO,
[out] IUnknown **ppDORet);
};
[
uuid(B6EA2050-048A-11d1-82B9-00C04FB9942E),
helpstring("IAxWinHostWindow Interface"),
pointer_default(unique)
]
interface IAxWinHostWindow : IUnknown
{
HRESULT CreateControl([in] LPCOLESTR lpTricsData, [in] HWND hWnd, [in] IStream* pStream);
HRESULT CreateControlEx([in] LPCOLESTR lpTricsData, [in] HWND hWnd, [in] IStream* pStream, [out]IUnknown** ppUnk, [in] REFIID riidAdvise, [in]IUnknown* punkAdvise);
HRESULT AttachControl([in] IUnknown* pUnkControl, [in] HWND hWnd);
HRESULT QueryControl([in] REFIID riid, [out, iid_is(riid)] void **ppvObject);
HRESULT SetExternalDispatch([in] IDispatch* pDisp);
HRESULT SetExternalUIHandler([in] IDocHostUIHandlerDispatch* pDisp);
};
[
object, dual,
uuid(B6EA2051-048A-11d1-82B9-00C04FB9942E),
helpstring("IAxWinAmbientDispatch Interface"),
pointer_default(unique)
]
interface IAxWinAmbientDispatch : IDispatch
{
[propput, helpstring("Enable or disable windowless activation")]
HRESULT AllowWindowlessActivation([in]VARIANT_BOOL bCanWindowlessActivate);
[propget, helpstring("Is windowless activation enabled")]
HRESULT AllowWindowlessActivation([out,retval]VARIANT_BOOL* pbCanWindowlessActivate);
// DISPID_AMBIENT_BACKCOLOR
[propput, helpstring("Set the background color"), id(DISPID_AMBIENT_BACKCOLOR)]
HRESULT BackColor([in]OLE_COLOR clrBackground);
[propget, helpstring("Get the background color"), id(DISPID_AMBIENT_BACKCOLOR)]
HRESULT BackColor([out,retval]OLE_COLOR* pclrBackground);
// DISPID_AMBIENT_FORECOLOR
[propput, helpstring("Set the ambient foreground color"), id(DISPID_AMBIENT_FORECOLOR)]
HRESULT ForeColor([in]OLE_COLOR clrForeground);
[propget, helpstring("Get the ambient foreground color"), id(DISPID_AMBIENT_FORECOLOR)]
HRESULT ForeColor([out,retval]OLE_COLOR* pclrForeground);
// DISPID_AMBIENT_LOCALEID
[propput, helpstring("Set the ambient locale"), id(DISPID_AMBIENT_LOCALEID)]
HRESULT LocaleID([in]LCID lcidLocaleID);
[propget, helpstring("Get the ambient locale"), id(DISPID_AMBIENT_LOCALEID)]
HRESULT LocaleID([out,retval]LCID* plcidLocaleID);
// DISPID_AMBIENT_USERMODE
[propput, helpstring("Set the ambient user mode"), id(DISPID_AMBIENT_USERMODE)]
HRESULT UserMode([in]VARIANT_BOOL bUserMode);
[propget, helpstring("Get the ambient user mode"), id(DISPID_AMBIENT_USERMODE)]
HRESULT UserMode([out,retval]VARIANT_BOOL* pbUserMode);
// DISPID_AMBIENT_DISPLAYASDEFAULT
[propput, helpstring("Enable or disable the control as default"), id(DISPID_AMBIENT_DISPLAYASDEFAULT)]
HRESULT DisplayAsDefault([in]VARIANT_BOOL bDisplayAsDefault);
[propget, helpstring("Is the control the default"), id(DISPID_AMBIENT_DISPLAYASDEFAULT)]
HRESULT DisplayAsDefault([out,retval]VARIANT_BOOL* pbDisplayAsDefault);
//midl_pragma warning(disable:2039)
// DISPID_AMBIENT_FONT
[propput, helpstring("Set the ambient font"), id(DISPID_AMBIENT_FONT)]
HRESULT Font([in]IFontDisp* pFont);
[propget, helpstring("Get the ambient font"), id(DISPID_AMBIENT_FONT)]
HRESULT Font([out,retval]IFontDisp** pFont);
//midl_pragma warning(enable:2039)
// DISPID_AMBIENT_SUPPORTSMNEMONICS
// DISPID_AMBIENT_AUTOCLIP
// DISPID_AMBIENT_APPEARANCE
// DISPID_AMBIENT_PALETTE
// DISPID_AMBIENT_TRANSFERPRIORITY
// DISPID_AMBIENT_DISPLAYNAME
// DISPID_AMBIENT_UIDEAD
// DISPID_AMBIENT_MESSAGEREFLECT
[propput, helpstring("Enable or disable message reflection"), id(DISPID_AMBIENT_MESSAGEREFLECT)]
HRESULT MessageReflect([in]VARIANT_BOOL bMsgReflect);
[propget, helpstring("Is message reflection enabled"), id(DISPID_AMBIENT_MESSAGEREFLECT)]
HRESULT MessageReflect([out,retval]VARIANT_BOOL* pbMsgReflect);
// DISPID_AMBIENT_SHOWGRABHANDLES
[propget, helpstring("Show or hide grab handles"), id(DISPID_AMBIENT_SHOWGRABHANDLES)]
HRESULT ShowGrabHandles(VARIANT_BOOL* pbShowGrabHandles);
// DISPID_AMBIENT_SHOWHATCHING
[propget, helpstring("Are grab handles enabled"), id(DISPID_AMBIENT_SHOWHATCHING)]
HRESULT ShowHatching(VARIANT_BOOL* pbShowHatching);
// DISPID_AMBIENT_SCALEUNITS
// DISPID_AMBIENT_TEXTALIGN
// IDocHostUIHandler Defaults
[propput, helpstring("Set the DOCHOSTUIFLAG flags")]
HRESULT DocHostFlags([in]DWORD dwDocHostFlags);
[propget, helpstring("Get the DOCHOSTUIFLAG flags")]
HRESULT DocHostFlags([out,retval]DWORD* pdwDocHostFlags);
[propput, helpstring("Set the DOCHOSTUIDBLCLK flags")]
HRESULT DocHostDoubleClickFlags([in]DWORD dwDocHostDoubleClickFlags);
[propget, helpstring("Get the DOCHOSTUIDBLCLK flags")]
HRESULT DocHostDoubleClickFlags([out,retval]DWORD* pdwDocHostDoubleClickFlags);
[propput, helpstring("Enable or disable context menus")]
HRESULT AllowContextMenu([in]VARIANT_BOOL bAllowContextMenu);
[propget, helpstring("Are context menus enabled")]
HRESULT AllowContextMenu([out,retval]VARIANT_BOOL* pbAllowContextMenu);
[propput, helpstring("Enable or disable UI")]
HRESULT AllowShowUI([in]VARIANT_BOOL bAllowShowUI);
[propget, helpstring("Is UI enabled")]
HRESULT AllowShowUI([out,retval]VARIANT_BOOL* pbAllowShowUI);
[propput, helpstring("Set the option key path")]
HRESULT OptionKeyPath([in]BSTR bstrOptionKeyPath);
[propget, helpstring("Get the option key path")]
HRESULT OptionKeyPath([out,retval]BSTR* pbstrOptionKeyPath);
};
[
uuid(72AD0770-6A9F-11d1-BCEC-0060088F444E),
helpstring("IInternalConnection Interface"),
pointer_default(unique)
]
interface IInternalConnection : IUnknown
{
HRESULT AddConnection();
HRESULT ReleaseConnection();
};
cpp_quote("#ifndef _ATL_DLL_IMPL")
cpp_quote("namespace ATL")
cpp_quote("{")
cpp_quote("#endif")
cpp_quote("")
cpp_quote("ATLAPI_(int) AtlAxDialogBoxW(HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogProc, LPARAM dwInitParam);")
cpp_quote("ATLAPI_(int) AtlAxDialogBoxA(HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogProc, LPARAM dwInitParam);")
cpp_quote("#ifdef UNICODE")
cpp_quote("#define AtlAxDialogBox AtlAxDialogBoxW")
cpp_quote("#else")
cpp_quote("#define AtlAxDialogBox AtlAxDialogBoxA")
cpp_quote("#endif")
cpp_quote("")
cpp_quote("ATLAPI_(HWND) AtlAxCreateDialogW(HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogProc, LPARAM dwInitParam);")
cpp_quote("ATLAPI_(HWND) AtlAxCreateDialogA(HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogProc, LPARAM dwInitParam);")
cpp_quote("#ifdef UNICODE")
cpp_quote("#define AtlAxCreateDialog AtlAxCreateDialogW")
cpp_quote("#else")
cpp_quote("#define AtlAxCreateDialog AtlAxCreateDialogA")
cpp_quote("#endif")
cpp_quote("")
cpp_quote("ATLAPI AtlAxCreateControl(LPCOLESTR lpszName, HWND hWnd, IStream* pStream, IUnknown** ppUnkContainer);")
cpp_quote("ATLAPI AtlAxCreateControlEx(LPCOLESTR lpszName, HWND hWnd, IStream* pStream, ")
cpp_quote(" IUnknown** ppUnkContainer, IUnknown** ppUnkControl, ")
cpp_quote(" REFIID iidSink=IID_NULL, IUnknown* punkSink=NULL);")
cpp_quote("ATLAPI AtlAxAttachControl(IUnknown* pControl, HWND hWnd, IUnknown** ppUnkContainer);")
cpp_quote("ATLAPI_(BOOL) AtlAxWinInit();")
cpp_quote("")
cpp_quote("ATLAPI AtlAxGetHost(HWND h, IUnknown** pp);")
cpp_quote("ATLAPI AtlAxGetControl(HWND h, IUnknown** pp);")
cpp_quote("")
cpp_quote("#ifndef _ATL_DLL_IMPL")
cpp_quote("}; //namespace ATL")
cpp_quote("#endif //_ATL_DLL_IMPL")
@@ -0,0 +1,194 @@
// This is a part of the Active Template Library.
// Copyright (C) 1996-1998 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 __ATLBASE_H__
#error atlimpl.cpp requires atlbase.h to be included first
#endif
/////////////////////////////////////////////////////////////////////////////
// Minimize CRT
// Specify DllMain as EntryPoint
// Turn off exception handling
// Define _ATL_MIN_CRT
#ifdef _ATL_MIN_CRT
/////////////////////////////////////////////////////////////////////////////
// Startup Code
#if defined(_WINDLL) || defined(_USRDLL)
// Declare DllMain
extern "C" BOOL WINAPI DllMain(HANDLE hDllHandle, DWORD dwReason, LPVOID lpReserved);
extern "C" BOOL WINAPI _DllMainCRTStartup(HANDLE hDllHandle, DWORD dwReason, LPVOID lpReserved)
{
return DllMain(hDllHandle, dwReason, lpReserved);
}
#else
// wWinMain is not defined in winbase.h.
extern "C" int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd);
#define SPACECHAR _T(' ')
#define DQUOTECHAR _T('\"')
#ifdef _UNICODE
extern "C" void wWinMainCRTStartup()
#else // _UNICODE
extern "C" void WinMainCRTStartup()
#endif // _UNICODE
{
LPTSTR lpszCommandLine = ::GetCommandLine();
if(lpszCommandLine == NULL)
::ExitProcess((UINT)-1);
// Skip past program name (first token in command line).
// Check for and handle quoted program name.
if(*lpszCommandLine == DQUOTECHAR)
{
// Scan, and skip over, subsequent characters until
// another double-quote or a null is encountered.
do
{
lpszCommandLine = ::CharNext(lpszCommandLine);
}
while((*lpszCommandLine != DQUOTECHAR) && (*lpszCommandLine != _T('\0')));
// If we stopped on a double-quote (usual case), skip over it.
if(*lpszCommandLine == DQUOTECHAR)
lpszCommandLine = ::CharNext(lpszCommandLine);
}
else
{
while(*lpszCommandLine > SPACECHAR)
lpszCommandLine = ::CharNext(lpszCommandLine);
}
// Skip past any white space preceeding the second token.
while(*lpszCommandLine && (*lpszCommandLine <= SPACECHAR))
lpszCommandLine = ::CharNext(lpszCommandLine);
STARTUPINFO StartupInfo;
StartupInfo.dwFlags = 0;
::GetStartupInfo(&StartupInfo);
int nRet = _tWinMain(::GetModuleHandle(NULL), NULL, lpszCommandLine,
(StartupInfo.dwFlags & STARTF_USESHOWWINDOW) ?
StartupInfo.wShowWindow : SW_SHOWDEFAULT);
::ExitProcess((UINT)nRet);
}
#endif // defined(_WINDLL) | defined(_USRDLL)
/////////////////////////////////////////////////////////////////////////////
// Heap Allocation
#ifndef _DEBUG
#ifndef _MERGE_PROXYSTUB
//rpcproxy.h does the same thing as this
int __cdecl _purecall()
{
DebugBreak();
return 0;
}
#endif
#if !defined(_M_ALPHA) && !defined(_M_PPC)
//RISC always initializes floating point and always defines _fltused
extern "C" const int _fltused = 0;
#endif
static const int nExtraAlloc = 8;
static const int nOffsetBlock = nExtraAlloc/sizeof(HANDLE);
void* __cdecl malloc(size_t n)
{
void* pv = NULL;
#ifndef _ATL_NO_MP_HEAP
if (_Module.m_phHeaps == NULL)
#endif
{
pv = (HANDLE*) HeapAlloc(_Module.m_hHeap, 0, n);
}
#ifndef _ATL_NO_MP_HEAP
else
{
// overallocate to remember the heap handle
int nHeap = _Module.m_nHeap++;
HANDLE hHeap = _Module.m_phHeaps[nHeap & _Module.m_dwHeaps];
HANDLE* pBlock = (HANDLE*) HeapAlloc(hHeap, 0, n + nExtraAlloc);
if (pBlock != NULL)
{
*pBlock = hHeap;
pv = (void*)(pBlock + nOffsetBlock);
}
else
pv = NULL;
}
#endif
return pv;
}
void* __cdecl calloc(size_t n, size_t s)
{
return malloc(n*s);
}
void* __cdecl realloc(void* p, size_t n)
{
if (p == NULL)
return malloc(n);
#ifndef _ATL_NO_MP_HEAP
if (_Module.m_phHeaps == NULL)
#endif
return HeapReAlloc(_Module.m_hHeap, 0, p, n);
#ifndef _ATL_NO_MP_HEAP
else
{
HANDLE* pHeap = ((HANDLE*)p)-nOffsetBlock;
pHeap = (HANDLE*) HeapReAlloc(*pHeap, 0, pHeap, n + nExtraAlloc);
return (pHeap != NULL) ? pHeap + nOffsetBlock : NULL;
}
#endif
}
void __cdecl free(void* p)
{
if (p == NULL)
return;
#ifndef _ATL_NO_MP_HEAP
if (_Module.m_phHeaps == NULL)
#endif
HeapFree(_Module.m_hHeap, 0, p);
#ifndef _ATL_NO_MP_HEAP
else
{
HANDLE* pHeap = ((HANDLE*)p)-nOffsetBlock;
HeapFree(*pHeap, 0, pHeap);
}
#endif
}
void* __cdecl operator new(size_t n)
{
return malloc(n);
}
void __cdecl operator delete(void* p)
{
free(p);
}
#endif //_DEBUG
#endif //_ATL_MIN_CRT
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,12 @@
// This is a part of the Active Template Library.
// Copyright (C) 1996-1998 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.
///////////////////////////////////////
// No longer used
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,12 @@
// This is a part of the Active Template Library.
// Copyright (C) 1996-1998 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.
///////////////////////////////////////
// No longer used
File diff suppressed because it is too large Load Diff