[Mono-dev] Status of Win32/SystemEvents
david at dasz.at
Mon Jan 7 12:11:22 UTC 2013
On 25.12.2012 18:08, mabra at manfbraun.de wrote:
> How does other software handle this [pre-shutdown notification,
> time-chnages and so on] ?? I've just read about "upstart". Is
> there a common API to that, so I could start to write one or
> the other function/API call with Interop ??
No, the proper way under mono is to implement
System.ServiceProcess.ServiceBase and install a init script (and/or
upstart job, and/or systemd unit file) to run the service under
mono-service. This way the native init system will signal to
mono-service, which in turn will shutdown your service properly.
This will also help you under Windows.
> Does probably have the java guys more system wrappers, so
> that I should evaluate java ??
> But now, I understand, why all my desktop apps - that, I saw until
> now, never saves anythings, if I log off ....
> Best regards,
>> -----Original Message-----
>> From: Oskar Berggren [mailto:oskar.berggren at gmail.com]
>> Sent: Tuesday, December 25, 2012 4:57 PM
>> To: mabra at manfbraun.de
>> Cc: mono-devel-list at lists.ximian.com
>> Subject: Re: [Mono-dev] Status of Win32/SystemEvents
>> Many of those events do not have simple one-to-one counterparts on
>> Linux or anything besides Windows, because there is a greater variety
>> in how things are done, e.g. different desktop envirorments (or none
>> at all). Several of the things you mention can probably be detected
>> from GNOME or KDE respectively (to give just two examples). "Time
>> changed" should probably be detected below the layer of GNOME/KDE.
>> 2012/12/25 <mabra at manfbraun.de>:
>>> Hi All !
>>> Just trying to port some C# proggis from Windows to Linux. Astoundingly,
>>> they fail miserably ...
>>> I found, that all Win32.SystemEvents are not working. I have had a look
>>> to the API status page and saw TODO ...
>>> Can someone probably tell me, what I can expect ??
>>> I am a linux beginner and I am unable to port this by myself.
>>> Are there any examples, which shows alternatives for:
>>> - user prefs changed
>>> - time changed
>>> - logoff
>>> - shutdown
>>> Any help would really be very great!
>>> Best regards,
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list