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.
Key | Value |
---|---|
0 | Driver options 1 |
1 | Driver options 2 |
5 | Time in milliseconds after which OnSignFinished or OnSignFinishedEx is fired |
6 | Maximum number of tries that FastGetDeviceSettings procedure performs |
10 | Value of parameter passed to OnBigButtonEx handler |
11 | Value of parameter passed to OnSmallButtonEx handler |
12 | Value of parameter passed to OnSignFinishedEx handler |
14 | Minimum possible value of sensor coordinate X (MinX) |
15 | Minimum possible value of sensor coordinate Y (MinY) |
16 | Maximum possible value of sensor coordinate X (MaxX) |
17 | Maximum possible value of sensor coordinate Y (MaxY) |
18 | Sensor resolution by horizontal axis (HorizDPI) |
19 | Sensor resolution by vertical axis (VertDPI) |
20 | Logical width of device's LCD |
21 | Logical 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. |
26 | 0: Driver obtains TabeltPC rotation angle from hardware non-zero: Driver overrides TabletPC rotation angle |
27 | Value of overridden TabletPC rotation angle (in combination with key=26) |
28 | Window handle (HWND) of the window which is disabled when device configuration dialog is shown (in combination with key=29) |
29 | 0: 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 |
31 | Color of signature line (B-G-R) |
32 | 0: signature image transmission is not finished NOT IMPLEMENTED |
33 | Number of points in smoothed bitmap data or 0 if signature is not smoothed |
34 | VersionMS |
35 | VersionLS |
36 | Address of OnDeviceButton handler |
37 | Value of parameter passed to OnDeviceButton or OnDeviceButtonCallback handler |
39 | Size of signature image High WORD: Width |
40 | Handle of background bitmap |
41 | Queries 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 |
45 | Address of OnDeviceButtonCallback handler |
46 | Returns 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 |
50 | return the globFrameRate; |
51 | returns the globReceivedFrames |
52 | returns the globLostFrames  |
53 | FrameColor --Â (handled by OCX) |
54 | FrameThickness -- (handled by OCX) |
55 | return the amount of the BiodataFrames from PAD/Device |
56 | return the DeviceUserInput; see more on function GetDeviceUserInput |
58 | return SetSigningScreenBitmap; see more on function SetSigningScreenBitmap |
59 | return Device-Kind one of the following 00=dkNoDevice 09=dkNaturaSignV3 10=dkNaturaSignColour 22=dkDuraSignBiometric 23=dkNaturaSignColourBiometric 24=dkNaturaSignMobileBiometric 25=dkDuraSignGen13Standard 26=dkDuraSignGen13Biometric  |
60 | Â return LCD Document Viewing Width in Pixel (excluding Button-Bar) |
61 | return 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; |
70 | unused / reserved |
71 | Queries device, returns free memory size (FLASH) |
72 | Get device features by feature ID:Â see more info here (Device Feature List)
        > 1 = version number |
73 | not used |
74 | not 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 } |
76 | Get current cryptoID index - used in CryptoID container V2 |
77 | get 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
// 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));