File Viewer Software Developers Kit (SDK)

EVSDK Quick Start Guide

EVSDK will receive and display a data file or a data stream.

EVSDK OCX

For the EVSDK OCX create the type library. This is usually done by importing the EVSDK ActiveX control into your development studio.

EVSDK DLL

The EVSDK DLL needs to be loaded into your application. This is done calling LoadLibrary (or similar language specific function).

To destroy EVSDK DLL, Call FreeLibrary (or similar language specific function).

The exported functions from the EVSDK DLL can be found in Table 1 below.

Table 1: Exported Functions from EVSDK DLL

Exported Function
Description
Usage
Login After loading the library, Login to activate the registration in order to preview data files. login(widestring Name, widestring Key)
SetRegKey Set the Registry Location for EVSDK to save its settings. If not defined, a default registry key will be used. (default HKCU\Software\Getdata\SDKDLL\) setregkey('Software\Getdata\SDKDLL')
CreatePreview Creates the Preview window. To dock to a Parent Window pass in the Window Handle createpreview(HWND)
PreviewParent A Parent Window can also be set after the Preview Window is created previewparent(HWND)
ClosePreviewFile Closes the currently display file or stream. closepreviewfile
DestroyPreview Destroy the Preview window. This needs to be called before Freeing the EVSDK DLL destroypreview
LoadPreviewFile Loads a File to preview and displays it within the preview window. loadpreviewfile(widestring filename)
LoadPreviewStream Loads a Stream to preview and displays it within the preview window. loadpreviewstream(pointer buffer, longword size)
LoadPreview Activates the loading of large streams. Two callback functions are required to be established using SetEventFunction. One to read the stream and the second to get the stream size. loadpreview
ie: seteventfunction(ACT_READ,(LONG) &ReadData)
seteventfunction(ACT_SIZE,(LONG) &GetSize)
ShowPreviewAction Displays the tool bar or tool bar buttons. The tool bar and tool bar buttons are assigned constants which can be found in SDKConst.inc. They have the prefix of ACT_. ShowPreviewAction can also return the status of each action.
-1 = action status
0 = hide action
1 = show action
showpreviewaction(smallint action, smallint visiblity)
DoPreviewAction Calls a Preview Action ie: Copy, Print, Show AboutBox dopreviewaction(smallint action)
PreviewActionState Queries the State of a Preview Action ie: Print Enabled, Copy Enabled previewactionstate(smallint action) : bool
SetEventFunction Used to replace explorer view events ie: to display a custom AboutBox seteventfunction(smallint action, pointer function)
SetConfigOptions Used to set EVSDK options ie: Hints On, Auto-Play Video.
The value passed is in a string ie: “True”. Each configuration item is assigned to a constant in SDKConst.inc with prefix OP
setconfigoption(smallint option, widestring value
GetConfigOptions Used to get an EVSDK options current value ie: Hints = True/False(Show/Hide). The return value is a string getconfigoptions(smallint option, widestring returnvalue)
LoadConfigOptions LoadConfigOptions needs to be called after changes are made using SetConfigOptions. This calls a refresh of all the options within the EVSDK loadconfigoptions

The Examples

There are a number of example applications that come with EVSDK. They include the source and are in there respective folders.

  • CPP: ActiveX and DLL
  • Delphi: DLL
  • Visual Basic: ActiveX
  • Java: ActiveX

Deployment

The following files need to be include when deploying the final application:

  • jbig2dec.dll