Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

COM Newbie -- Please Help

36 views
Skip to first unread message

bra...@integritysd.net

unread,
Aug 12, 2008, 9:19:40 AM8/12/08
to
Hello all, I am new to COM development and am at my wits end trying to
figure this out.

Background: I am coding through Delphi 7, trying to create a "Release
Script" for Kofax Capture. This release "script" is actually a dll I
have to create. According to the documentation I am supposed to
"include the KfxReleaseSetupScript and KfxReleaseScript COM components
in the ActiveX DLL":

1. the KfxReleaseSetupScript COM interface
The KfxReleaseSetupScript interface must include the
following:
One public object variable declared as
ReleaseSetupData. The Administrationmodule uses this variable to
expose and update release configuration for the document class.
Four methods called OpenScript, RunUI, ActionEvent,
and CloseScript, which the Administration program calls to perform the
various stages of the release setup process.

2. the KfxReleaseScript COM interface
The KfxReleaseScript interface must include the following:
One public object variable declared as ReleaseData.
The Release module uses this variable to expose release data for the
release process.
Three methods called OpenScript, ReleaseDoc, and
CloseScript, which the Release module calls to perform the various
stages of the release process.

I have three files in my project: FieldVerificationRelease.dpr (the
main dll unit), ufrmSetupUI(a form), TextRel_TLB (a TLB to interface
with an existing release script dll that I stripped out the interface
ties to the dll itself and left the KfxReleaseSetupScript and
KfxReleaseScript COM structures), and AscentRelease_TLB (a TLB that I
have created a unit for that defines the class structure of
ReleaseSetupData and ReleaseData).

I can compile this DLL but cannot use it from my own test app le alone
through the Kofax Capture App.

Below is my main DLL code (.dpr) and the TextRel_TLB that I altered
and the original TextRel_TLB. At this point I am just trying to call
the RunUI method which will display the SetupUI form.

Thanks All,
Branden

//
*****************************************************************************************************************************
// FieldVerificationRelease.dpr
//
*****************************************************************************************************************************

library FieldVerificationRelease;

{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures
or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }

uses
ShareMem,
SysUtils,
Classes,
Forms,
FileCtrl,
ExtCtrls,
Dialogs,
Controls,
ComObj,
ufrmSetupUI in 'ufrmSetupUI.pas' {frmSetupUI},
AscentRelease_TLB in '..\..\Program Files\Borland\Delphi7\Imports
\AscentRelease_TLB.pas',
TextRel_TLB in 'TextRel_TLB.pas';

type
// TKfxReleaseSetupScript = class(TTypedComObject,
KfxReleaseSetupScript, _KfxReleaseSetupScript)
// TKfxReleaseSetupScript = class(TTypedComObject,
_KfxReleaseSetupScript)
TKfxReleaseSetupScript = class(TComponent, _KfxReleaseSetupScript)
protected
function Get_SetupData: IReleaseSetupData; safecall;
procedure _Set_SetupData(const SetupData: IReleaseSetupData);
safecall;
public
function CloseScript: KfxReturnValue; safecall;
function ActionEvent(var intActionID: KfxActionValue; var
strData1: WideString;
var strData2: WideString): KfxReturnValue;
safecall;
function OpenScript: KfxReturnValue; safecall;
function RunUI: KfxReturnValue; safecall;
property SetupData: IReleaseSetupData read Get_SetupData write
_Set_SetupData;
{Declare IKfxReleaseSetupScript methods here}
end;


// TKfxReleaseScript = class(TTypedComObject, KfxReleaseScript,
_KfxReleaseScript)
// TKfxReleaseScript = class(TTypedComObject, _KfxReleaseScript)
TKfxReleaseScript = class(TComponent, _KfxReleaseScript)
protected
function Get_DocumentData: IReleaseData; safecall;
procedure _Set_DocumentData(const DocumentData: IReleaseData);
safecall;
public
function CloseScript: KfxReturnValue; safecall;
function OpenScript: KfxReturnValue; safecall;
function ReleaseDoc: KfxReturnValue; safecall;
function PadFileName(const strFileName: WideString): WideString;
safecall;
property DocumentData: IReleaseData read Get_DocumentData write
_Set_DocumentData;
{Declare IKfxReleaseScript methods here}
end;

{$R *.res}

{ TKfxReleaseSetupScript }

procedure TKfxReleaseSetupScript._Set_SetupData(
const SetupData: IReleaseSetupData);
begin

end;

function TKfxReleaseSetupScript.ActionEvent(
var intActionID: KfxActionValue; var strData1,
strData2: WideString): KfxReturnValue;
begin

end;

function TKfxReleaseSetupScript.CloseScript: KfxReturnValue;
begin

end;

function TKfxReleaseSetupScript.Get_SetupData: IReleaseSetupData;
begin

end;

function TKfxReleaseSetupScript.OpenScript: KfxReturnValue;
begin

end;

function TKfxReleaseSetupScript.RunUI: KfxReturnValue;
begin
frmSetupUI := TfrmSetupUI.Create(nil);
try
frmSetupUI.ShowModal;
finally
frmSetupUI.Free;
end;
end;

{ TKfxReleaseScript }

procedure TKfxReleaseScript._Set_DocumentData(
const DocumentData: IReleaseData);
begin

end;

function TKfxReleaseScript.CloseScript: KfxReturnValue;
begin

end;

function TKfxReleaseScript.Get_DocumentData: IReleaseData;
begin

end;

function TKfxReleaseScript.OpenScript: KfxReturnValue;
begin

end;

function TKfxReleaseScript.PadFileName(
const strFileName: WideString): WideString;
begin

end;

function TKfxReleaseScript.ReleaseDoc: KfxReturnValue;
begin

end;

begin

end.

//
*****************************************************************************************************************************
// FieldVerificationRelease.dpr
//
*****************************************************************************************************************************

//
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// TextRel.DPR (My altered version)
//
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

unit TextRel_TLB;

//
************************************************************************ //
//
WARNING
//
-------
// The types declared in this file were generated from data read from
a
// Type Library. If this type library is explicitly or indirectly
(via
// another type library referring to this type library) re-imported,
or the
// 'Refresh' command of the Type Library Editor activated while
editing the
// Type Library, the contents of this file will be regenerated and
all
// manual modifications will be
lost.
//
************************************************************************ //

// PASTLWTR : 1.2
// File generated on 8/11/2008 10:39:29 AM from Type Library described
below.

//
************************************************************************ //
// Type Lib: C:\Program Files\Kofax\Capture\Bin\TextRel.dll (1)
// LIBID: {DFF4DD91-28D4-4BE5-9601-9F8058948A40}
// LCID: 0
// Helpfile: C:\Program Files\Kofax\Capture\Bin\TextRel.chm
// HelpString: Kofax Capture Text Release Script
// DepndLst:
// (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
// (2) v1.0 AscentRelease, (C:\Program Files\Kofax\Capture\Bin
\AscRel.dll)
// (3) v6.0 VBA, (C:\WINDOWS\system32\MSVBVM60.DLL)
// Errors:
// Error creating palette bitmap of (TKfxReleaseSetupScript) :
Server C:\Program Files\Kofax\Capture\Bin\TextRel.dll contains no
icons
// Error creating palette bitmap of (TKfxReleaseScript) : Server C:
\Program Files\Kofax\Capture\Bin\TextRel.dll contains no icons
// Error creating palette bitmap of (TKfxLink) : Server C:\Program
Files\Kofax\Capture\Bin\TextRel.dll contains no icons
// Error creating palette bitmap of (TImageName) : Server C:\Program
Files\Kofax\Capture\Bin\TextRel.dll contains no icons
// Error creating palette bitmap of (TImageNameSetup) : Server C:
\Program Files\Kofax\Capture\Bin\TextRel.dll contains no icons
//
************************************************************************ //
//
*************************************************************************//
//
NOTE:
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by
properties
// which return objects that may need to be explicitly created via a
function
// call prior to any access via the property. These items have been
disabled
// in order to prevent accidental use from within the object
inspector. You
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by
selectively
// removing them from the $IFDEF blocks. However, such items must
still be
// programmatically created via a method of the appropriate CoClass
before
// they can be
used.
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked
pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, AscentRelease_TLB, Classes, Graphics,
OleServer, StdVCL, Variants;//,
//VBA_TLB;


//
*********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:
// Type Libraries :
LIBID_xxxx
// CoClasses :
CLASS_xxxx
// DISPInterfaces :
DIID_xxxx
// Non-DISP interfaces:
IID_xxxx
//
*********************************************************************//
const
// TypeLibrary Major and minor versions
TextRelMajorVersion = 1;
TextRelMinorVersion = 0;

LIBID_TextRel: TGUID = '{DFF4DD91-28D4-4BE5-9601-9F8058948A40}';

IID__KfxReleaseSetupScript: TGUID = '{5A05FAC6-BFAE-4AA5-
ABD3-24D99861E923}';
CLASS_KfxReleaseSetupScript: TGUID = '{C53D99A8-59C4-431F-BFB8-
CA06D6DD42C6}';
IID__KfxReleaseScript: TGUID = '{5B1F6F00-EBA7-40A8-
A2E2-005CD2B8C37D}';
CLASS_KfxReleaseScript: TGUID = '{7D4863D2-
AE52-456D-9AF0-6506789010BF}';
IID__KfxLink: TGUID = '{B67DE8F4-7C18-4900-A534-13694BB5286E}';
CLASS_KfxLink: TGUID = '{F307EECF-78FE-4FF5-AEE7-4444817347EF}';
IID__ImageName: TGUID = '{187313BE-E9F3-4D04-965A-2EA3F3018953}';
CLASS_ImageName: TGUID = '{6016FB14-4447-4710-AFBD-E61BDC79279F}';
IID__ImageNameSetup: TGUID = '{68FB848C-
E315-4E3D-9ED7-6E7FCD08D35D}';
CLASS_ImageNameSetup: TGUID = '{33ECF8D7-1F1F-453F-
B528-52F1F802357D}';

//
*********************************************************************//
// Declaration of Enumerations defined in Type
Library
//
*********************************************************************//
// Constants for enum ImageFilenameOption
type
ImageFilenameOption = TOleEnum;
const
PFO_Unknown = $00000000;
PFO_Standard = $00000001;
PFO_Decimal = $00000002;
PFO_LeadingZero = $00000003;
PFO_Indexed = $00000004;

// Constants for enum DuplicateNameHandling
type
DuplicateNameHandling = TOleEnum;
const
PDN_Unknown = $00000000;
PDN_Replace = $00000001;
PDN_Rename = $00000002;
PDN_Error = $00000003;

type

//
*********************************************************************//
// Forward declaration of types defined in
TypeLibrary
//
*********************************************************************//
_KfxReleaseSetupScript = interface;
_KfxReleaseSetupScriptDisp = dispinterface;
_KfxReleaseScript = interface;
_KfxReleaseScriptDisp = dispinterface;
_KfxLink = interface;
_KfxLinkDisp = dispinterface;
_ImageName = interface;
_ImageNameDisp = dispinterface;
_ImageNameSetup = interface;
_ImageNameSetupDisp = dispinterface;

//
*********************************************************************//
// Declaration of CoClasses defined in Type
Library
// (NOTE: Here we map each CoClass to its Default
Interface)
//
*********************************************************************//
KfxReleaseSetupScript = _KfxReleaseSetupScript;
KfxReleaseScript = _KfxReleaseScript;
KfxLink = _KfxLink;
ImageName = _ImageName;
ImageNameSetup = _ImageNameSetup;


//
*********************************************************************//
// Interface: _KfxReleaseSetupScript
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {5A05FAC6-BFAE-4AA5-ABD3-24D99861E923}
//
*********************************************************************//
_KfxReleaseSetupScript = interface(IDispatch)
['{5A05FAC6-BFAE-4AA5-ABD3-24D99861E923}']
function Get_SetupData: IReleaseSetupData; safecall;
procedure _Set_SetupData(const SetupData: IReleaseSetupData);
safecall;
function CloseScript: KfxReturnValue; safecall;
function ActionEvent(var intActionID: KfxActionValue; var
strData1: WideString;
var strData2: WideString): KfxReturnValue;
safecall;
function OpenScript: KfxReturnValue; safecall;
function RunUI: KfxReturnValue; safecall;
property SetupData: IReleaseSetupData read Get_SetupData write
_Set_SetupData;
end;

//
*********************************************************************//
// DispIntf: _KfxReleaseSetupScriptDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {5A05FAC6-BFAE-4AA5-ABD3-24D99861E923}
//
*********************************************************************//
_KfxReleaseSetupScriptDisp = dispinterface
['{5A05FAC6-BFAE-4AA5-ABD3-24D99861E923}']
property SetupData: IReleaseSetupData dispid 1073938432;
function CloseScript: KfxReturnValue; dispid 1610809344;
function ActionEvent(var intActionID: KfxActionValue; var
strData1: WideString;
var strData2: WideString): KfxReturnValue;
dispid 1610809345;
function OpenScript: KfxReturnValue; dispid 1610809347;
function RunUI: KfxReturnValue; dispid 1610809348;
end;

//
*********************************************************************//
// Interface: _KfxReleaseScript
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {5B1F6F00-EBA7-40A8-A2E2-005CD2B8C37D}
//
*********************************************************************//
_KfxReleaseScript = interface(IDispatch)
['{5B1F6F00-EBA7-40A8-A2E2-005CD2B8C37D}']
function Get_DocumentData: IReleaseData; safecall;
procedure _Set_DocumentData(const DocumentData: IReleaseData);
safecall;
function CloseScript: KfxReturnValue; safecall;
function OpenScript: KfxReturnValue; safecall;
function ReleaseDoc: KfxReturnValue; safecall;
function PadFileName(const strFileName: WideString): WideString;
safecall;
property DocumentData: IReleaseData read Get_DocumentData write
_Set_DocumentData;
end;

//
*********************************************************************//
// DispIntf: _KfxReleaseScriptDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {5B1F6F00-EBA7-40A8-A2E2-005CD2B8C37D}
//
*********************************************************************//
_KfxReleaseScriptDisp = dispinterface
['{5B1F6F00-EBA7-40A8-A2E2-005CD2B8C37D}']
property DocumentData: IReleaseData dispid 1073938432;
function CloseScript: KfxReturnValue; dispid 1610809344;
function OpenScript: KfxReturnValue; dispid 1610809345;
function ReleaseDoc: KfxReturnValue; dispid 1610809346;
function PadFileName(const strFileName: WideString): WideString;
dispid 1610809349;
end;

//
*********************************************************************//
// Interface: _KfxLink
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {B67DE8F4-7C18-4900-A534-13694BB5286E}
//
*********************************************************************//
_KfxLink = interface(IDispatch)
['{B67DE8F4-7C18-4900-A534-13694BB5286E}']
function Get_Destination: WideString; safecall;
procedure Set_Destination(const Destination: WideString);
safecall;
function Get_SourceType: Integer; safecall;
procedure Set_SourceType(SourceType: Integer); safecall;
function Get_Source: WideString; safecall;
procedure Set_Source(const Source: WideString); safecall;
function Get_Caption: WideString; safecall;
procedure Set_Caption(const Caption: WideString); safecall;
property Destination: WideString read Get_Destination write
Set_Destination;
property SourceType: Integer read Get_SourceType write
Set_SourceType;
property Source: WideString read Get_Source write Set_Source;
property Caption: WideString read Get_Caption write Set_Caption;
end;

//
*********************************************************************//
// DispIntf: _KfxLinkDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {B67DE8F4-7C18-4900-A534-13694BB5286E}
//
*********************************************************************//
_KfxLinkDisp = dispinterface
['{B67DE8F4-7C18-4900-A534-13694BB5286E}']
property Destination: WideString dispid 1073938432;
property SourceType: Integer dispid 1073938433;
property Source: WideString dispid 1073938434;
property Caption: WideString dispid 1073938435;
end;

//
*********************************************************************//
// Interface: _ImageName
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {187313BE-E9F3-4D04-965A-2EA3F3018953}
//
*********************************************************************//
_ImageName = interface(IDispatch)
['{187313BE-E9F3-4D04-965A-2EA3F3018953}']
procedure RenameOutputFile(var strSrcName: WideString; var
strFinalName: WideString); safecall;
procedure RenameOutputDirectory(var strSrcName: WideString; var
strFinalName: WideString); safecall;
function CalculateFileName(var eNameOption: ImageFilenameOption;
var strIndexFieldValue: WideString):
WideString; safecall;
function GetTifExtension: WideString; safecall;
function GetOCRExtension: WideString; safecall;
// function CalculateExtensions(var bReleaseImageFiles: WordBool;
// var bReleaseOCRFullText: WordBool;
var bReleaseKofaxPDF: WordBool;
// var bReleaseOCRToImageDir:
WordBool): _Collection; safecall;
function GetIncludesSubfolder: WordBool; safecall;
function IsSinglePageImage: WordBool; safecall;
// function ReserveImageNames(var strReleaseDir: WideString; var
strFileName: WideString;
// var eDuplicateNames:
DuplicateNameHandling; var oExtList: _Collection): WordBool; safecall;
procedure RemoveReserveFiles; safecall;
procedure RemoveEmptyReservedFiles; safecall;
procedure CalculateReleaseSettings(var bReleaseOCRToImageDir:
WordBool;
var eNameOption:
ImageFilenameOption;
var eDuplicateNames:
DuplicateNameHandling;
var strFinalRelDir:
WideString;
var strIndexOptionName:
WideString); safecall;
end;

//
*********************************************************************//
// DispIntf: _ImageNameDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {187313BE-E9F3-4D04-965A-2EA3F3018953}
//
*********************************************************************//
_ImageNameDisp = dispinterface
['{187313BE-E9F3-4D04-965A-2EA3F3018953}']
procedure RenameOutputFile(var strSrcName: WideString; var
strFinalName: WideString); dispid 1610809345;
procedure RenameOutputDirectory(var strSrcName: WideString; var
strFinalName: WideString); dispid 1610809346;
function CalculateFileName(var eNameOption: ImageFilenameOption;
var strIndexFieldValue: WideString):
WideString; dispid 1610809347;
function GetTifExtension: WideString; dispid 1610809348;
function GetOCRExtension: WideString; dispid 1610809349;
// function CalculateExtensions(var bReleaseImageFiles: WordBool;
// var bReleaseOCRFullText: WordBool;
var bReleaseKofaxPDF: WordBool;
// var bReleaseOCRToImageDir:
WordBool): _Collection; dispid 1610809350;
function GetIncludesSubfolder: WordBool; dispid 1610809351;
function IsSinglePageImage: WordBool; dispid 1610809352;
// function ReserveImageNames(var strReleaseDir: WideString; var
strFileName: WideString;
// var eDuplicateNames:
DuplicateNameHandling; var oExtList: _Collection): WordBool; dispid
1610809353;
procedure RemoveReserveFiles; dispid 1610809355;
procedure RemoveEmptyReservedFiles; dispid 1610809356;
procedure CalculateReleaseSettings(var bReleaseOCRToImageDir:
WordBool;
var eNameOption:
ImageFilenameOption;
var eDuplicateNames:
DuplicateNameHandling;
var strFinalRelDir:
WideString;
var strIndexOptionName:
WideString); dispid 1610809357;
end;

//
*********************************************************************//
// Interface: _ImageNameSetup
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {68FB848C-E315-4E3D-9ED7-6E7FCD08D35D}
//
*********************************************************************//
_ImageNameSetup = interface(IDispatch)
['{68FB848C-E315-4E3D-9ED7-6E7FCD08D35D}']
procedure ProcessFolderMenu(var strSource: WideString); safecall;
function GetLinksSourceValue(var eSourceType: KfxLinkSourceType;
var strValue: WideString): WideString; safecall;
function CheckForPDFConflict(const oSetupData: IReleaseSetupData):
WordBool; safecall;
end;

//
*********************************************************************//
// DispIntf: _ImageNameSetupDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {68FB848C-E315-4E3D-9ED7-6E7FCD08D35D}
//
*********************************************************************//
_ImageNameSetupDisp = dispinterface
['{68FB848C-E315-4E3D-9ED7-6E7FCD08D35D}']
procedure ProcessFolderMenu(var strSource: WideString); dispid
1610809345;
function GetLinksSourceValue(var eSourceType: KfxLinkSourceType;
var strValue: WideString): WideString; dispid 1610809346;
function CheckForPDFConflict(const oSetupData: IReleaseSetupData):
WordBool; dispid 1610809354;
end;

//
*********************************************************************//
// The Class CoKfxReleaseSetupScript provides a Create and
CreateRemote method to
// create instances of the default interface _KfxReleaseSetupScript
exposed by
// the CoClass KfxReleaseSetupScript. The functions are intended to be
used by
// clients wishing to automate the CoClass objects exposed by
the
// server of this
typelibrary.
//
*********************************************************************//
CoKfxReleaseSetupScript = class
class function Create: _KfxReleaseSetupScript;
class function CreateRemote(const MachineName: string):
_KfxReleaseSetupScript;
end;

CoKfxReleaseScript = class
class function Create: _KfxReleaseScript;
class function CreateRemote(const MachineName: string):
_KfxReleaseScript;
end;

CoKfxLink = class
class function Create: _KfxLink;
class function CreateRemote(const MachineName: string): _KfxLink;
end;


resourcestring
dtlServerPage = 'Laserfiche';

dtlOcxPage = 'Laserfiche';

implementation

uses ComObj;

{ CoKfxReleaseSetupScript }

class function CoKfxReleaseSetupScript.Create: _KfxReleaseSetupScript;
begin
Result := CreateComObject(CLASS_KfxReleaseSetupScript) as
_KfxReleaseSetupScript;
end;

class function CoKfxReleaseSetupScript.CreateRemote(
const MachineName: string): _KfxReleaseSetupScript;
begin
Result := CreateRemoteComObject(MachineName,
CLASS_KfxReleaseSetupScript) as _KfxReleaseSetupScript;
end;

{ CoKfxReleaseScript }

class function CoKfxReleaseScript.Create: _KfxReleaseScript;
begin
Result := CreateComObject(CLASS_KfxReleaseScript) as
_KfxReleaseScript;
end;

class function CoKfxReleaseScript.CreateRemote(
const MachineName: string): _KfxReleaseScript;
begin
Result := CreateRemoteComObject(MachineName, CLASS_KfxReleaseScript)
as _KfxReleaseScript;
end;

{ CoKfxLink }

class function CoKfxLink.Create: _KfxLink;
begin
Result := CreateComObject(CLASS_KfxLink) as _KfxLink;
end;

class function CoKfxLink.CreateRemote(const MachineName: string):
_KfxLink;
begin
Result := CreateRemoteComObject(MachineName, CLASS_KfxLink) as
_KfxLink;
end;

end.

//
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// TextRel_TLB.pas (My altered version)
//
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


//
#########################################################################################
// TextRel_TLB.pas (The original unit created to interface with an
existing release script/dll like I'm trying to make)
//
#########################################################################################

unit TextRel_TLB;

//
************************************************************************ //
//
WARNING
//
-------
// The types declared in this file were generated from data read from
a
// Type Library. If this type library is explicitly or indirectly
(via
// another type library referring to this type library) re-imported,
or the
// 'Refresh' command of the Type Library Editor activated while
editing the
// Type Library, the contents of this file will be regenerated and
all
// manual modifications will be
lost.
//
************************************************************************ //

// PASTLWTR : 1.2
// File generated on 8/11/2008 4:40:31 PM from Type Library described
below.

//
************************************************************************ //
// Type Lib: C:\Program Files\Kofax\Capture\Bin\TextRel.dll (1)
// LIBID: {DFF4DD91-28D4-4BE5-9601-9F8058948A40}
// LCID: 0
// Helpfile: C:\Program Files\Kofax\Capture\Bin\TextRel.chm
// HelpString: Kofax Capture Text Release Script
// DepndLst:
// (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
// (2) v1.0 AscentRelease, (C:\Program Files\Kofax\Capture\Bin
\AscRel.dll)
// (3) v6.0 VBA, (C:\WINDOWS\system32\MSVBVM60.DLL)
// Errors:
// Error creating palette bitmap of (TKfxReleaseSetupScript) :
Server C:\Program Files\Kofax\Capture\Bin\TextRel.dll contains no
icons
// Error creating palette bitmap of (TKfxReleaseScript) : Server C:
\Program Files\Kofax\Capture\Bin\TextRel.dll contains no icons
// Error creating palette bitmap of (TKfxLink) : Server C:\Program
Files\Kofax\Capture\Bin\TextRel.dll contains no icons
// Error creating palette bitmap of (TImageName) : Server C:\Program
Files\Kofax\Capture\Bin\TextRel.dll contains no icons
// Error creating palette bitmap of (TImageNameSetup) : Server C:
\Program Files\Kofax\Capture\Bin\TextRel.dll contains no icons
//
************************************************************************ //
//
*************************************************************************//
//
NOTE:
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by
properties
// which return objects that may need to be explicitly created via a
function
// call prior to any access via the property. These items have been
disabled
// in order to prevent accidental use from within the object
inspector. You
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by
selectively
// removing them from the $IFDEF blocks. However, such items must
still be
// programmatically created via a method of the appropriate CoClass
before
// they can be
used.
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked
pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, AscentRelease_TLB, Classes, Graphics,
OleServer, StdVCL, Variants,
VBA_TLB;


//
*********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are
used:
// Type Libraries :
LIBID_xxxx
// CoClasses :
CLASS_xxxx
// DISPInterfaces :
DIID_xxxx
// Non-DISP interfaces:
IID_xxxx
//
*********************************************************************//
const
// TypeLibrary Major and minor versions
TextRelMajorVersion = 1;
TextRelMinorVersion = 0;

LIBID_TextRel: TGUID = '{DFF4DD91-28D4-4BE5-9601-9F8058948A40}';

IID__KfxReleaseSetupScript: TGUID = '{5A05FAC6-BFAE-4AA5-
ABD3-24D99861E923}';
CLASS_KfxReleaseSetupScript: TGUID = '{C53D99A8-59C4-431F-BFB8-
CA06D6DD42C6}';
IID__KfxReleaseScript: TGUID = '{5B1F6F00-EBA7-40A8-
A2E2-005CD2B8C37D}';
CLASS_KfxReleaseScript: TGUID = '{7D4863D2-
AE52-456D-9AF0-6506789010BF}';
IID__KfxLink: TGUID = '{B67DE8F4-7C18-4900-A534-13694BB5286E}';
CLASS_KfxLink: TGUID = '{F307EECF-78FE-4FF5-AEE7-4444817347EF}';
IID__ImageName: TGUID = '{187313BE-E9F3-4D04-965A-2EA3F3018953}';
CLASS_ImageName: TGUID = '{6016FB14-4447-4710-AFBD-E61BDC79279F}';
IID__ImageNameSetup: TGUID = '{68FB848C-
E315-4E3D-9ED7-6E7FCD08D35D}';
CLASS_ImageNameSetup: TGUID = '{33ECF8D7-1F1F-453F-
B528-52F1F802357D}';

//
*********************************************************************//
// Declaration of Enumerations defined in Type
Library
//
*********************************************************************//
// Constants for enum ImageFilenameOption
type
ImageFilenameOption = TOleEnum;
const
PFO_Unknown = $00000000;
PFO_Standard = $00000001;
PFO_Decimal = $00000002;
PFO_LeadingZero = $00000003;
PFO_Indexed = $00000004;

// Constants for enum DuplicateNameHandling
type
DuplicateNameHandling = TOleEnum;
const
PDN_Unknown = $00000000;
PDN_Replace = $00000001;
PDN_Rename = $00000002;
PDN_Error = $00000003;

type

//
*********************************************************************//
// Forward declaration of types defined in
TypeLibrary
//
*********************************************************************//
_KfxReleaseSetupScript = interface;
_KfxReleaseSetupScriptDisp = dispinterface;
_KfxReleaseScript = interface;
_KfxReleaseScriptDisp = dispinterface;
_KfxLink = interface;
_KfxLinkDisp = dispinterface;
_ImageName = interface;
_ImageNameDisp = dispinterface;
_ImageNameSetup = interface;
_ImageNameSetupDisp = dispinterface;

//
*********************************************************************//
// Declaration of CoClasses defined in Type
Library
// (NOTE: Here we map each CoClass to its Default
Interface)
//
*********************************************************************//
KfxReleaseSetupScript = _KfxReleaseSetupScript;
KfxReleaseScript = _KfxReleaseScript;
KfxLink = _KfxLink;
ImageName = _ImageName;
ImageNameSetup = _ImageNameSetup;


//
*********************************************************************//
// Interface: _KfxReleaseSetupScript
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {5A05FAC6-BFAE-4AA5-ABD3-24D99861E923}
//
*********************************************************************//
_KfxReleaseSetupScript = interface(IDispatch)
['{5A05FAC6-BFAE-4AA5-ABD3-24D99861E923}']
function Get_SetupData: IReleaseSetupData; safecall;
procedure _Set_SetupData(const SetupData: IReleaseSetupData);
safecall;
function CloseScript: KfxReturnValue; safecall;
function ActionEvent(var intActionID: KfxActionValue; var
strData1: WideString;
var strData2: WideString): KfxReturnValue;
safecall;
function OpenScript: KfxReturnValue; safecall;
function RunUI: KfxReturnValue; safecall;
property SetupData: IReleaseSetupData read Get_SetupData write
_Set_SetupData;
end;

//
*********************************************************************//
// DispIntf: _KfxReleaseSetupScriptDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {5A05FAC6-BFAE-4AA5-ABD3-24D99861E923}
//
*********************************************************************//
_KfxReleaseSetupScriptDisp = dispinterface
['{5A05FAC6-BFAE-4AA5-ABD3-24D99861E923}']
property SetupData: IReleaseSetupData dispid 1073938432;
function CloseScript: KfxReturnValue; dispid 1610809344;
function ActionEvent(var intActionID: KfxActionValue; var
strData1: WideString;
var strData2: WideString): KfxReturnValue;
dispid 1610809345;
function OpenScript: KfxReturnValue; dispid 1610809347;
function RunUI: KfxReturnValue; dispid 1610809348;
end;

//
*********************************************************************//
// Interface: _KfxReleaseScript
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {5B1F6F00-EBA7-40A8-A2E2-005CD2B8C37D}
//
*********************************************************************//
_KfxReleaseScript = interface(IDispatch)
['{5B1F6F00-EBA7-40A8-A2E2-005CD2B8C37D}']
function Get_DocumentData: IReleaseData; safecall;
procedure _Set_DocumentData(const DocumentData: IReleaseData);
safecall;
function CloseScript: KfxReturnValue; safecall;
function OpenScript: KfxReturnValue; safecall;
function ReleaseDoc: KfxReturnValue; safecall;
function PadFileName(const strFileName: WideString): WideString;
safecall;
property DocumentData: IReleaseData read Get_DocumentData write
_Set_DocumentData;
end;

//
*********************************************************************//
// DispIntf: _KfxReleaseScriptDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {5B1F6F00-EBA7-40A8-A2E2-005CD2B8C37D}
//
*********************************************************************//
_KfxReleaseScriptDisp = dispinterface
['{5B1F6F00-EBA7-40A8-A2E2-005CD2B8C37D}']
property DocumentData: IReleaseData dispid 1073938432;
function CloseScript: KfxReturnValue; dispid 1610809344;
function OpenScript: KfxReturnValue; dispid 1610809345;
function ReleaseDoc: KfxReturnValue; dispid 1610809346;
function PadFileName(const strFileName: WideString): WideString;
dispid 1610809349;
end;

//
*********************************************************************//
// Interface: _KfxLink
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {B67DE8F4-7C18-4900-A534-13694BB5286E}
//
*********************************************************************//
_KfxLink = interface(IDispatch)
['{B67DE8F4-7C18-4900-A534-13694BB5286E}']
function Get_Destination: WideString; safecall;
procedure Set_Destination(const Destination: WideString);
safecall;
function Get_SourceType: Integer; safecall;
procedure Set_SourceType(SourceType: Integer); safecall;
function Get_Source: WideString; safecall;
procedure Set_Source(const Source: WideString); safecall;
function Get_Caption: WideString; safecall;
procedure Set_Caption(const Caption: WideString); safecall;
property Destination: WideString read Get_Destination write
Set_Destination;
property SourceType: Integer read Get_SourceType write
Set_SourceType;
property Source: WideString read Get_Source write Set_Source;
property Caption: WideString read Get_Caption write Set_Caption;
end;

//
*********************************************************************//
// DispIntf: _KfxLinkDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {B67DE8F4-7C18-4900-A534-13694BB5286E}
//
*********************************************************************//
_KfxLinkDisp = dispinterface
['{B67DE8F4-7C18-4900-A534-13694BB5286E}']
property Destination: WideString dispid 1073938432;
property SourceType: Integer dispid 1073938433;
property Source: WideString dispid 1073938434;
property Caption: WideString dispid 1073938435;
end;

//
*********************************************************************//
// Interface: _ImageName
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {187313BE-E9F3-4D04-965A-2EA3F3018953}
//
*********************************************************************//
_ImageName = interface(IDispatch)
['{187313BE-E9F3-4D04-965A-2EA3F3018953}']
procedure RenameOutputFile(var strSrcName: WideString; var
strFinalName: WideString); safecall;
procedure RenameOutputDirectory(var strSrcName: WideString; var
strFinalName: WideString); safecall;
function CalculateFileName(var eNameOption: ImageFilenameOption;
var strIndexFieldValue: WideString):
WideString; safecall;
function GetTifExtension: WideString; safecall;
function GetOCRExtension: WideString; safecall;
function CalculateExtensions(var bReleaseImageFiles: WordBool;
var bReleaseOCRFullText: WordBool;
var bReleaseKofaxPDF: WordBool;
var bReleaseOCRToImageDir: WordBool):
_Collection; safecall;
function GetIncludesSubfolder: WordBool; safecall;
function IsSinglePageImage: WordBool; safecall;
function ReserveImageNames(var strReleaseDir: WideString; var
strFileName: WideString;
var eDuplicateNames:
DuplicateNameHandling; var oExtList: _Collection): WordBool; safecall;
procedure RemoveReserveFiles; safecall;
procedure RemoveEmptyReservedFiles; safecall;
procedure CalculateReleaseSettings(var bReleaseOCRToImageDir:
WordBool;
var eNameOption:
ImageFilenameOption;
var eDuplicateNames:
DuplicateNameHandling;
var strFinalRelDir:
WideString;
var strIndexOptionName:
WideString); safecall;
end;

//
*********************************************************************//
// DispIntf: _ImageNameDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {187313BE-E9F3-4D04-965A-2EA3F3018953}
//
*********************************************************************//
_ImageNameDisp = dispinterface
['{187313BE-E9F3-4D04-965A-2EA3F3018953}']
procedure RenameOutputFile(var strSrcName: WideString; var
strFinalName: WideString); dispid 1610809345;
procedure RenameOutputDirectory(var strSrcName: WideString; var
strFinalName: WideString); dispid 1610809346;
function CalculateFileName(var eNameOption: ImageFilenameOption;
var strIndexFieldValue: WideString):
WideString; dispid 1610809347;
function GetTifExtension: WideString; dispid 1610809348;
function GetOCRExtension: WideString; dispid 1610809349;
function CalculateExtensions(var bReleaseImageFiles: WordBool;
var bReleaseOCRFullText: WordBool;
var bReleaseKofaxPDF: WordBool;
var bReleaseOCRToImageDir: WordBool):
_Collection; dispid 1610809350;
function GetIncludesSubfolder: WordBool; dispid 1610809351;
function IsSinglePageImage: WordBool; dispid 1610809352;
function ReserveImageNames(var strReleaseDir: WideString; var
strFileName: WideString;
var eDuplicateNames:
DuplicateNameHandling; var oExtList: _Collection): WordBool; dispid
1610809353;
procedure RemoveReserveFiles; dispid 1610809355;
procedure RemoveEmptyReservedFiles; dispid 1610809356;
procedure CalculateReleaseSettings(var bReleaseOCRToImageDir:
WordBool;
var eNameOption:
ImageFilenameOption;
var eDuplicateNames:
DuplicateNameHandling;
var strFinalRelDir:
WideString;
var strIndexOptionName:
WideString); dispid 1610809357;
end;

//
*********************************************************************//
// Interface: _ImageNameSetup
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {68FB848C-E315-4E3D-9ED7-6E7FCD08D35D}
//
*********************************************************************//
_ImageNameSetup = interface(IDispatch)
['{68FB848C-E315-4E3D-9ED7-6E7FCD08D35D}']
procedure ProcessFolderMenu(var strSource: WideString); safecall;
function GetLinksSourceValue(var eSourceType: KfxLinkSourceType;
var strValue: WideString): WideString; safecall;
function CheckForPDFConflict(const oSetupData: IReleaseSetupData):
WordBool; safecall;
end;

//
*********************************************************************//
// DispIntf: _ImageNameSetupDisp
// Flags: (4560) Hidden Dual NonExtensible OleAutomation
Dispatchable
// GUID: {68FB848C-E315-4E3D-9ED7-6E7FCD08D35D}
//
*********************************************************************//
_ImageNameSetupDisp = dispinterface
['{68FB848C-E315-4E3D-9ED7-6E7FCD08D35D}']
procedure ProcessFolderMenu(var strSource: WideString); dispid
1610809345;
function GetLinksSourceValue(var eSourceType: KfxLinkSourceType;
var strValue: WideString): WideString; dispid 1610809346;
function CheckForPDFConflict(const oSetupData: IReleaseSetupData):
WordBool; dispid 1610809354;
end;

//
*********************************************************************//
// The Class CoKfxReleaseSetupScript provides a Create and
CreateRemote method to
// create instances of the default interface _KfxReleaseSetupScript
exposed by
// the CoClass KfxReleaseSetupScript. The functions are intended to be
used by
// clients wishing to automate the CoClass objects exposed by
the
// server of this
typelibrary.
//
*********************************************************************//
CoKfxReleaseSetupScript = class
class function Create: _KfxReleaseSetupScript;
class function CreateRemote(const MachineName: string):
_KfxReleaseSetupScript;
end;


//
*********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TKfxReleaseSetupScript
// Help String :
// Default Interface: _KfxReleaseSetupScript
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
//
*********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TKfxReleaseSetupScriptProperties= class;
{$ENDIF}
TKfxReleaseSetupScript = class(TOleServer)
private
FIntf: _KfxReleaseSetupScript;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TKfxReleaseSetupScriptProperties;
function GetServerProperties:
TKfxReleaseSetupScriptProperties;
{$ENDIF}
function GetDefaultInterface: _KfxReleaseSetupScript;
protected
procedure InitServerData; override;
function Get_SetupData: IReleaseSetupData;
procedure _Set_SetupData(const SetupData: IReleaseSetupData);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: _KfxReleaseSetupScript);
procedure Disconnect; override;
function CloseScript: KfxReturnValue;
function ActionEvent(var intActionID: KfxActionValue; var
strData1: WideString;
var strData2: WideString): KfxReturnValue;
function OpenScript: KfxReturnValue;
function RunUI: KfxReturnValue;
property DefaultInterface: _KfxReleaseSetupScript read
GetDefaultInterface;
property SetupData: IReleaseSetupData read Get_SetupData write
_Set_SetupData;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TKfxReleaseSetupScriptProperties read
GetServerProperties;
{$ENDIF}
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
//
*********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TKfxReleaseSetupScript
// (This object is used by the IDE's Property Inspector to allow
editing
// of the properties of this server)
//
*********************************************************************//
TKfxReleaseSetupScriptProperties = class(TPersistent)
private
FServer: TKfxReleaseSetupScript;
function GetDefaultInterface: _KfxReleaseSetupScript;
constructor Create(AServer: TKfxReleaseSetupScript);
protected
function Get_SetupData: IReleaseSetupData;
procedure _Set_SetupData(const SetupData: IReleaseSetupData);
public
property DefaultInterface: _KfxReleaseSetupScript read
GetDefaultInterface;
published
end;
{$ENDIF}


//
*********************************************************************//
// The Class CoKfxReleaseScript provides a Create and CreateRemote
method to
// create instances of the default interface _KfxReleaseScript exposed
by
// the CoClass KfxReleaseScript. The functions are intended to be used
by
// clients wishing to automate the CoClass objects exposed by
the
// server of this
typelibrary.
//
*********************************************************************//
CoKfxReleaseScript = class
class function Create: _KfxReleaseScript;
class function CreateRemote(const MachineName: string):
_KfxReleaseScript;
end;


//
*********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TKfxReleaseScript
// Help String :
// Default Interface: _KfxReleaseScript
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
//
*********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TKfxReleaseScriptProperties= class;
{$ENDIF}
TKfxReleaseScript = class(TOleServer)
private
FIntf: _KfxReleaseScript;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TKfxReleaseScriptProperties;
function GetServerProperties: TKfxReleaseScriptProperties;
{$ENDIF}
function GetDefaultInterface: _KfxReleaseScript;
protected
procedure InitServerData; override;
function Get_DocumentData: IReleaseData;
procedure _Set_DocumentData(const DocumentData: IReleaseData);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: _KfxReleaseScript);
procedure Disconnect; override;
function CloseScript: KfxReturnValue;
function OpenScript: KfxReturnValue;
function ReleaseDoc: KfxReturnValue;
function PadFileName(const strFileName: WideString): WideString;
property DefaultInterface: _KfxReleaseScript read
GetDefaultInterface;
property DocumentData: IReleaseData read Get_DocumentData write
_Set_DocumentData;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TKfxReleaseScriptProperties read
GetServerProperties;
{$ENDIF}
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
//
*********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TKfxReleaseScript
// (This object is used by the IDE's Property Inspector to allow
editing
// of the properties of this server)
//
*********************************************************************//
TKfxReleaseScriptProperties = class(TPersistent)
private
FServer: TKfxReleaseScript;
function GetDefaultInterface: _KfxReleaseScript;
constructor Create(AServer: TKfxReleaseScript);
protected
function Get_DocumentData: IReleaseData;
procedure _Set_DocumentData(const DocumentData: IReleaseData);
public
property DefaultInterface: _KfxReleaseScript read
GetDefaultInterface;
published
end;
{$ENDIF}


//
*********************************************************************//
// The Class CoKfxLink provides a Create and CreateRemote method
to
// create instances of the default interface _KfxLink exposed
by
// the CoClass KfxLink. The functions are intended to be used
by
// clients wishing to automate the CoClass objects exposed by
the
// server of this
typelibrary.
//
*********************************************************************//
CoKfxLink = class
class function Create: _KfxLink;
class function CreateRemote(const MachineName: string): _KfxLink;
end;


//
*********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TKfxLink
// Help String :
// Default Interface: _KfxLink
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
//
*********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TKfxLinkProperties= class;
{$ENDIF}
TKfxLink = class(TOleServer)
private
FIntf: _KfxLink;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TKfxLinkProperties;
function GetServerProperties: TKfxLinkProperties;
{$ENDIF}
function GetDefaultInterface: _KfxLink;
protected
procedure InitServerData; override;
function Get_Destination: WideString;
procedure Set_Destination(const Destination: WideString);
function Get_SourceType: Integer;
procedure Set_SourceType(SourceType: Integer);
function Get_Source: WideString;
procedure Set_Source(const Source: WideString);
function Get_Caption: WideString;
procedure Set_Caption(const Caption: WideString);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: _KfxLink);
procedure Disconnect; override;
property DefaultInterface: _KfxLink read GetDefaultInterface;
property Destination: WideString read Get_Destination write
Set_Destination;
property SourceType: Integer read Get_SourceType write
Set_SourceType;
property Source: WideString read Get_Source write Set_Source;
property Caption: WideString read Get_Caption write Set_Caption;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TKfxLinkProperties read GetServerProperties;
{$ENDIF}
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
//
*********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TKfxLink
// (This object is used by the IDE's Property Inspector to allow
editing
// of the properties of this server)
//
*********************************************************************//
TKfxLinkProperties = class(TPersistent)
private
FServer: TKfxLink;
function GetDefaultInterface: _KfxLink;
constructor Create(AServer: TKfxLink);
protected
function Get_Destination: WideString;
procedure Set_Destination(const Destination: WideString);
function Get_SourceType: Integer;
procedure Set_SourceType(SourceType: Integer);
function Get_Source: WideString;
procedure Set_Source(const Source: WideString);
function Get_Caption: WideString;
procedure Set_Caption(const Caption: WideString);
public
property DefaultInterface: _KfxLink read GetDefaultInterface;
published
property Destination: WideString read Get_Destination write
Set_Destination;
property SourceType: Integer read Get_SourceType write
Set_SourceType;
property Source: WideString read Get_Source write Set_Source;
property Caption: WideString read Get_Caption write Set_Caption;
end;
{$ENDIF}


//
*********************************************************************//
// The Class CoImageName provides a Create and CreateRemote method
to
// create instances of the default interface _ImageName exposed
by
// the CoClass ImageName. The functions are intended to be used
by
// clients wishing to automate the CoClass objects exposed by
the
// server of this
typelibrary.
//
*********************************************************************//
CoImageName = class
class function Create: _ImageName;
class function CreateRemote(const MachineName: string):
_ImageName;
end;


//
*********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TImageName
// Help String :
// Default Interface: _ImageName
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
//
*********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TImageNameProperties= class;
{$ENDIF}
TImageName = class(TOleServer)
private
FIntf: _ImageName;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TImageNameProperties;
function GetServerProperties: TImageNameProperties;
{$ENDIF}
function GetDefaultInterface: _ImageName;
protected
procedure InitServerData; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: _ImageName);
procedure Disconnect; override;
procedure RenameOutputFile(var strSrcName: WideString; var
strFinalName: WideString);
procedure RenameOutputDirectory(var strSrcName: WideString; var
strFinalName: WideString);
function CalculateFileName(var eNameOption: ImageFilenameOption;
var strIndexFieldValue: WideString):
WideString;
function GetTifExtension: WideString;
function GetOCRExtension: WideString;
function CalculateExtensions(var bReleaseImageFiles: WordBool;
var bReleaseOCRFullText: WordBool;
var bReleaseKofaxPDF: WordBool;
var bReleaseOCRToImageDir: WordBool):
_Collection;
function GetIncludesSubfolder: WordBool;
function IsSinglePageImage: WordBool;
function ReserveImageNames(var strReleaseDir: WideString; var
strFileName: WideString;
var eDuplicateNames:
DuplicateNameHandling; var oExtList: _Collection): WordBool;
procedure RemoveReserveFiles;
procedure RemoveEmptyReservedFiles;
procedure CalculateReleaseSettings(var bReleaseOCRToImageDir:
WordBool;
var eNameOption:
ImageFilenameOption;
var eDuplicateNames:
DuplicateNameHandling;
var strFinalRelDir:
WideString;
var strIndexOptionName:
WideString);
property DefaultInterface: _ImageName read GetDefaultInterface;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TImageNameProperties read GetServerProperties;
{$ENDIF}
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
//
*********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TImageName
// (This object is used by the IDE's Property Inspector to allow
editing
// of the properties of this server)
//
*********************************************************************//
TImageNameProperties = class(TPersistent)
private
FServer: TImageName;
function GetDefaultInterface: _ImageName;
constructor Create(AServer: TImageName);
protected
public
property DefaultInterface: _ImageName read GetDefaultInterface;
published
end;
{$ENDIF}


//
*********************************************************************//
// The Class CoImageNameSetup provides a Create and CreateRemote
method to
// create instances of the default interface _ImageNameSetup exposed
by
// the CoClass ImageNameSetup. The functions are intended to be used
by
// clients wishing to automate the CoClass objects exposed by
the
// server of this
typelibrary.
//
*********************************************************************//
CoImageNameSetup = class
class function Create: _ImageNameSetup;
class function CreateRemote(const MachineName: string):
_ImageNameSetup;
end;


//
*********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TImageNameSetup
// Help String :
// Default Interface: _ImageNameSetup
// Def. Intf. DISP? : No
// Event Interface:
// TypeFlags : (2) CanCreate
//
*********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TImageNameSetupProperties= class;
{$ENDIF}
TImageNameSetup = class(TOleServer)
private
FIntf: _ImageNameSetup;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TImageNameSetupProperties;
function GetServerProperties: TImageNameSetupProperties;
{$ENDIF}
function GetDefaultInterface: _ImageNameSetup;
protected
procedure InitServerData; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: _ImageNameSetup);
procedure Disconnect; override;
procedure ProcessFolderMenu(var strSource: WideString);
function GetLinksSourceValue(var eSourceType: KfxLinkSourceType;
var strValue: WideString): WideString;
function CheckForPDFConflict(const oSetupData: IReleaseSetupData):
WordBool;
property DefaultInterface: _ImageNameSetup read
GetDefaultInterface;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TImageNameSetupProperties read
GetServerProperties;
{$ENDIF}
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
//
*********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TImageNameSetup
// (This object is used by the IDE's Property Inspector to allow
editing
// of the properties of this server)
//
*********************************************************************//
TImageNameSetupProperties = class(TPersistent)
private
FServer: TImageNameSetup;
function GetDefaultInterface: _ImageNameSetup;
constructor Create(AServer: TImageNameSetup);
protected
public
property DefaultInterface: _ImageNameSetup read
GetDefaultInterface;
published
end;
{$ENDIF}


procedure Register;

resourcestring
dtlServerPage = 'Laserfiche';

dtlOcxPage = 'Laserfiche';

implementation

uses ComObj;

class function CoKfxReleaseSetupScript.Create: _KfxReleaseSetupScript;
begin
Result := CreateComObject(CLASS_KfxReleaseSetupScript) as
_KfxReleaseSetupScript;
end;

class function CoKfxReleaseSetupScript.CreateRemote(const MachineName:
string): _KfxReleaseSetupScript;
begin
Result := CreateRemoteComObject(MachineName,
CLASS_KfxReleaseSetupScript) as _KfxReleaseSetupScript;
end;

procedure TKfxReleaseSetupScript.InitServerData;
const
CServerData: TServerData = (
ClassID: '{C53D99A8-59C4-431F-BFB8-CA06D6DD42C6}';
IntfIID: '{5A05FAC6-BFAE-4AA5-ABD3-24D99861E923}';
EventIID: '';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;

procedure TKfxReleaseSetupScript.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf:= punk as _KfxReleaseSetupScript;
end;
end;

procedure TKfxReleaseSetupScript.ConnectTo(svrIntf:
_KfxReleaseSetupScript);
begin
Disconnect;
FIntf := svrIntf;
end;

procedure TKfxReleaseSetupScript.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;

function TKfxReleaseSetupScript.GetDefaultInterface:
_KfxReleaseSetupScript;
begin
if FIntf = nil then
Connect;
Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not
connected to Server. You must call ''Connect'' or ''ConnectTo'' before
this operation');
Result := FIntf;
end;

constructor TKfxReleaseSetupScript.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TKfxReleaseSetupScriptProperties.Create(Self);
{$ENDIF}
end;

destructor TKfxReleaseSetupScript.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TKfxReleaseSetupScript.GetServerProperties:
TKfxReleaseSetupScriptProperties;
begin
Result := FProps;
end;
{$ENDIF}

function TKfxReleaseSetupScript.Get_SetupData: IReleaseSetupData;
begin
Result := DefaultInterface.SetupData;
end;

procedure TKfxReleaseSetupScript._Set_SetupData(const SetupData:
IReleaseSetupData);
{ Warning: The property SetupData has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.SetupData := SetupData;
end;

function TKfxReleaseSetupScript.CloseScript: KfxReturnValue;
begin
Result := DefaultInterface.CloseScript;
end;

function TKfxReleaseSetupScript.ActionEvent(var intActionID:
KfxActionValue;
var strData1: WideString;
var strData2: WideString): KfxReturnValue;
begin
Result := DefaultInterface.ActionEvent(intActionID, strData1,
strData2);
end;

function TKfxReleaseSetupScript.OpenScript: KfxReturnValue;
begin
Result := DefaultInterface.OpenScript;
end;

function TKfxReleaseSetupScript.RunUI: KfxReturnValue;
begin
Result := DefaultInterface.RunUI;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TKfxReleaseSetupScriptProperties.Create(AServer:
TKfxReleaseSetupScript);
begin
inherited Create;
FServer := AServer;
end;

function TKfxReleaseSetupScriptProperties.GetDefaultInterface:
_KfxReleaseSetupScript;
begin
Result := FServer.DefaultInterface;
end;

function TKfxReleaseSetupScriptProperties.Get_SetupData:
IReleaseSetupData;
begin
Result := DefaultInterface.SetupData;
end;

procedure TKfxReleaseSetupScriptProperties._Set_SetupData(const
SetupData: IReleaseSetupData);
{ Warning: The property SetupData has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.SetupData := SetupData;
end;

{$ENDIF}

class function CoKfxReleaseScript.Create: _KfxReleaseScript;
begin
Result := CreateComObject(CLASS_KfxReleaseScript) as
_KfxReleaseScript;
end;

class function CoKfxReleaseScript.CreateRemote(const MachineName:
string): _KfxReleaseScript;
begin
Result := CreateRemoteComObject(MachineName, CLASS_KfxReleaseScript)
as _KfxReleaseScript;
end;

procedure TKfxReleaseScript.InitServerData;
const
CServerData: TServerData = (
ClassID: '{7D4863D2-AE52-456D-9AF0-6506789010BF}';
IntfIID: '{5B1F6F00-EBA7-40A8-A2E2-005CD2B8C37D}';
EventIID: '';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;

procedure TKfxReleaseScript.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf:= punk as _KfxReleaseScript;
end;
end;

procedure TKfxReleaseScript.ConnectTo(svrIntf: _KfxReleaseScript);
begin
Disconnect;
FIntf := svrIntf;
end;

procedure TKfxReleaseScript.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;

function TKfxReleaseScript.GetDefaultInterface: _KfxReleaseScript;
begin
if FIntf = nil then
Connect;
Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not
connected to Server. You must call ''Connect'' or ''ConnectTo'' before
this operation');
Result := FIntf;
end;

constructor TKfxReleaseScript.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TKfxReleaseScriptProperties.Create(Self);
{$ENDIF}
end;

destructor TKfxReleaseScript.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TKfxReleaseScript.GetServerProperties:
TKfxReleaseScriptProperties;
begin
Result := FProps;
end;
{$ENDIF}

function TKfxReleaseScript.Get_DocumentData: IReleaseData;
begin
Result := DefaultInterface.DocumentData;
end;

procedure TKfxReleaseScript._Set_DocumentData(const DocumentData:
IReleaseData);
{ Warning: The property DocumentData has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.DocumentData := DocumentData;
end;

function TKfxReleaseScript.CloseScript: KfxReturnValue;
begin
Result := DefaultInterface.CloseScript;
end;

function TKfxReleaseScript.OpenScript: KfxReturnValue;
begin
Result := DefaultInterface.OpenScript;
end;

function TKfxReleaseScript.ReleaseDoc: KfxReturnValue;
begin
Result := DefaultInterface.ReleaseDoc;
end;

function TKfxReleaseScript.PadFileName(const strFileName: WideString):
WideString;
begin
Result := DefaultInterface.PadFileName(strFileName);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TKfxReleaseScriptProperties.Create(AServer:
TKfxReleaseScript);
begin
inherited Create;
FServer := AServer;
end;

function TKfxReleaseScriptProperties.GetDefaultInterface:
_KfxReleaseScript;
begin
Result := FServer.DefaultInterface;
end;

function TKfxReleaseScriptProperties.Get_DocumentData: IReleaseData;
begin
Result := DefaultInterface.DocumentData;
end;

procedure TKfxReleaseScriptProperties._Set_DocumentData(const
DocumentData: IReleaseData);
{ Warning: The property DocumentData has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.DocumentData := DocumentData;
end;

{$ENDIF}

class function CoKfxLink.Create: _KfxLink;
begin
Result := CreateComObject(CLASS_KfxLink) as _KfxLink;
end;

class function CoKfxLink.CreateRemote(const MachineName: string):
_KfxLink;
begin
Result := CreateRemoteComObject(MachineName, CLASS_KfxLink) as
_KfxLink;
end;

procedure TKfxLink.InitServerData;
const
CServerData: TServerData = (
ClassID: '{F307EECF-78FE-4FF5-AEE7-4444817347EF}';
IntfIID: '{B67DE8F4-7C18-4900-A534-13694BB5286E}';
EventIID: '';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;

procedure TKfxLink.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf:= punk as _KfxLink;
end;
end;

procedure TKfxLink.ConnectTo(svrIntf: _KfxLink);
begin
Disconnect;
FIntf := svrIntf;
end;

procedure TKfxLink.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;

function TKfxLink.GetDefaultInterface: _KfxLink;
begin
if FIntf = nil then
Connect;
Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not
connected to Server. You must call ''Connect'' or ''ConnectTo'' before
this operation');
Result := FIntf;
end;

constructor TKfxLink.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TKfxLinkProperties.Create(Self);
{$ENDIF}
end;

destructor TKfxLink.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TKfxLink.GetServerProperties: TKfxLinkProperties;
begin
Result := FProps;
end;
{$ENDIF}

function TKfxLink.Get_Destination: WideString;
begin
Result := DefaultInterface.Destination;
end;

procedure TKfxLink.Set_Destination(const Destination: WideString);
{ Warning: The property Destination has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.Destination := Destination;
end;

function TKfxLink.Get_SourceType: Integer;
begin
Result := DefaultInterface.SourceType;
end;

procedure TKfxLink.Set_SourceType(SourceType: Integer);
begin
DefaultInterface.Set_SourceType(SourceType);
end;

function TKfxLink.Get_Source: WideString;
begin
Result := DefaultInterface.Source;
end;

procedure TKfxLink.Set_Source(const Source: WideString);
{ Warning: The property Source has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.Source := Source;
end;

function TKfxLink.Get_Caption: WideString;
begin
Result := DefaultInterface.Caption;
end;

procedure TKfxLink.Set_Caption(const Caption: WideString);
{ Warning: The property Caption has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.Caption := Caption;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TKfxLinkProperties.Create(AServer: TKfxLink);
begin
inherited Create;
FServer := AServer;
end;

function TKfxLinkProperties.GetDefaultInterface: _KfxLink;
begin
Result := FServer.DefaultInterface;
end;

function TKfxLinkProperties.Get_Destination: WideString;
begin
Result := DefaultInterface.Destination;
end;

procedure TKfxLinkProperties.Set_Destination(const Destination:
WideString);
{ Warning: The property Destination has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.Destination := Destination;
end;

function TKfxLinkProperties.Get_SourceType: Integer;
begin
Result := DefaultInterface.SourceType;
end;

procedure TKfxLinkProperties.Set_SourceType(SourceType: Integer);
begin
DefaultInterface.Set_SourceType(SourceType);
end;

function TKfxLinkProperties.Get_Source: WideString;
begin
Result := DefaultInterface.Source;
end;

procedure TKfxLinkProperties.Set_Source(const Source: WideString);
{ Warning: The property Source has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.Source := Source;
end;

function TKfxLinkProperties.Get_Caption: WideString;
begin
Result := DefaultInterface.Caption;
end;

procedure TKfxLinkProperties.Set_Caption(const Caption: WideString);
{ Warning: The property Caption has a setter and a getter whose
types do not match. Delphi was unable to generate a property of
this sort and so is using a Variant as a passthrough. }
var
InterfaceVariant: OleVariant;
begin
InterfaceVariant := DefaultInterface;
InterfaceVariant.Caption := Caption;
end;

{$ENDIF}

class function CoImageName.Create: _ImageName;
begin
Result := CreateComObject(CLASS_ImageName) as _ImageName;
end;

class function CoImageName.CreateRemote(const MachineName: string):
_ImageName;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ImageName) as
_ImageName;
end;

procedure TImageName.InitServerData;
const
CServerData: TServerData = (
ClassID: '{6016FB14-4447-4710-AFBD-E61BDC79279F}';
IntfIID: '{187313BE-E9F3-4D04-965A-2EA3F3018953}';
EventIID: '';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;

procedure TImageName.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf:= punk as _ImageName;
end;
end;

procedure TImageName.ConnectTo(svrIntf: _ImageName);
begin
Disconnect;
FIntf := svrIntf;
end;

procedure TImageName.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;

function TImageName.GetDefaultInterface: _ImageName;
begin
if FIntf = nil then
Connect;
Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not
connected to Server. You must call ''Connect'' or ''ConnectTo'' before
this operation');
Result := FIntf;
end;

constructor TImageName.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TImageNameProperties.Create(Self);
{$ENDIF}
end;

destructor TImageName.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TImageName.GetServerProperties: TImageNameProperties;
begin
Result := FProps;
end;
{$ENDIF}

procedure TImageName.RenameOutputFile(var strSrcName: WideString; var
strFinalName: WideString);
begin
DefaultInterface.RenameOutputFile(strSrcName, strFinalName);
end;

procedure TImageName.RenameOutputDirectory(var strSrcName: WideString;
var strFinalName: WideString);
begin
DefaultInterface.RenameOutputDirectory(strSrcName, strFinalName);
end;

function TImageName.CalculateFileName(var eNameOption:
ImageFilenameOption;
var strIndexFieldValue:
WideString): WideString;
begin
Result := DefaultInterface.CalculateFileName(eNameOption,
strIndexFieldValue);
end;

function TImageName.GetTifExtension: WideString;
begin
Result := DefaultInterface.GetTifExtension;
end;

function TImageName.GetOCRExtension: WideString;
begin
Result := DefaultInterface.GetOCRExtension;
end;

function TImageName.CalculateExtensions(var bReleaseImageFiles:
WordBool;
var bReleaseOCRFullText:
WordBool;
var bReleaseKofaxPDF:
WordBool;
var bReleaseOCRToImageDir:
WordBool): _Collection;
begin
Result := DefaultInterface.CalculateExtensions(bReleaseImageFiles,
bReleaseOCRFullText,
bReleaseKofaxPDF,
bReleaseOCRToImageDir);
end;

function TImageName.GetIncludesSubfolder: WordBool;
begin
Result := DefaultInterface.GetIncludesSubfolder;
end;

function TImageName.IsSinglePageImage: WordBool;
begin
Result := DefaultInterface.IsSinglePageImage;
end;

function TImageName.ReserveImageNames(var strReleaseDir: WideString;
var strFileName: WideString;
var eDuplicateNames:
DuplicateNameHandling;
var oExtList: _Collection):
WordBool;
begin
Result := DefaultInterface.ReserveImageNames(strReleaseDir,
strFileName, eDuplicateNames, oExtList);
end;

procedure TImageName.RemoveReserveFiles;
begin
DefaultInterface.RemoveReserveFiles;
end;

procedure TImageName.RemoveEmptyReservedFiles;
begin
DefaultInterface.RemoveEmptyReservedFiles;
end;

procedure TImageName.CalculateReleaseSettings(var
bReleaseOCRToImageDir: WordBool;
var eNameOption:
ImageFilenameOption;
var eDuplicateNames:
DuplicateNameHandling;
var strFinalRelDir:
WideString;
var strIndexOptionName:
WideString);
begin
DefaultInterface.CalculateReleaseSettings(bReleaseOCRToImageDir,
eNameOption, eDuplicateNames,
strFinalRelDir,
strIndexOptionName);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TImageNameProperties.Create(AServer: TImageName);
begin
inherited Create;
FServer := AServer;
end;

function TImageNameProperties.GetDefaultInterface: _ImageName;
begin
Result := FServer.DefaultInterface;
end;

{$ENDIF}

class function CoImageNameSetup.Create: _ImageNameSetup;
begin
Result := CreateComObject(CLASS_ImageNameSetup) as _ImageNameSetup;
end;

class function CoImageNameSetup.CreateRemote(const MachineName:
string): _ImageNameSetup;
begin
Result := CreateRemoteComObject(MachineName, CLASS_ImageNameSetup)
as _ImageNameSetup;
end;

procedure TImageNameSetup.InitServerData;
const
CServerData: TServerData = (
ClassID: '{33ECF8D7-1F1F-453F-B528-52F1F802357D}';
IntfIID: '{68FB848C-E315-4E3D-9ED7-6E7FCD08D35D}';
EventIID: '';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;

procedure TImageNameSetup.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf:= punk as _ImageNameSetup;
end;
end;

procedure TImageNameSetup.ConnectTo(svrIntf: _ImageNameSetup);
begin
Disconnect;
FIntf := svrIntf;
end;

procedure TImageNameSetup.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;

function TImageNameSetup.GetDefaultInterface: _ImageNameSetup;
begin
if FIntf = nil then
Connect;
Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not
connected to Server. You must call ''Connect'' or ''ConnectTo'' before
this operation');
Result := FIntf;
end;

constructor TImageNameSetup.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TImageNameSetupProperties.Create(Self);
{$ENDIF}
end;

destructor TImageNameSetup.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TImageNameSetup.GetServerProperties:
TImageNameSetupProperties;
begin
Result := FProps;
end;
{$ENDIF}

procedure TImageNameSetup.ProcessFolderMenu(var strSource:
WideString);
begin
DefaultInterface.ProcessFolderMenu(strSource);
end;

function TImageNameSetup.GetLinksSourceValue(var eSourceType:
KfxLinkSourceType;
var strValue:
WideString): WideString;
begin
Result := DefaultInterface.GetLinksSourceValue(eSourceType,
strValue);
end;

function TImageNameSetup.CheckForPDFConflict(const oSetupData:
IReleaseSetupData): WordBool;
begin
Result := DefaultInterface.CheckForPDFConflict(oSetupData);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TImageNameSetupProperties.Create(AServer:
TImageNameSetup);
begin
inherited Create;
FServer := AServer;
end;

function TImageNameSetupProperties.GetDefaultInterface:
_ImageNameSetup;
begin
Result := FServer.DefaultInterface;
end;

{$ENDIF}

procedure Register;
begin
RegisterComponents(dtlServerPage, [TKfxReleaseSetupScript,
TKfxReleaseScript, TKfxLink, TImageName,
TImageNameSetup]);
end;

end.

//
#########################################################################################
// TextRel_TLB.pas (The original unit created to interface with an
existing release script/dll like I'm trying to make)
//
#########################################################################################

0 new messages