[DllImport("coredll.dll", EntryPoint="CeSetUserNotificationEx", SetLastError=true)]
private static extern int CeSetUserNotificationEx(int hNotification, byte[] lpTrigger, byte[] lpUserNotification);
[DllImport( "coredll.dll" )]
private static extern IntPtr CeSetUserNotificationEx( IntPtr notification, CE_NOTIFICATION_TRIGGER notificationTrigger, CE_USER_NOTIFICATION userNotification );
Declare Function CeSetUserNotificationEx Lib "coredll.dll" (TODO) As TODO
Do you know one? Please contribute it!
Taken from openNetCF in OpenNETCF.Win32.Notify
Please add some!
Start an Application in 5 minutes. (Even when the device is suspending)
string appName = "\\Application.exe";
string args= "";
System.DateTime dt = System.DateTime.Now.AddMinutes( 5 );
CE_NOTIFICATION_TRIGGER notificationTrigger = new CE_NOTIFICATION_TRIGGER();
notificationTrigger.Type = 2;
notificationTrigger.AppName = appName;
notificationTrigger.Args = args;
notificationTrigger.StartTime = new SYSTEMTIME( dt );
notificationTrigger.EndTime = new SYSTEMTIME();
notificationTrigger.Size = (UInt32)Marshal.SizeOf( notificationTrigger ); // This line needs the compile switch /unsafe
IntPtr notificationHandle = CeSetUserNotificationEx( IntPtr.Zero, notificationTrigger, null );