GetRegistrySetting Method

PocketBrowser 3.x API

The GetRegistrySetting Method of the Generic ActiveX Object Gets the specified registry setting.

GetRegistrySetting (Method of the Generic ActiveX Object) Syntax
strData = objGeneric.GetRegistrySetting(lHive, strKey, strSetting);

ParametersW Toggle Parameters

Items listed in this section indicate parameters, or attributes which can be set.

Name Possible Values Description
Default Value
lKey Number The hive name (HKEY_CLASSES_ROOT = 0, HKEY_CURRENT_USER = 1, HKEY_LOCAL_MACHINE = 2, HKEY_USERS = 3) N/A
strSubKey String Name of the sub key to be retrieved N/A
strSetting String Name of the setting within strKey N/A

axReturns Toggle Return Values

Name Description
strData The data held in the specified registry setting

Examples Toggle Examples

The following javascript example displays in an alert box the contents of the registry key:

<script>
var objGeneric = new ActiveXObject("PocketBrowser.Generic");
var HKEY_LOCAL_MACHINE = 2;
var strData = "";

strData = objGeneric.GetRegistrySetting(HKEY_LOCAL_MACHINE,  "Software\\Symbol\\MySettings",  "Name");
alert(strData);
</script>
Copy example to clipboard Copy example to clipboard

Info Toggle Additional Information

Supported Platforms Windows CE, Windows Mobile
Persistence Runs immediately.
Min. Requirements None.