Advertisement

05.10.2008 at 05:14AM PDT, ID: 23391546
[x]
Attachment Details

WlxDialogBox now showing my dialog (custom Gina)

Asked by mythran in Windows Programming, C++ Programming Language, Visual Studio .NET 2005

Tags: Microsoft, Windows, 2000, Gina, Winlogon, Visual Studio C++ 2005

Hi, I'm quite desperate at the moment as I've been trying to get this working for the past days without luck. I have a custom GINA that works fine, it loads in Windows 2000, and even got it to read my smart card and cehck the PIN (using the winscard library). I can get a WlxMessageBox to display perfectly fine at the WlxLoggedOutSAS screen, but I can never get the WlxDialogBox to display (the module doesn't crash or anything, it just doesn't display the custom dialog). I'm not using MFC.

I created a simple custom dialog with the resource editor on Visual C++ 2005, that got automaically included in the project (IDD_DIALOG1).

I use these variables when calling WlxDialogBox:
handleWlxInit (from WlxInitialize)
globalInstance (from DLLMain)

((PWLX_DISPATCH_VERSION_1_3)g_pWinlogon)->WlxDialogBox(handleWlxInit,globalInstance,MAKEINTRESOURCEW (IDD_DIALOG1),NULL,checkPIN);

Thanks a lot in advance!
Sam.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
int
WINAPI
WlxLoggedOutSAS (PVOID                pWlxContext,
                 DWORD                dwSasType,
                 PLUID                pAuthenticationId,
                 PSID                 pLogonSid,
                 PDWORD               pdwOptions,
                 PHANDLE              phToken,
                 PWLX_MPR_NOTIFY_INFO pMprNotifyInfo,
                 PVOID *              pProfile)
{
  //my dialog that doesn't work:
  int iRet;
  iRet = ((PWLX_DISPATCH_VERSION_1_3)g_pWinlogon)->WlxDialogBox(handleWlxInit,globalInstance,MAKEINTRESOURCEW (IDD_DIALOG1),NULL,checkPIN);
 
//msgbox that works:
((PWLX_DISPATCH_VERSION_1_3) g_pWinlogon)->WlxMessageBox(handleWlxInit,globalHwnd,L"Test",L"Test",MB_OK);
 
  //this is the default logged out sas dialog
  //int iRet;
  iRet = pfWlxLoggedOutSAS(pWlxContext,
                            dwSasType,
                            pAuthenticationId,
                            pLogonSid,
                            pdwOptions,
                            phToken,
                            pMprNotifyInfo,
                            pProfile);
 
 
   if(iRet == WLX_SAS_ACTION_LOGON) 
   {
      //
      // Copy pMprNotifyInfo and pLogonSid for later use.
      //
 
      // pMprNotifyInfo->pszUserName
      // pMprNotifyInfo->pszDomain
      // pMprNotifyInfo->pszPassword
      // pMprNotifyInfo->pszOldPassword
   }
   return iRet;
}
 
 
BOOL CALLBACK checkPIN(HWND hwndDlg, 
                             UINT message, 
                             WPARAM wParam, 
                             LPARAM lParam) 
{ 
    switch (message) 
    { 
        case WM_COMMAND: 
            switch (LOWORD(wParam)) 
            { 
                case IDOK: 
                    //do something 
                    // Fall through. 
 
                case IDCANCEL: 
                     // do something else
                    return TRUE; 
            } 
    } 
    return FALSE; 
}
[+][-]05.10.2008 at 10:09AM PDT, ID: 21539675

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 10:23AM PDT, ID: 21539720

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 10:32AM PDT, ID: 21539745

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Windows Programming, C++ Programming Language, Visual Studio .NET 2005
Tags: Microsoft, Windows, 2000, Gina, Winlogon, Visual Studio C++ 2005
Sign Up Now!
Solution Provided By: jkr
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.10.2008 at 10:47AM PDT, ID: 21539922

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 11:01AM PDT, ID: 21539984

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628