aaApi_SelectSetDataBuffer获取到工作集后,怎样获取工作集文档的ProjectId和DocumentId
使用LONG lpctstrDocId = aaApi_DmsDataBufferGetNumericProperty(buffer, DOC_PROP_ID, lCount);
获取到的文档ID是工作集本身的工作集ID (setId)
HAADMSBUFFER buffer = aaApi_SelectSetDataBuffer(docSetId);
alCount = aaApi_DmsDataBufferGetCount(buffer);
lCount = alCount;
if (lCount > 0) {
while (lCount--) {
//这里获取到的lpctstrDocId 等于上面的docSetIdLONG lpctstrDocId = aaApi_DmsDataBufferGetNumericProperty(buffer, DOC_PROP_ID, lCount); CString lpctstrDocName = aaApi_DmsDataBufferGetStringProperty(buffer, DOC_PROP_NAME, lCount);
CString cMsg;
cMsg.Format(_T("文件集【%s】的文件【%s】文件ID:%ld 进度: %ld / %ld"), m_lDocSetName, lpctstrDocName, lpctstrDocId, alCount - lCount, alCount); MessageBox(GetForegroundWindow(), message, TITLE_INFO, MB_OK | MB_ICONINFORMATION);
}
已经为您联系PW的技术支持工程师,请再稍微等待一下。
拿到setid 后 用 API LONG aaApi_SelectSet ( LONG lSetId ) 将set信息放到静态缓冲区
使用 aaApi_GetSetNumericProperty()(SET_PROP_CHILD_PROJECTID, lIndex) 获取project id
使用aaApi_GetSetNumericProperty()(SET_PROP_CHILD_ITEMID, lIndex) 获取docid
其中 IIndex 给0 就行了(静态缓冲区只放了一个set所以index给0)
Answer Verified By: qian guowei