of_readkeys


pfcapsrv.pbl   >   pfc_n_cst_mru   >   of_readkeys   

Full name pfc_n_cst_mru.of_readkeys
Access protected
Extend of integer
Return value integer
Prototype protected function integer of_readkeys(string,string,ref string,string)

Name Datatype
No Data

Name Datatype
DEFAULT string
ls_registrykey string

protected function integer of_readkeys (string as_inisection, string as_subkey, ref string as_value, string as_default);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_ReadKeys
//
//	Access:  		protected
//
//	Arguments:
//	as_IniSection	The name of the Registry or .Ini section. 
//	as_SubKey		The key value to be used on either the Registry or .Ini file.
//	as_value			The value to be restored from either the Registry or .Ini file.
//							Passed by reference.
// as_default		Used also as a default value, if the desired value is not found.
//
//	Returns:  		integer
//						1 if it succeeds.
//						0 if the default value was used.
//
//	Description:  	Perform the actual Get from the Registry or the .Ini file.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////

constant string DEFAULT='$%^'
string	ls_registrykey

// add section information to the registry key
if right(is_userkey, 1) = "\" then
	ls_registrykey = is_userkey + as_IniSection
else
	ls_registrykey = is_userkey + "\" + as_IniSection
end if


If ib_UseRegistry Then
	If RegistryGet (ls_registrykey, as_SubKey, as_Value) =1 Then
		Return 1
	End If
	as_Value = as_default
	Return 0
End If	

as_value = ProfileString (is_userinifile, as_IniSection, as_SubKey, DEFAULT)
If as_value=DEFAULT Then
	as_Value = as_default
	Return 0
End If

Return 1


end function

     
Name Owner
pfc_n_cst_mru.of_load pfc_n_cst_mru
pfc_n_cst_mru.of_read pfc_n_cst_mru

     
Name Owner
systemfunctions.profilestring systemfunctions
systemfunctions.registryget systemfunctions
systemfunctions.right systemfunctions

     
Full name
No Data

     
Name Scope
No Data