codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Need to use C++/COM to add document to FileNET  netcracker at 19:56 on Wednesday, March 22, 2006
 

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








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  help Plz....
•  ASP with MYSQL
•  Re: need help with event please..
•  how to receive emails using CDONTS in ASP
•  Need to use C++/COM to add document to FileNET
•  Re: Do - While loop
•  selects jump around when containing div is shown
•  JavaScript Form Question
•  Java From Question


Recent Articles
What is a pointer in C?
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net


© Copyright codetoad.com 2001-2006