CTRL_LOGOFF_EVENT and SERVICE_INTERACTIVE_PROCESS 
Author Message
 CTRL_LOGOFF_EVENT and SERVICE_INTERACTIVE_PROCESS

He folks!
I created a dialog based application and made it to a service. Not a big
deal.
The service has a icon in the system tray.
If you click on the item, the dialog window pops up, so that the user
can see some information about the current status of the service.
In that dialog window, i created a property sheet with two property
pages in it. As fare i do NOT create that property stuff, everything
works fine, but with the property stuff AND when the user loggs out, i
always got a runtime error!!!!

WHY???

By the way, when i just start the service and then terminate it again,
by the windows nt control manager, everything goes well, also!!??

Thanx in advance
Normen



Thu, 10 Jun 2004 22:07:14 GMT  
 CTRL_LOGOFF_EVENT and SERVICE_INTERACTIVE_PROCESS
He!

It's me again!
So far i found out, that the problem is neither placed in the property sheet
nor in the property pages BUT in the CListCtl, which is placed in one of my
property pages!!!!

When i take the CListCtrl out of my page, everything works fine.
So does anyone know what i shall do with that list control???

Greetings
Normen

Quote:

> He folks!
> I created a dialog based application and made it to a service. Not a big
> deal.
> The service has a icon in the system tray.
> If you click on the item, the dialog window pops up, so that the user
> can see some information about the current status of the service.
> In that dialog window, i created a property sheet with two property
> pages in it. As fare i do NOT create that property stuff, everything
> works fine, but with the property stuff AND when the user loggs out, i
> always got a runtime error!!!!

> WHY???

> By the way, when i just start the service and then terminate it again,
> by the windows nt control manager, everything goes well, also!!??

> Thanx in advance
> Normen



Fri, 11 Jun 2004 00:03:31 GMT  
 CTRL_LOGOFF_EVENT and SERVICE_INTERACTIVE_PROCESS
There is a serious question here about how the service insinuates itself into the system
tray. The last I looked, this involved crossing desktop boundaries, which is a bit tricky.
Also, a serivce that has a GUI has numerous issues about cross-desktop communication it
must deal with (there is an MSDN article on this). Since CListCtrl is a control that
cannot pass its parameter blocks across process boundaries, it looks suspiciously like you
might be having some issues in this area as well. I'd need to know more about how you do
all this to offer advice in detail.
                                joe

Quote:

>He!

>It's me again!
>So far i found out, that the problem is neither placed in the property sheet
>nor in the property pages BUT in the CListCtl, which is placed in one of my
>property pages!!!!

>When i take the CListCtrl out of my page, everything works fine.
>So does anyone know what i shall do with that list control???

>Greetings
>Normen


>> He folks!
>> I created a dialog based application and made it to a service. Not a big
>> deal.
>> The service has a icon in the system tray.
>> If you click on the item, the dialog window pops up, so that the user
>> can see some information about the current status of the service.
>> In that dialog window, i created a property sheet with two property
>> pages in it. As fare i do NOT create that property stuff, everything
>> works fine, but with the property stuff AND when the user loggs out, i
>> always got a runtime error!!!!

>> WHY???

>> By the way, when i just start the service and then terminate it again,
>> by the windows nt control manager, everything goes well, also!!??

>> Thanx in advance
>> Normen

Joseph M. Newcomer [MVP]

Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm


Sun, 13 Jun 2004 13:44:15 GMT  
 CTRL_LOGOFF_EVENT and SERVICE_INTERACTIVE_PROCESS
He Joe!

First of all thanks for your advice, i am going to check out that article!!
Well, as to your question, what exactly do you want to know?
I have created a simple dialog based application.
Then, i made it to a service, without any system tray icon.
Everything works fine!!!
Then i put a CListCtrl into my dialog and........boooommmmmm!
Well, not exactly boommm, cause, as long as the user does not log out, everything is fine,
only when he ends up the session.
I tried to overload the "WM_ENDSESSION", "WM_QUERYENDSESSION" and "ExitInstance" without any
luck......so i realy don't know what else i should to...

If you like, i can send you my little "Test Service" application, so that you can check out
the code, it is realy not a big deal, as i mentiones before, just a dialog based application
generated by the application wizard.

greetings
Normen

Quote:

> There is a serious question here about how the service insinuates itself into the system
> tray. The last I looked, this involved crossing desktop boundaries, which is a bit tricky.
> Also, a serivce that has a GUI has numerous issues about cross-desktop communication it
> must deal with (there is an MSDN article on this). Since CListCtrl is a control that
> cannot pass its parameter blocks across process boundaries, it looks suspiciously like you
> might be having some issues in this area as well. I'd need to know more about how you do
> all this to offer advice in detail.
>                                 joe


> >He!

> >It's me again!
> >So far i found out, that the problem is neither placed in the property sheet
> >nor in the property pages BUT in the CListCtl, which is placed in one of my
> >property pages!!!!

> >When i take the CListCtrl out of my page, everything works fine.
> >So does anyone know what i shall do with that list control???

> >Greetings
> >Normen


> >> He folks!
> >> I created a dialog based application and made it to a service. Not a big
> >> deal.
> >> The service has a icon in the system tray.
> >> If you click on the item, the dialog window pops up, so that the user
> >> can see some information about the current status of the service.
> >> In that dialog window, i created a property sheet with two property
> >> pages in it. As fare i do NOT create that property stuff, everything
> >> works fine, but with the property stuff AND when the user loggs out, i
> >> always got a runtime error!!!!

> >> WHY???

> >> By the way, when i just start the service and then terminate it again,
> >> by the windows nt control manager, everything goes well, also!!??

> >> Thanx in advance
> >> Normen

> Joseph M. Newcomer [MVP]

> Web: http://www3.pgh.net/~newcomer
> MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm



Sun, 13 Jun 2004 22:21:14 GMT  
 CTRL_LOGOFF_EVENT and SERVICE_INTERACTIVE_PROCESS
THANK YOU SO MUCH...i got it.
I read that article and got the solution!!!!

The solution is: unsubclass the non-MFC windows which MFC has subclassed

greetings
Normen

Quote:

> There is a serious question here about how the service insinuates itself into the system
> tray. The last I looked, this involved crossing desktop boundaries, which is a bit tricky.
> Also, a serivce that has a GUI has numerous issues about cross-desktop communication it
> must deal with (there is an MSDN article on this). Since CListCtrl is a control that
> cannot pass its parameter blocks across process boundaries, it looks suspiciously like you
> might be having some issues in this area as well. I'd need to know more about how you do
> all this to offer advice in detail.
>                                 joe


> >He!

> >It's me again!
> >So far i found out, that the problem is neither placed in the property sheet
> >nor in the property pages BUT in the CListCtl, which is placed in one of my
> >property pages!!!!

> >When i take the CListCtrl out of my page, everything works fine.
> >So does anyone know what i shall do with that list control???

> >Greetings
> >Normen


> >> He folks!
> >> I created a dialog based application and made it to a service. Not a big
> >> deal.
> >> The service has a icon in the system tray.
> >> If you click on the item, the dialog window pops up, so that the user
> >> can see some information about the current status of the service.
> >> In that dialog window, i created a property sheet with two property
> >> pages in it. As fare i do NOT create that property stuff, everything
> >> works fine, but with the property stuff AND when the user loggs out, i
> >> always got a runtime error!!!!

> >> WHY???

> >> By the way, when i just start the service and then terminate it again,
> >> by the windows nt control manager, everything goes well, also!!??

> >> Thanx in advance
> >> Normen

> Joseph M. Newcomer [MVP]

> Web: http://www3.pgh.net/~newcomer
> MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm



Sun, 13 Jun 2004 22:44:50 GMT  
 
 [ 5 post ] 

 Relevant Pages 
 

 
Powered by phpBB® Forum Software