configurePad
Declaration
Delphi
function configurePad(Certificate: ShortString; ShowSimpleDialog, AutostartIfSimpleDialog, SaveToRegistry: Boolean; var Padsettings: ShortString): Boolean;
C/C++
BOOL SOPAD_configurePad(const char* szCertificate, BOOL bShowSimpleDialog, BOOL bAutostartIfSimpleDialog, BOOL bSaveToRegistry, char szPadSettings[SOPAD_MAX_STRING_LENGTH]);
ActiveX
HRESULT configurePad([in] BSTR Certificate, [in] VARIANT_BOOL ShowSimpleDialog, [in] VARIANT_BOOL AutostartIfSimpleDialog, [in] VARIANT_BOOL SaveToRegistry, [in, out] BSTR* Padsettings, [out, retval] VARIANT_BOOL* Value);
Description
configurePad replaces getPadSettings.
Arguments
Certificate
contains the certificate that has formerly been given to setPadsetting. Currently it is obsolete, replaced by XML certificate.
ShowSimpleDialog
If set to true the Signature Device Interface Window will appear in the new simple style.
If set to false the window will look like in the former versions including manual configuration mode.
AutostartIfSimpleDialog obsolete
If set to true the dialog "Please connect your signature device now" will not be shown and the application will automatically start to search for a signature device.Â
SaveToRegistry
If set to true the setting of the signature device will be stored in registry under: HKEY_CURRENT_USER\Software\STEPOVER\SignaturePadDriver->padsettings. (function startCapture is also using this path).
Padsettings
Contains the PadSettings string as formerly given to setPadsettings. configurePad returns the new settings in this variable (also if SaveToRegistry is set to true). If no pad has been configured before (or if you use SaveToRegistry and startCapture with ReadAndSaveInRegistry set to true) you can handle an empty string to this function.
The PadSettings are changed to "" when the Search Dialog is canceled. So the user should use a local variable here, and if the function returns true use this local variable.
With using "silent" as padsettings the visible search window can be skipped, in that case the first possible input device is selected.
Return value
configurePad returns true if a signature device has been found, selection Ok in dialog.
Sample
// Search for a Device string padSettings = ""; string cert = ""; // this value is obsolete bool autostartSerching = true; bool showConnectionWinIfAutostart = true; bool readAndSaveInRegistry = false; bool foundPad = SigDev.configurePad(cert, true, autostartSerching, readAndSaveInRegistry, ref padSettings); if (foundPad) { string devicetyp = SigDev.GetDriverString(0); string serial = SigDev.GetDriverString(1); }