. DirectXtras Home

DirectCommunication Xtra
DirectConnection Xtra
DirectControl Xtra
DirectEmail Xtra
DirectFTP Xtra
DirectImage Xtra
DirectInteraction Xtra
DirectOS Xtra
License Agreement
Licensing Fees
Order Form
DirectSMS Xtra
DirectSound Xtra
DirectTransition Xtra
DirectTransition3D Xtra Set I
DirectTransition3D Xtra Set II
DirectTransition3D Xtra Set III
DirectTTS Xtra
DirectXport Xtra


Special Discounted Bundles

The Gallery
How To Order
Order Form
Check for Upgrades

Sign in
Change Your Profile

Contact Us

Xtra Power for Director & Authorware

DirectOS Xtra
 Directing Windows and MacOS. The OS at your fingertips!

Authorware 4.x Compatible Authorware 5.x CompatibleAuthorware 6.x CompatibleAuthorware 7.x CompatibleDirector 5.x Compatible Director 6.x CompatibleDirector 7.x Compatible Director 8.x CompatibleDirector MX Compatible     Windows Compatible   

dosReadReg(string Key, string SubKey, string ValueName)

Reads and returns the data of the specified value from the registry. This value may be a string, integer or binary registry value. The return value type determines the type of value stored in the registry.

Parameters :

Key : A string specifying which root key to look for the subkey in. This parameter is case insensitive. All possible values are "HKEY_CURRENT_USER", "HKEY_CURRENT_CONFIG", "HKEY_USERS", "HKEY_LOCAL_MACHINE" and "HKEY_CLASSES_ROOT". 
SubKey : A string specifying which subkey to look for the value in. This may include nested subkeys separated by backslashes. For example "Software\Control Panel\Desktop". This parameter is case insensitive and may be an empty string to specify the root key specified by Key
ValueName : A string specifying which value to read within a key. For example "IconTitleFaceName". This may be an empty string to specify the default value in the key. 

Return Values : The data of the value specified by ValueName within the key specified by Key and SubKey. The return value depends on the type of the value. If it is a string, the exact string is returned. If it is an integer value, the value is returned as an integer. If it is a binary value, a linear list of linear lists of integers is returned. Each index of the returned linear list is a linear list representing a byte. Each index of each linear list within the returned linear list is an integer representing a bit. If an integer is 1, the corresponding bit is on. If an integer is 0, the corresponding bit is off. For example the binary sequence 10001010 01010101 is returned as [[1, 0, 0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1]].

In case of any error, depending on the return type, either an empty string is returned, the integer value 0, or an empty list. Note that the function may return an empty list for a zero length binary value, a value of 0 for the integer zero, or an empty string for an empty registry string. Thus, these values may not necessarily represent an error, but rather the value stored in the registry. Applications should call dosGetLastError() to determine whether an error occurred and if yes, what was it's cause. 
If the error had occurred before the Xtra could figure out which type of value is stored in the registry, an empty string would be returned.

Possible Returned Error Codes via dosGetLastError() :
10001 : Invalid value for parameter 1. 
10022 : Method is not supported on MacOS.
11000 : Registry value not found. Either the sub key or value specified does not exist. 
11001 : Registry value has an unrecognized type. Registry value is not of a string, dword or binary type. 

DirectXtras Inc.
P.O Box 2645, Menlo Park, CA, 94026, U.S.A
Voice: +1-415-5058249, Fax: +1-801-8585841
Toll Free: 1-800-4453093
E-mail General Information: info@directxtras.com
E-mail Technical Support: support@directxtras.com

Copyright 1996-2004 DirectXtras Inc. All Rights Reserved.
WebMaster: tamar@directxtras.com
Last Updated: 12/20/2002 5:14:51 AM.