Getdefsetting method, Savedefsetting method – MagTek USB HID Swipe Reader User Manual
Page 23
Section 3. Methods
19
GETDEFSETTING METHOD
Returns data from the registry.
Syntax
Result =USBHID.GetDefSetting(ByVal Key As String, [ByVal Default As String]) As String
The GetDefSetting method syntax has the following parts:
Part
Description
Key
Registry Key
Default Value returned if the key does not exist. This parameter is optional.
Remarks
This method returns data stored in the HKEY_CURRENT_USER/Software/VB and VBA
Program Settings/USBHID/Startup section of the registry. If the Key value doesn’t exist within
the section, the Default value is returned.
Example
USBHID.GetDefSetting(“CommPort”, “2”)
This returns the value of the CommPort Key. If the CommPort key doesn’t exist, ‘2’ is returned.
Data Type
String
SAVEDEFSETTING METHOD
Saves data to the registry.
Syntax
Result =USBHID.SaveDefSetting(Key As String, Setting As String)
The SaveDefSetting method syntax has the following parts:
Part
Description
Key
Registry Key
Setting Value stored in the registry key.
Remarks
This method stores data in the HKEY_CURRENT_USER/Software/VB and VBA Program
Settings/USBHID/Startup section of the registry.