[ Home ] [ Features ] [ Products ] [ FAQ's ] [ Screens ] [ Support ] [ Downloads ] [ About ] [ Discussion ]


the software that grows with you

 

V32RegSetValue()

Sets a value for a specified name for a specified key in the Windows' Registry database.

Syntax

V32RegSetValue( <cKey>, <cType>, [cName], <cnValue>, [@cError] )

Arguments

cKey Character string specifying key whose value is to be set in the Windows Registry Database. <cKey> must include one of the base keys defined for Windows version specific base keys. The format of <cKey> will be somewhat like:

cKey := "HKEY_CURRENT_USER\Software\Vouch32"

Here "HKEY_CURRENT_USER" is one of the base keys defined by Windows. The other base keys are as under:

HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
HKEY_CURRENT_CONFIG
HKEY_DYN_DATA

If base key is not included in the <cKey> definition, function will not execute and return value will be FALSE.

cType One character string specifying the type of value to be set. It can be either 'C' for string data or 'N' for numeric data to be set. It is a must to furnish this parameter.
cName Optional character string to specify NAME within the <cKey> whose value has to be set. Defaults to "", a null string. If <cName> is not specified, 'Default' NAME of the <cKey> is set.
cnValue Character of Numeric data which will be set as value for <cName> within <cKey>.
cError Optional variable passed by reference to hold the description of operation's success or failure.

Returns

lSuccess . If <cKey> is deleted successfully TRUE otherwise FALSE will be returned. Description of lSuccess will be contained in <cError> if the variable is supplied by reference.

Description

This function sets the character or numeric value for a specified <cName> if it is supplied otherwise default name will be set.

Usage

local cKey, lSuccess, cError

cKey := "HKEY_CURRENT_USER\Software\Vouch32"

lSuccess := V32RegSetValue( cKey, 'C', 'User1', 'Pritpal Bedi', @cError )
// lSuccess := V32RegSetValue( cKey, 'N', 'Times1', 212, @cError )

if .not. lSuccess
   ? cError
endif

Tips

 

[ Home ][ Features ] [ Products ][ About Us ][ FAQ's ][ Screen Shots ][ Downloads ][ Support ][ Discussion ]
.

Vouch is a Trademark of Pritpal Bedi
All other Trade Marks are the property of their respective owners.
Copyright 1993-2011 Pritpal Bedi. All rights reserved.
Hit Counter  
You are Visitor # since 14 May 2002