|
I have an existing C++/COM class that can be used to either search for or retrieve a document from FileNET (IDM Desktop version 3.3). My objective is to add a storeFile() method to this class that can take any document and add it to a library in FileNET. This is the first time I am working with COM and FileNET. Anyone with COM expertise would be a great help here, the important part of my code is below:
Code:
IFnDocumentDualPtr pDoc;
IFnCatalogDualPtr pLib;
//at this point pLib has already been correctly defined and works fine for
//the search and retrieve methods. idmTypeDocument is also correctly defined
CComVariant vClassIdent = "Claims"; //name of FileNET library
CComVariant vOpt = ""; //not sure what this should be
pDoc = pLib->CreateObject(idmTypeDocument, vClassIdent, vOpt, vOpt, vOpt);
My program keeps failing at the above piece of code with 'Bad variable type'. I have also used
Code:
HRESULT hr = pLib->raw_CreateObject(idmTypeDocument, vClassIdent, vOpt, &pGenObj)but hr is never successful.
Once I can get pass this error I'll be able to add properties like an Index, Document ID and a Title to my document using IFnPropertyDualPtr so that the document can be retrieved from FileNET.
Does anyone have a working example of how this should be done? How do I specify exactly which document I need to add i.e. absolute path to the document, and then actually get my code to do that? Anyone who can solve this I will be greatly indebted to, this problem has caused me 1001 headaches and there's very little on the web that has helped!
Thanks,
netcracker
|
|
|
|
|
|
|
|