Click to See Complete Forum and Search --> : GINA ..problem2


Kelvin
May 3rd, 1999, 11:40 PM
what shall i put in WlxWkstaLockedSAS(.....) in order for user to log on to a lock station?
i really couln't figure out what went wrong with my codes, that whatever the user key in, he will be
allowed to gain access to a locked workstation. Here is my code,



int
WINAPI
WlxWkstaLockedSAS(
PVOID pWlxContext,
DWORD dwSasType
)
{

int result;
PGlobals pGlobals;

pGlobals = (PGlobals) pWlxContext;
result = pWlxFuncs->WlxDialogBoxParam( (HANDLE)hGlobalWlx,
(HANDLE)hDllInstance,
(LPWSTR) MAKEINTRESOURCE(IDD_DIALOG_LOGON2),
NULL,
(DLGPROC)LogonDlgProc2,
(LPARAM) pGlobals );

HANDLE hUser;
if (LogonUser( (LPTSTR)pGlobals->pAccount->pszUsername,
(LPTSTR)pGlobals->pAccount->pszDomain,
(LPTSTR)pGlobals->pAccount->pszPassword,
(DWORD)LOGON32_LOGON_INTERACTIVE,
(DWORD)LOGON32_PROVIDER_DEFAULT,
(PHANDLE)&hUser))

return(WLX_SAS_ACTION_UNLOCK_WKSTA);

else return;

}