home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Windows Gam…ming Gurus (2nd Edition)
/
Disc2.iso
/
common
/
msdev98
/
template
/
atl
/
msdtx.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1998-06-16
|
885b
|
44 lines
[!if=(FileExists, "FALSE")]
// [!CPPName] : Implementation of [!ClassName]
#include "stdafx.h"
#include "[!ProjectName].h"
#include "[!HeaderName]"
[!else]
[!AddIncludeFile(TargetFile, "stdafx.h")]
[!AddStringToSymbol(ProjectName.h, ProjectName, ".h")]
[!AddIncludeFile(TargetFile, ProjectName.h)]
[!AddIncludeFile(TargetFile, HeaderName)]
[!endif]
[!crlf]
/////////////////////////////////////////////////////////////////////////////
// [!ClassName]
[!crlf]
[!if=(ObjectControl, "TRUE")]
HRESULT [!ClassName]::Activate()
{
HRESULT hr = GetObjectContext(&m_spObjectContext);
if (SUCCEEDED(hr))
return S_OK;
return hr;
}
[!crlf]
BOOL [!ClassName]::CanBePooled()
{
[!if=(CanBePooled, "TRUE")]
return TRUE;
[!else]
return FALSE;
[!endif]
}
[!crlf]
void [!ClassName]::Deactivate()
{
m_spObjectContext.Release();
}
[!crlf]
[!endif]