[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

SystemEvents.TimeChanged failure!

Eugene Lerner

10/10/2003 10:44:00 PM

I tried to use "SystemEvents.TimeChanged" from Windows
Service application and got an exception -

"System.Runtime.InteropServices.ExternalException"

Message -
"Failed to create system events window thread."

Please help!!

3 Answers

v-yiy

10/13/2003 10:45:00 AM

0

Hi Eugene,
You may try running the service using the LocalSystem account and set the
"Allow Service to interact with the desktop" option.
Then the service is able to access current window station and current
desktop.

Please be free to let me know if you still have problems on this issue.
Thanks for using MSDN Newsgroup.



Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| Content-Class: urn:content-classes:message
| From: "Eugene Lerner" <elerner@trekds.com>
| Sender: "Eugene Lerner" <elerner@trekds.com>
| Subject: SystemEvents.TimeChanged failure!
| Date: Fri, 10 Oct 2003 15:44:07 -0700
| Lines: 10
| Message-ID: <2789401c38f80$03afbae0$a601280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOPgAOvGwc+rBrkSGOl6OFrHzTNDQ==
| Newsgroups: microsoft.public.dotnet.framework.sdk
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.sdk:7748
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.public.dotnet.framework.sdk
|
| I tried to use "SystemEvents.TimeChanged" from Windows
| Service application and got an exception -
|
| "System.Runtime.InteropServices.ExternalException"
|
| Message -
| "Failed to create system events window thread."
|
| Please help!!
|
|

Eugene Lerner

10/15/2003 12:02:00 PM

0

Hi Ying-Shen,

Thank you, your advice indeed helped. Do you know how to
set "Allow Service to interact with the desktop" option
programmatically from service installer?

Sorry for not responding earlier - the newsgroup was not
available on Monday and Tuesday (October 13 & 14).
Meantime I continue to receive two notifications per day
on your behalf asking me to respond.



>-----Original Message-----
>Hi Eugene,
>You may try running the service using the LocalSystem
account and set the
>"Allow Service to interact with the desktop" option.
>Then the service is able to access current window
station and current
>desktop.
>
>Please be free to let me know if you still have problems
on this issue.
>Thanks for using MSDN Newsgroup.
>
>
>
>Best regards,
>
>Ying-Shen Yu [MSFT]
>Microsoft Online Partner Support
>Get Secure! - www.microsoft.com/security
>
>This posting is provided "AS IS" with no warranties and
confers no rights.
>You should not reply this mail directly, "Online" should
be removed before
>sending, Thanks!
>
>--------------------
>| Content-Class: urn:content-classes:message
>| From: "Eugene Lerner" <elerner@trekds.com>
>| Sender: "Eugene Lerner" <elerner@trekds.com>
>| Subject: SystemEvents.TimeChanged failure!
>| Date: Fri, 10 Oct 2003 15:44:07 -0700
>| Lines: 10
>| Message-ID: <2789401c38f80$03afbae0$a601280a@phx.gbl>
>| MIME-Version: 1.0
>| Content-Type: text/plain;
>| charset="iso-8859-1"
>| Content-Transfer-Encoding: 7bit
>| X-Newsreader: Microsoft CDO for Windows 2000
>| X-MimeOLE: Produced By Microsoft MimeOLE
V5.50.4910.0300
>| Thread-Index: AcOPgAOvGwc+rBrkSGOl6OFrHzTNDQ==
>| Newsgroups: microsoft.public.dotnet.framework.sdk
>| Path: cpmsftngxa06.phx.gbl
>| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.sdk:7748
>| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
>| X-Tomcat-NG: microsoft.public.dotnet.framework.sdk
>|
>| I tried to use "SystemEvents.TimeChanged" from Windows
>| Service application and got an exception -
>|
>| "System.Runtime.InteropServices.ExternalException"
>|
>| Message -
>| "Failed to create system events window thread."
>|
>| Please help!!
>|
>|
>
>.
>

v-yiy

10/16/2003 11:51:00 AM

0

Hi Eugene Lerner,
the class ServiceProcessInstaller does not support this setting,
you need modify the Type key in Registry by yourself.
Also I'd like to say, setting a service interacting with desktop may lead
to SECURITY RISK ,
because you are using a LocalSystem account.
If this service is running in production environment,
Maybe you should try other work arounds,such as
add a COM Interface to your service, then build a small app which is
loaded at User logon
and communicate with the Service.

thanks! if you still have any further questions on this issue, please let
me know!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| Content-Class: urn:content-classes:message
| From: "Eugene Lerner" <elerner@trekds.com>
| Sender: "Eugene Lerner" <elerner@trekds.com>
| References: <2789401c38f80$03afbae0$a601280a@phx.gbl>
<HsWeZcXkDHA.2556@cpmsftngxa06.phx.gbl>
| Subject: RE: SystemEvents.TimeChanged failure!
| Date: Wed, 15 Oct 2003 05:02:18 -0700
| Lines: 77
| Message-ID: <2b68501c39314$2eab19a0$a601280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOTFC6r8PQupziiT92tg8LuA4y9Tw==
| Newsgroups: microsoft.public.dotnet.framework.sdk
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.sdk:7877
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.public.dotnet.framework.sdk
|
| Hi Ying-Shen,
|
| Thank you, your advice indeed helped. Do you know how to
| set "Allow Service to interact with the desktop" option
| programmatically from service installer?
|
| Sorry for not responding earlier - the newsgroup was not
| available on Monday and Tuesday (October 13 & 14).
| Meantime I continue to receive two notifications per day
| on your behalf asking me to respond.
|
|
|
| >-----Original Message-----
| >Hi Eugene,
| >You may try running the service using the LocalSystem
| account and set the
| >"Allow Service to interact with the desktop" option.
| >Then the service is able to access current window
| station and current
| >desktop.
| >
| >Please be free to let me know if you still have problems
| on this issue.
| >Thanks for using MSDN Newsgroup.
| >
| >
| >
| >Best regards,
| >
| >Ying-Shen Yu [MSFT]
| >Microsoft Online Partner Support
| >Get Secure! - www.microsoft.com/security
| >
| >This posting is provided "AS IS" with no warranties and
| confers no rights.
| >You should not reply this mail directly, "Online" should
| be removed before
| >sending, Thanks!
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Eugene Lerner" <elerner@trekds.com>
| >| Sender: "Eugene Lerner" <elerner@trekds.com>
| >| Subject: SystemEvents.TimeChanged failure!
| >| Date: Fri, 10 Oct 2003 15:44:07 -0700
| >| Lines: 10
| >| Message-ID: <2789401c38f80$03afbae0$a601280a@phx.gbl>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MimeOLE: Produced By Microsoft MimeOLE
| V5.50.4910.0300
| >| Thread-Index: AcOPgAOvGwc+rBrkSGOl6OFrHzTNDQ==
| >| Newsgroups: microsoft.public.dotnet.framework.sdk
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.framework.sdk:7748
| >| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| >| X-Tomcat-NG: microsoft.public.dotnet.framework.sdk
| >|
| >| I tried to use "SystemEvents.TimeChanged" from Windows
| >| Service application and got an exception -
| >|
| >| "System.Runtime.InteropServices.ExternalException"
| >|
| >| Message -
| >| "Failed to create system events window thread."
| >|
| >| Please help!!
| >|
| >|
| >
| >.
| >
|