|
of_setapppreference
|
|
Full name
|
pfc_n_cst_appmanager.of_setapppreference
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_setapppreference(boolean)
|
public function integer of_setapppreference (boolean ab_switch);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_SetAppPreference
//
// Access: public
//
// Arguments:
// ab_switch True - start (create) the service,
// False - stop (destroy) the service
//
// Returns: Integer
// 1 - Successful operation.
// 0 - No action taken.
// -1 - An error was encountered.
//
// Description: Starts or stops the Application Preference 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.
//
//////////////////////////////////////////////////////////////////////////////
//Check arguments
If IsNull(ab_switch) Then
Return -1
End If
IF ab_Switch THEN
IF IsNull(inv_apppref) Or Not IsValid (inv_apppref) THEN
inv_apppref = CREATE n_cst_apppreference
inv_apppref.of_SetRequestor ( this )
// set up some defaults
inv_apppref.of_setappkey( this.of_getappkey() )
inv_apppref.of_setappinifile( this.of_getappinifile() )
inv_apppref.of_setuserkey( this.of_getuserkey() )
inv_apppref.of_setuserinifile( this.of_getuserinifile() )
Return 1
END IF
ELSE
IF IsValid (inv_apppref) THEN
DESTROY inv_apppref
Return 1
END IF
END IF
Return 0
end function