Re: Winlogon notification dll doesn't work on 2003 server
From: Alpar (Alpar_at_discussions.microsoft.com)
Date: 04/29/05
- Next message: Kelvin Yiu [MS]: "Re: Missing Microsoft Enhanced Cryptographic Provider"
- Previous message: Kevin Witty: "Remote Assistance problem"
- In reply to: Hao Zhuang [MSFT]: "Re: Winlogon notification dll doesn't work on 2003 server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 29 Apr 2005 09:00:03 -0700
Thanks Hao, you are right. I tried it on a clean 2003 server and it works
fine. The registry entries were correct, most likely it was some other
incorrect setting on the previous server.
Sometimes, reassuring that things do work as they are supposed to, helps :)
"Hao Zhuang [MSFT]" wrote:
> i used your code with minor modifications and it worked. make sure the
> spelling of the entry functions is correct in the notification package reg
> key.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
> "Alpar" <Alpar@discussions.microsoft.com> wrote in message
> news:01D1AE2F-5A12-4DD7-B2A7-DB0BDAED5F36@microsoft.com...
> > Thank you for the prompt answer. The code I use for testing the dll is
> > fairly
> > simple:
> >
> >
> > TCHAR g_szPath[] = TEXT("C:\\Winnt\\Notepad.exe");
> >
> > //Event handler for the Winlogon Logon event
> > VOID APIENTRY StartProcessAtWinLogon (PWLX_NOTIFICATION_INFO pInfo)
> > {
> > TCHAR szText[MAX_PATH];
> >
> > STARTUPINFO si;
> > si.cb = sizeof(STARTUPINFO);
> > si.lpReserved = NULL;
> > si.lpTitle = NULL;
> > si.lpDesktop = TEXT("WinSta0\\Default");
> > si.dwX = si.dwY = si.dwXSize = si.dwYSize = 0L;
> > si.dwFlags = 0;;
> > si.wShowWindow = SW_SHOW;
> > si.lpReserved2 = NULL;
> > si.cbReserved2 = 0;
> >
> > DWORD dwWritten;
> >
> > HANDLE hFile = CreateFile(TEXT("c:\\TSP.txt"), GENERIC_ALL, NULL, NULL,
> > OPEN_ALWAYS, NULL, NULL);
> > strcpy(szText, TEXT("StartProcessAtWinLogon \r\n"));
> > WriteFile(hFile, szText, strlen(szText), &dwWritten, NULL);
> > CloseHandle(hFile);
> >
> > CreateProcess(NULL, g_szPath, NULL, NULL, FALSE, CREATE_NEW_CONSOLE,
> > NULL, NULL, &si, &g_pi);
> >
> > MessageBox(NULL, "Winlogon Test", "Winlogon Test", MB_OK);
> > }
> >
> > On XP, the text file is created, Notepad is started and the message box is
> > displayed. On Windows 2003 Server, none of the three things happen. I
> > tried
> > logging in on the console and also remotely, doesn't seem to make a
> > difference.
> > Other (third party) notification dlls I see in the registry key work
> > correctly, therefore I suspect that must be a problem in my code.
> >
> > Any ideas?
> >
> > Thank you,
> > Alpar
> >
> >
> >
> > "Hao Zhuang [MSFT]" wrote:
> >
> >> in winxp there is only a single session while in ws2003 multiple TS
> >> sessions
> >> and the console session can coexist. this mean, there is only a single
> >> winlogon.exe process in winxp while in ws2003 each session has a
> >> winlogon.exe. if your winlogon notification package dll relies on some
> >> global data shared, you may have problems.
> >>
> >> - hao
> >>
> >> --
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
> >>
> >> "Alpar" <Alpar@discussions.microsoft.com> wrote in message
> >> news:4D852056-554C-4363-8B92-0139D779D87B@microsoft.com...
> >> > Hi,
> >> >
> >> > I am implementing a Winlogon notification dll. The dll works fine on
> >> > Windows
> >> > XP, but I cannot get it to work on Windows 2003 Terminal Server.
> >> > The dll creates a text file, starts Notepad and displays a message box
> >> > when
> >> > the logon event occurs. All these work fine on XP.
> >> > Whne I logon to teh Windows 2003 server, none of the above happens. The
> >> > dll
> >> > is locked by the system, therfore winlogon.exe must use/load it.
> >> >
> >> > I tried to :
> >> > 1. log in from the console as administrator
> >> > 2. log in from a remote XP machine using the Remote Desktop Connection
> >> > as
> >> > a
> >> > regular terminal server user
> >> > 2. log in from a remote XP machine using the Remote Desktop Connection
> >> > as
> >> > the administrator terminal server user
> >> > None of them helps.
> >> >
> >> > If anyone knows what to do differently for 2003 server in the code that
> >> > works on XP, please let me know.
> >> >
> >> > Thanks,
> >> > Alpar
> >> > alpar@blackice.NOSAPM_com.NO_SPAM
> >> >
> >>
> >>
> >>
>
>
>
- Next message: Kelvin Yiu [MS]: "Re: Missing Microsoft Enhanced Cryptographic Provider"
- Previous message: Kevin Witty: "Remote Assistance problem"
- In reply to: Hao Zhuang [MSFT]: "Re: Winlogon notification dll doesn't work on 2003 server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|