idbasynchstatusimpl.h
来自「The ATL OLE DB Provider templates only s」· C头文件 代码 · 共 78 行
H
78 行
#ifndef __I_DB_ASYNCH_STATUS_IMPL__INCLUDED__
#define __I_DB_ASYNCH_STATUS_IMPL__INCLUDED__
#include <atlcom.h>
#include <atldb.h>
template <class T>
class ATL_NO_VTABLE IDBAsynchStatusImpl : public IDBAsynchStatus
{
public:
STDMETHOD(Abort)(
HCHAPTER hChapter,
ULONG ulOperation)
{
ATLTRACE2(atlTraceDBProvider, 0, "IDBAsynchStatus::Abort()\n");
// The docs say...
// We should enumerate all connected clients and call IDBAsynchNotify::OnProgress()
// with with a ulAsynchPhase of DBASYNCHPHASE_CANCELED etc... If this ever gets called
// we might do that...
return S_OK;
}
STDMETHOD(GetStatus)(
HCHAPTER hChapter,
ULONG ulOperation,
ULONG* pulProgress,
ULONG* pulProgressMax,
ULONG* pulAsynchPhase,
LPOLESTR * ppwszStatusText)
{
ATLTRACE2(atlTraceDBProvider, 0, "IDBAsynchStatus::GetStatus()\n");
if (hChapter != DB_NULL_HCHAPTER)
{
ATLTRACE2(atlTraceDBProvider, 0, "Error: hChapter is not DB_NULL_HCHAPTER and we dont do chapters\n");
return E_UNEXPECTED;
}
if (ulOperation != DBASYNCHOP_OPEN)
{
ATLTRACE2(atlTraceDBProvider, 0, "Error: ulOperation is not DBASYNCHOP_OPEN and the docs say it should be\n");
return E_UNEXPECTED;
}
// We'll ignore these for now
if (pulProgress)
{
*pulProgress = 1;
}
if (pulProgressMax)
{
*pulProgressMax = 1;
}
if (pulAsynchPhase)
{
*pulAsynchPhase = DBASYNCHPHASE_COMPLETE;
}
if (ppwszStatusText)
{
*ppwszStatusText = 0;
}
return S_OK;
}
};
#endif // __I_ROWSET_LOCATE_IMPL__INCLUDED__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?