GetDriverLong

Declaration

Delphi

function GetDriverLong(Key: Cardinal): Cardinal;

C/C++

SOPAD_API DWORD SOPAD_GetDriverLong(DWORD dwKey);

ActiveX

HRESULT GetDriverLong([in] long Key, [out, retval] long* Value);

Description

This function returns numerical values.

Arguments

Key

Numerical value, must be equal to one of possible values from the table (see below).

Value

Numerical value which corresponds to the Key.

Possible combinations of key and value

Possible combinations of key and value are listed int the table.

KeyValue
0Driver options 1
1Driver options 2
5Time in milliseconds after which OnSignFinished or OnSignFinishedEx is fired
6Maximum number of tries that FastGetDeviceSettings procedure performs
10Value of parameter passed to OnBigButtonEx handler
11Value of parameter passed to OnSmallButtonEx handler
12Value of parameter passed to OnSignFinishedEx handler
14Minimum possible value of sensor coordinate X (MinX)
15Minimum possible value of sensor coordinate Y (MinY)
16Maximum possible value of sensor coordinate X (MaxX)
17Maximum possible value of sensor coordinate Y (MaxY)
18Sensor resolution by horizontal axis (HorizDPI)
19Sensor resolution by vertical axis (VertDPI)
20Logical width of device's LCD
21Logical height of device's LCD
23

Get saved Rotation setting

0: 0 degrees (normal orientation)

1: 180 degrees (switched orientation)

2: 90 degrees (portrait mode, only Gen13ff)

3: 270 degrees (portrait mode in left handed mode, only Gen13)

25

Queries device, returns display orientation in degrees, only possible values are 0 and 180. Portrait mode is not distingushable.

use GetDriverLong(23) instead.

260: Driver obtains TabeltPC rotation angle from hardware
non-zero: Driver overrides TabletPC rotation angle
27Value of overridden TabletPC rotation angle (in combination with key=26)
28Window handle (HWND) of the window which is disabled when device configuration dialog is shown (in combination with key=29)
290: device configuration dialog doesn't affect other windows
non-zero: when device configuration dialog is shown, window which handle was passed with key=28 is disabled 
30

returns device status;   determine if  signature pad is locked. 

0 : unlocked

1 : locked

31Color of signature line (B-G-R)
32

0: signature image transmission is not finished
1: signature image transmission is complete 

NOT IMPLEMENTED

33Number of points in smoothed bitmap data or 0 if signature is not smoothed
34VersionMS
35VersionLS
36Address of OnDeviceButton handler
37Value of parameter passed to OnDeviceButton or OnDeviceButtonCallback handler
39

Size of signature image

High WORD: Width
Low WORD: Height

40Handle of background bitmap
41Queries device, returns free memory size (RAM)
42

Queries device, returns Device status.  this returns a pointer to an internal structure

struct TPadState{

            public bool IsValid;

           public int PadLocked;

            public int AdminKeySet;

            public int PreDocHashSet;

            public int FinalDocHashSet;

            public int AesContextSet;

            public byte Mode;

            public int Rotated;

            public int RsaSignStatus;

            public int ButtonEvent;

            public int BatteryState;

            public int RotationButtonVisible;

            public int Brightness;

            public int OpenState;

            public int UserScriptExecutionState;

            public int ConfigurationState;

            public int ErrorFlags;

        };


43

Queries device, returns pad open state

0: pad wasn't opened
1: pad was opened 

45Address of OnDeviceButtonCallback handler
46Returns width of smoothed bitmap or 0 if signature is not smoothed
47

Returns height of smoothed bitmap of 0 if signature is not smoothed

48

Return number of new (not yet retrieved) biodata frames

49

Returns sign environment mode

0: signing with device
1: signing with image 

50

return the globFrameRate;

51returns the globReceivedFrames
52

returns the globLostFrames  

53FrameColor -- (handled by OCX)
54FrameThickness -- (handled by OCX)
55return the amount of the BiodataFrames from PAD/Device
56return the DeviceUserInput; see more on function GetDeviceUserInput
58return SetSigningScreenBitmap; see more on function SetSigningScreenBitmap
59

return Device-Kind one of the following

00=dkNoDevice
01=dkStepOver
02=dkTabletPC
03=dkInterlink
04=dkWintab
05=dkTopaz
06=dkNaturaSignV1
07=dkSmartPhone (was dkWaComExternal)
08=dkMSInkTable (was dkWacomTabletPC)

09=dkNaturaSignV3

10=dkNaturaSignColour
11=dkNaturaSignColourM
12=dkNaturaSignColourM2
13=dkNaturaSignMobile
14=dkNaturaSignFlawless
15=dkNaturaSignComfort
16=dkNaturaSignClassic
17=dkNaturaSignBiometric
18=dkNaturaSignMobile15
19=dkNaturaSignColorPad2
20=dkNaturaSignUniversal
21=dkNaturaSignBrilliance

22=dkDuraSignBiometric

23=dkNaturaSignColourBiometric

24=dkNaturaSignMobileBiometric

25=dkDuraSignGen13Standard

26=dkDuraSignGen13Biometric  

60 return LCD Document Viewing Width in Pixel (excluding Button-Bar)
61return LCD Document Viewing Height in Pixel (excluding Button-Bar) 
69

read Pad Dimension Array element, Set Device Kind and Version with SetDriverLong(69, ... ).

returns a pointer to an const TPadDimensions array element, do not free, only read !

    TPadDimension = record

        Size: array[TPadDimensionValues] of Integer;

                HorizDPI: Word;

                VertDPI: Word;

                LcdWidthPhysical: Word;

                LcdHeightPhysical: Word;

                LcdWidthLogical: Word;

                LcdHeightLogical: Word;

                ImgWidthFaktor: Word;

                ImgHeightFaktor: Word; // Normal 100=1.00, 0 wird als 1.00 verwendet, außer bei dkStepOver V2-4 450=4.5: nur bei ReadHiresBitmap verwendet

                LCDDocViewWidth:word;

                LCDDocViewHeight:word;

...

        end;

70unused / reserved
71

Queries device, returns free memory size (FLASH)

72

Get device features by feature ID:  see more info here (Device Feature List)

Result:   0 = feature doesnt exist ,

              > 1 = version number

73not used
74not used
75

ATTENTION: this method changs the current mode!!!

Queries device, returns Device status.  this returns a pointer to an internal structure

struct TPadState{

  for more info read  GetDirverLong 42

}

76Get current  cryptoID index - used in CryptoID container V2
77get the DPI for the final Signature Image (default 300) - has only effect on biometric pads and for drawing the final signature image
78

get the status of the WIFI Hotspot 0:off 1:created

 - use the function SetDriverString(9, password) and SetDriverString(10, ssid) to change the options

 - use the function SetDriverLong(67, [0,1]) and SetDriverLong(68, [0,1,2,3,4]) to change the state and strategy



Sample

C#
//  Read Size of Display
 
int width = SigDev.GetDriverLong(20);
int height = SigDev.GetDriverLong(21);
 
//	Read Pad Status

struct TPadState
{
    public bool IsValid;
    public int PadLocked;
    public int AdminKeySet;
    public int PreDocHashSet;
    public int FinalDocHashSet;
    public int AesContextSet;
    public byte Mode;
    public int Rotated;
    public int RsaSignStatus;
    public int ButtonEvent;
    public int BatteryState;
	public int RotationButtonVisible;
	public int Brightness;
	public int OpenState;
	public int UserScriptExecutionState;
	public int ConfigurationState;
	public int ErrorFlags;      
};

IntPtr statePtr = (IntPtr)SigDev.GetDriverLong(42);
TPadState stateStruct = (TPadState)Marshal.PtrToStructure(statePtr, typeof(TPadState));