. 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   

dosWriteReg(string Key, string SubKey, string ValueName, any Value)

Writes a value into the registry. If needed, sub keys that do not exist will be created. If the value doesn't exist within the key, it will be created, otherwise it will be overwritten. 

Parameters :

Key : A string specifying which root key to write 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 write 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 write within a key. For example "IconTitleFaceName". This parameter is case insensitive and may be an empty string to specify the default value in the key.
Value : Data to write to the value. The type of this parameter will specify which type of value to write. This may be a null terminated string for a string, an integer for a dword value or a linear list of linear lists of integers for a binary value. In a binary value, each index of the linear list passed is a linear list representing a byte. Each index of each linear list within the passed linear list is an integer representing a bit. If an integer is not 0, the corresponding bit is on. If an integer is 0, the corresponding bit is off. For example the binary sequence 10001010 01010101 can be passed as [[1, 0, 0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1]]. 

Return Value : An integer indicating whether the value was successfully written. If 1 is returned, the method was successful. If 0 is returned, the method was not successful is which case dosGetLastError() should be called to determine the cause of the error. 

Possible Returned Error Codes via dosGetLastError() :
10001 : Invalid value for parameter 1. 
10004 : Invalid format for parameter 4. A value type other than a string, integer or linear list was passed. If a linear list was passed, a value within it is not a linear list of 8 elements containing all integers. 
10022 : Method is not supported on MacOS. 
11000 : Registry value not found. Can not create a key in the specified location. 

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: 8/4/2005 12:11:24 PM.