当我打印复制器对象的描述时,我正在使用Cloudant DB和CDTReplicatorDelegate,我看到它有一个唯一的复制会话ID。如何使用该对象访问它?它没有属性。
//Some impersonation code
CoInitialize(NULL);
STATURL url;
wstring strUrl;
ULONG uFetched;
IUrlHistoryStg2Ptr history;
IEnumSTATURLPtr enumPtr;
if (FAILED(CoCreateInstance(CLSID_CUrlHistory,
NULL,
CLSCTX_INPROC_SERVER,
IID_IUrlHistoryStg2,
(void**)&history)))
{
cout << "ERROR CoCreateInstance";
return false;
}
if (FAILED(history->EnumUrls(&enumPtr))) {
cout << "ERROR EnumUrls";
return false;
}
while (SUCCEEDED(enumPtr->Next(1, &url, &uFetched)))
{
if (uFetched == 0)
break;
strUrl = url.pwcsUrl;
wcout << strUrl << endl;
}
CoUninitialize();
的示例输出:
replicator.description
我将复制器对象(多个)存储在一个委托中,当复制完成时,我想删除它的引用。这就是我需要它的原因。
CDTReplicator push, source: establishment, target: https://ighterequallockneovessin:*****@*****.cloudant.com/establishment filter name: (null), filter parameters (null), unique replication session ID: 930C1002-B0B2-4576-BE84-C0BEFBD00834
有什么想法吗?