Kofax 10.1 import - pure .NET

Ascent Collection Server

Kofax 10.1 import - pure .NET

Postby RajJulha » Mon Feb 17, 2014 5:36 am

The Kofax 10.1 documentations state that Api's are exposed as pure .NET assemblies. A close look at the sample from the APIRef.chm below seems to indicate that we still need to handle COM objects. Is it correct or is there an alternative? The sample C:\Program Files\Kofax\Capture\Source\Sample Projects\InpScrpt\Simple\Simple.sln also references COM objects but then I believe they haven't updated the samples since VS 2008. I feel that systematically wrapping objects within the ApiObjectWrapper<T> is cumbersome so is there a pure C# sample somewhere?

Code: Select all
Kofax.Capture.CaptureModule.dll

using Kofax.Capture.AdminModule;   // Working with Kofax Capture's Administration module
...
// Retrieves the active batch class
InteropServices.IBatchClass oBatchClass = m_oAdminApp.ActiveBatchClass;
using (ApiObjectWrapper <InteropServices.IBatchClass> oApiObjectWrapper = new ApiObjectWrapper<InteropServices.IBatchClass>(oBatchClass))
{
  if (!oApiObjectWrapper.IsNull)
  {
     // Do something with the oBatchClass via oApiObjectWrapper.WrappedObject property
     ...
  }
} // oBatchClass.Dispose() will be called automatically.
RajJulha
Participant
 
Posts: 14
Joined: Wed Nov 17, 2010 5:35 am

Return to Kofax Capture Import Connector

Who is online

Users browsing this forum: No registered users and 1 guest