Cannot store file using Content management EV API in C++ application
Hi , I'm trying to create an application (C++) for file archiving using Symantec Enterprise Vault Content Management API. For test purposes I use an EV server running on a separate box (virtual machine) which is visible/pingable/accessible via HTTP/ in the network. My application knows IP/DNS name, Vault Store Id, Archive ID. When I run this application on a client side and try to insert a new item (a file), the Insert() method returns an error CONTENTMANAGEMENTAPI_E_NOT_FOUND. If I copy the same application and a new item (a file) on EV server and run it there, it works, i.e. item is stored successfully returning a new Item ID. All client dlls installed properly on a client machine, Vault Store ID, Archive ID, retention category are correct - I see them in Enterprise Vault Administration Console, anonymous/guest user granted rights to store files. In API description, it's clearly mentioned: "In general, applications which use the APIs should be run from a client computer, and not on the Enterprise Vault server." so, I believe, there should be a way to store an item using application on a client side. My question is - what I'm doing wrong? Am I missing something? This is what I do in my application: ------------------------------------------------------------------ CoCreateInstance(clsid, NULL, CLSCTX_ALL, __uuidof(IContentManagementAPI2), reinterpret_cast<LPVOID*>(&cmAPI2)); hr = cmAPI2->put_DirectoryDNSAlias(CComBSTR(L"192.x.x.x")); IArchive* pArchive = NULL; hr = cmAPI2->get_Archive(&pArchive); hr = pArchive->put_Id(bstrArchiveID); IItem* pItem = NULL; hr = cmAPI2->get_Item(&pItem); hr = pItem->put_ArchiveId(bstrArchiveID); IArchiveMetaData* pArchiveMD = NULL; hr = pItem->get_ArchiveMetaData(&pArchiveMD); pArchiveMD->put_RetentionCategory(CComBSTR(L"Business")); IContent* pContent = NULL; hr = pItem->get_Content(&pContent); hr = pContent->put_Title(CComBSTR(L"Test file 1")); hr = pContent->put_FileExtension(CComBSTR(L"tst")); VARIANT vt1; vt1.vt = VT_BSTR; vt1.bstrVal = CComBSTR ("File name and path"); hr = pContent->put_Data(vt1); hr = pItem->Insert(); ... //release all --------------------------------------------- Thanks.Solved2.1KViews0likes14Comments