|
of_logondlg
|
|
Full name
|
n_cst_demopfc.of_logondlg
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_logondlg()
|
Name
|
Datatype
|
lnv_logonattrib
|
n_cst_logonattrib
|
public function integer of_logondlg ();//////////////////////////////////////////////////////////////////////////////
//
// Function: of_LogonDlg
//
// Access: public
//
// Arguments: none
//
// Returns: integer
// 1 = successful logon
// 0 = User cancelled from the logon dialog
// -1 = an error occurred opening the logon window
//
// Description: Obtain a User ID and password from the user
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 1.0.00 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © NOVALYS
//
//////////////////////////////////////////////////////////////////////////////
n_cst_logonattrib lnv_logonattrib
//////////////////////////////////////////////////////////////////////////////
// Load logon object values
//////////////////////////////////////////////////////////////////////////////
this.event pfc_prelogondlg (lnv_logonattrib)
//////////////////////////////////////////////////////////////////////////////
// Open logon window
//////////////////////////////////////////////////////////////////////////////
if OpenWithParm (w_logon_demo, lnv_logonattrib) < 0 then
return -1
end if
//////////////////////////////////////////////////////////////////////////////
// Get return logon object
//////////////////////////////////////////////////////////////////////////////
lnv_logonattrib = message.powerobjectparm
//////////////////////////////////////////////////////////////////////////////
// Store user id
//////////////////////////////////////////////////////////////////////////////
if Len (lnv_logonattrib.is_userid) > 0 then
if of_IsRegistryAvailable() then
RegistrySet (is_userkey + "\logon", "userid", lnv_logonattrib.is_userid)
else
SetProfileString (is_userinifile, "logon", "userid", lnv_logonattrib.is_userid)
end if
of_SetUserID (lnv_logonattrib.is_userid)
end if
return lnv_logonattrib.ii_rc
end function