1,从MSDN http://msdn.microsoft.com/vstudio/express/visualc/ 下载并安装VCExpress 2005
2,按照MSDN的指示安装PSDK, 并且修改VCExpress的相关文件 http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx ,
3,在修改VCExpress的Visual C++目录时添加下面的目录
Include files: C:\Program Files\Microsoft Platform SDK\include\atl
4, 修改PSDK的atl目录下的atlwin.h和atlbase.h文件
修改atlwin.h的1725行的SetChainEntry函数,将第一个for循环里的int i;定义提前。
---------------------------------------------------------------
BOOL SetChainEntry(DWORD dwChainID, CMessageMap* pObject, DWORD dwMsgMapID = 0)
{
int i;
// first search for an existing entry
for(i = 0; i < m_aChainEntry.GetSize(); i++)
---------------------------------------------------------------
修改atlbase.h的287行的AllocStdCallThunk和FreeStdCallThunk函数,将元代码注释,用新的宏代替。
---------------------------------------------------------------
/* Comment it
PVOID __stdcall __AllocStdCallThunk(VOID);
VOID __stdcall __FreeStdCallThunk(PVOID);
#define AllocStdCallThunk() __AllocStdCallThunk()
#define FreeStdCallThunk(p) __FreeStdCallThunk(p)
#pragma comment(lib, "atlthunk.lib")
*/
#define AllocStdCallThunk() HeapAlloc(GetProcessHeap(),0,sizeof(_stdcallthunk))
#define FreeStdCallThunk(p) HeapFree(GetProcessHeap(), 0, p)
---------------------------------------------------------------
3,下载并安装WTL http://wtl.sf.net
4, 下载WTL for VCExpress Wizard, 拷贝到WTL的AppWiz目录下,并双击安装WTL Wizard到VCExpress
WTL for VCExpress Wizardenjoy VCExpress&WTL