Viewing uses initialization information for its internal operations, for example, to determine which components to load. You can store this information either in an initialization file or in the Windows registry.
The initialization file is called kvsdk.ini
and is stored in the Windows system directory.
The file used to define registry settings is called install.reg.txt
and is stored in the install
\redist
directory, where install
is the directory in which you installed Viewing SDK.
You must customize the information in one of these files and specify in your application where the information is located.
If you are using the initialization file (kvsdk.ini
) to set initialization information, you must modify the file to reflect your company name and application name. The sample programs demonstrate how to use an initialization file.
kvsdk.ini
file (install.ini
) is stored in the install
\redist
directory, where install
is the directory in which you installed Viewing SDK. This file is not required for redistribution and is for reference only.To specify an initialization file using the Viewing API
Create the TPVAPICreateParams structure. Set uProfileType
to PROFILEDF_USE_INI
, and lpszIniFileName
to the location of the initialization file.
For example:
memset (&CreateParams, 0, sizeof(TPVAPICreateParams)); if (bUseIni) { CreateParams.uProfileType = PROFILEDF_USE_INI; CreateParams.lpszIniFileName = szIniFileName; } else { CreateParams.uProfileType = PROFILEDF_USE_REG; CreateParams.lpszRegistryName = REGISTRY_NAME_ASCII; }
Create the VAPI window by using the standard Windows API functions CreateWindow()
or CreateWindowEx()
.
To specify an initialization file by using the ActiveX control
Set the RegIniMode property to 1
.
Set the RegIniName property to the path and name of the initialization file. For example, kvsdk.ini
or c:\myprogram\myini.ini
. By default, Viewing looks for the initialization file in the Windows system directory.
For example:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AxKEYview1.RegIniMode = 1 AxKEYview1.RegIniName = "c:\windows\kvsdk.ini" AxKEYview1.Open("c:\test.doc") End Sub
If you are using the Windows registry to set initialization information, you must modify the registry file (install.reg.txt
) to reflect your company name and application name. The file has a .txt
extension for easy editing and viewing. After you have finished editing the file, remove the .txt
extension. When your application is installed, import the install.reg
file into the Windows Registry.
To specify the Windows registry by using the Viewing API
Create the TPVAPICreateParams structure. Set uProfileType
to PROFILEDF_USE_REG
, and lpszRegistryName
to the location of the initialization file.
For example:
memset (&CreateParams, 0, sizeof(TPVAPICreateParams)); if (bUseRegistry) { CreateParams.uProfileType = PROFILEDF_USE_REG; CreateParams.lpszRegistryName = REGISTRY_NAME_ASCII; } else { CreateParams.uProfileType = PROFILEDF_USE_INI; CreateParams.lpszIniFileName = szIniFileName; }
Create the VAPI window by using the standard Windows API functions CreateWindow()
or CreateWindowEx()
.
To specify the Windows registry by using the ActiveX control
Set the RegIniMode property to 2
.
Set the RegIniName property to the registry key under HKEY_LOCAL_MACHINE\Software
where the Viewing initialization information resides. For example, YourCompany\YourProduct
.
For example:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AxKEYview1.RegIniMode = 2 AxKEYview1.RegIniName = "Autonomy\keyview" AxKEYview1.Open("c:\test.doc") End Sub
To remove Viewing functionality from your application
Do not redistribute the Dynamic Link Library (DLL) associated with the component you want to remove.
lists the files that you can redistribute with your application. It also shows the Dynamic Link Library (DLL) associated with each component.
In the kvsdk.ini
file or the install.reg.txt
file, remove references to the component that you want to remove.
For example, to remove support for Windows Animated Cursor, remove the line that references "Windows Animated Cursor" from the registry or initialization file, and do not redistribute the Windows Animated Cursor reader (kpanirdr.dll
).
The following is a summary of files required based on functionality:
Copy to clipboard—The following files are required for copy to clipboard functionality:
rtfcnv.dll
, txtcnv.dll
(for word processor formats)
rtfss.dll
(for spreadsheet formats)
kpifutil.dll
(for picture formats)
SaveAs to RTF—The following files are required for SaveAs to RTF functionality:
kvcnv.dll
rtfcnv.dll
(for word processor formats)
rtfss.dll
(for spreadsheet formats)
kpifutil.dll
(for picture formats)
|