Re: Blocking WLX_SAS_TYPE_SC_INSERT

From: Marco van Nieuwenhoven (MarcovanNieuwenhoven_at_discussions.microsoft.com)
Date: 03/29/05


Date: Mon, 28 Mar 2005 23:13:03 -0800

Hi Rob,

Finally your comment did in fact make me change my WelcomsScreen. It did
provide a solution for my problem. It was quite tricky but here is a piece of
compacted code:

WlxDisplaySASNotice()
{
  // Create a modeless dialog which should persist
  g_hGinaWlxDisplaySASNoticeWnd = CreateDialogParam(
    IDD_DLG_DISPLAYSASNOTICE, DisplaySASNotice_DlgProc, ...)
  // Create a helper dialog (modal) which helps keeping the correct flow.
  WlxDialogBoxParam(IDD_DLG_INVISIBLEWAIT, InsisibleWait_DlgProc, ...)
}

int CALLBACK InsisibleWait_DlgProc(...)
{
  switch (uMsg)
  {
  case WM_INITDIALOG:
    // Hide the helper dialog
    ShowWindow(g_hGinaInsisibleWaitWnd, SW_HIDE);
    // Make sure the dialog is not visible
    SetWindowPos(g_hGinaInsisibleWaitWnd, HWND_TOPMOST, 2000, 2000, ...);
  }
}

WlxLoggedOutSAS(...)
{
  // This is the point where you dont need the dialog and can destroy it.
  if (g_hGinaWlxDisplaySASNoticeWnd != NULL)
    DestroyWindow (g_hGinaWlxDisplaySASNoticeWnd);
}

Thanks again for your help.

Grtx,
Marco van Nieuwenhoven.

"Rob" wrote:
> Replace the welcome screen. :-)
>
> "Marco van Nieuwenhoven" wrote:
>
> > Hi Rob,
> >
> > I can tell you that you do understand my problem. The flicker of the screen
> > is not avoidable in the solution Nathan suggested. Nathan's suggestion I had
> > already tried but did not give me a satisfying solution.
> >
> > Is there a fix for the flicker problem?
> >
> > "Rob" wrote:
> > > I think that's what the original poster indicated he was doing - hence the
> > > return of WLX_SAS_ACTION_NONE. But he still sees a flicker on the welcome
> > > screen.
> > >
> > > "Nathan D. Lee" wrote:
> > >
> > > > Maybe this is overly simplistic, but since it's a GINA Stub, what is wrong
> > > > with receiving the WLX_SAS_TYPE_SC_INSERT notification but then NOT calling
> > > > the next layer down?? If you're that bent on skipping the smartcard's
> > > > implementation, wouldn't that be how to do it?
> > > >
> > > > Nathan Lee
> > > >
> > > > "Marco van Nieuwenhoven" <MarcovanNieuwenhoven@discussions.microsoft.com>
> > > > wrote in message news:328C2EAC-A286-4395-8900-B46FCD14D12C@microsoft.com...
> > > > > Hi all,
> > > > >
> > > > > I have mada a Gina Stub and I would like NOT to receive the
> > > > > WLX_SAS_TYPE_SC_INSERT command. The smartcard I use has a full CSP
> > > > > implementation but I would not like to use this. I use a different
> > > > security
> > > > > feature from the smartcard and Insertions and removals I detecct myself.
> > > > >
> > > > > I have tried to return WLX_SAS_ACTION_NONE when I receive
> > > > > WLX_SAS_TYPE_SC_INSERT but this gives timing problems and makes the screen
> > > > > flicker.
> > > > >
> > > > > Any help would be appreciated.
> > > > >
> > > > > grtx,
> > > > > Marco van Nieuwenhoven.
> > > > >
> > > >
> > > >
> > > >