Closing an application on Logoff [created using CreateProcessAsUs- er]

Hi All,

Platform: Windows 2000 SP1, Microsoft Vc++ 6.0 SP4

I have an application created using CreateProcessAsUserAPI from
winlogon. The permisions for windowstation and desktop are added as
specified in Microsoft KB (Q165194). Application comes in the desktop of the
specified user ( who will be already logged in), all operations can be done
on this window.It can be closed (pressing close button or logoff from start
menu). But when we try to logoff the user (using Ctrl+Alt+Del) with this
application running , It generates some exception.
It seems that the application is not recieving the close message in this
path. The desktop gets destroyed and while trying to access something by MFC
internals , it gets an exception.I dont understand why this doesn’t happen
when I try to logoff using the start menu.
I tried the same thing using Keith Brown’s cmdasuser from Feb 2000 MSJ.
Following are the steps I did
(First of all thanks Kieth for such an article and sample app)
1)Started the cmdasuser specifing the user name and password of the
currently logged inuser
2)Logged off using (Ctrl+Alt+Del)
3)Logged in again as same user ( cmd prompt is still there, old process)
4)Started the ntbackup.exe application. it showed some exception, but was
able to start calc.exe
Some other findings

Unable to watch messages using Spy++ on the windows from the process created
from such a process

Am I missing something here ???

Thanks in advance,
Regards,
Prasanth

xxxxx@nestec.net


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com