|
pfc_open
|
|
Full name
|
pfc_n_cst_apppreference.pfc_open
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_open(string)
|
Name
|
Datatype
|
li_rc
|
integer
|
event pfc_open;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_open
//
// Arguments:
// as_commandline: command line parameter to the application
//
// Returns: integer
// SUCCESS = 1
// ERROR = -1
//
// Description:
// Restore Application preferences on Application startup
//
//////////////////////////////////////////////////////////////////////////////
//
// 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
// Restore application information
if ib_restoreapp then
if (is_appkey <> "") then
li_rc = of_Restore(True, is_appkey)
elseif (is_appinifile <> "") then
li_rc = of_Restore(True, is_appinifile, is_appprefsection )
else
// no place to get application level info
return 0
end if
end if
if li_rc < 0 then return li_rc
// Restore User App Preferences
if ib_restoreuser then
if (is_userkey <> "") then
li_rc = of_Restore(False, is_userkey)
elseif (is_userinifile <> "") then
li_rc = of_Restore(False, is_userinifile, is_userprefsection )
else
// no place to get User level info
return 0
end if
end if
return li_rc
end event