|
pfc_close
|
|
Full name
|
pfc_n_cst_apppreference.pfc_close
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_close()
|
Name
|
Datatype
|
li_rc
|
integer
|
event pfc_close;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_close
//
// Arguments: None
//
// Returns: integer
// SUCCESS = 1
// ERROR = -1
//
// Description:
// Save Application preferences on Application close
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
integer li_rc
if is_appkey = "" and is_userkey = "" and &
is_appinifile = "" and is_userinifile = "" then
return -1
end if
// Save application information
if ib_restoreapp then
if (is_appkey <> "") then
li_rc = of_Save(True, is_appkey)
elseif (is_appinifile <> "") then
li_rc = of_Save(True, is_appinifile, is_appprefsection )
else
// no place to Save application level info
return 0
end if
end if
if li_rc < 0 then return li_rc
// Save User App Preferences
if ib_restoreuser then
if (is_userkey <> "") then
li_rc = of_Save(False, is_userkey)
elseif (is_userinifile <> "") then
li_rc = of_Save(False, is_userinifile, is_userprefsection )
else
// no place to Save User level info
return 0
end if
end if
return li_rc
end event