of_restore


pfcapsrv.pbl   >   pfc_n_cst_apppreference   >   of_restore   

Full name pfc_n_cst_apppreference.of_restore
Access public
Extend of integer
Return value integer
Prototype public function integer of_restore(string,ref string,string,boolean)

Name Datatype
No Data

Name Datatype
No Data

public function integer of_restore (string as_subkey, ref string as_value, string as_default, boolean ab_processapp);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_Restore
//
//	Access:  		public
//
//	Arguments:
//	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.
//	ab_ProcessApp	True if saving value with application level preferences
//						False if saving value with Application User level preferences
//
//	Returns:  		integer
//						1 if it succeeds.
//						0 if the default value was used.
//
//	Description:  	Public function to enable the developer to restore other application
//						type attributes in the same location as this service.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

// Save application information
if ab_processapp then
	if (is_appkey <> "") then
		// use the registry
		Return of_Restore(True, is_appkey, "", as_subkey, as_value, as_default)
	elseif (is_appinifile <> "") then
		Return of_Restore(False, is_appinifile, is_appprefsection, as_subkey, as_value, as_default)
	else
		// no place to Restore application level info from
		as_value = as_default
		return 0
	end if
Else
	if (is_userkey <> "") then
		// use the registry
		Return of_Restore(True, is_userkey, "", as_subkey, as_value, as_default)
	elseif (is_userinifile <> "") then
		Return of_Restore(False, is_userinifile, is_userprefsection, as_subkey, as_value, as_default)
	else
		// no place to Restore User level info from
		as_value = as_default
		return 0
	end if
end if

as_value = as_default
return 0
end function

     
Name Owner
No Data

     
Name Owner
pfc_n_cst_apppreference.of_restore pfc_n_cst_apppreference

     
Full name
No Data

     
Name Scope
No Data