Description |
Returns a DWORD value from the general and device sections of the settings file. |
Parameters |
Device handle (see notes), settings key name and pointer for storing returned value. |
Returns |
0 = fail, 1 = OK. |
Notes |
This will retrieve a DWORD value from the settings. Supply a valid Device handle to retrieve items for a specific device from the device section or pass zero to retrieve values from the general driver section |
See also |
Other settings related API calls to set and retrieve updd setting. |
Visual
C++ Declaration/example
BOOL TBApiGetSettingDWORD(HTBDEVICE aHandle,const TCHAR* aName, unsigned long* val);
//
// Flip the 'enabled'
state of the driver
//
int dev = TBApiGetRelativeDevice(0);
DWORD bEnabled;
TBApiGetSettingDWORD(dev,_T("Enabled"),&bEnabled);
TBApiSetSettingDWORD(dev,_T("Enabled"),bEnabled ^ 1);
TBApiApply(); //
apply the change
Public Declare Function TBApiGetSettingDWORD
Lib "TBapi" Alias
"_DLL_TBApiGetSettingDWORD@12" (ByVal aHandle As Byte, ByVal aName As String, ByVal val As Long) As Long
‘
‘ Flip the ‘enabled’ state of the driver
‘
Dim DeviceId As Byte
Dim result As Long
Dim addrl As Long
addrl = VarPtr(l)
DeviceId = TBApiGetRelativeDevice(0)
result = TBApiGetSettingDWORD(DeviceId, "Enabled", addrl)
result = TBApiSetSettingDWORD(DeviceId, "Enabled", 1 - l)
TBApiApply