PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework CeSetUserNotificationEx question

Reply

CeSetUserNotificationEx question

 
Thread Tools Rate Thread
Old 18-04-2008, 04:20 PM   #1
vkoser
Guest
 
Posts: n/a
Default CeSetUserNotificationEx question


I think I have pinvoke of CeSetUserNotificationEx working.

I'm not understanding how to intercept this though once its setup.
I'm trying to setup the notification to happen 3 minutes after Now and
I believe I'm creating the event correctly.

What I'm not understanding is how can I get my application to
intercept this notification then do some actions when it happens. The
problem I'm trying to get around is doing some periodic operation when
the device is in suspend mode. I just need to wake up for a second
check the current power state, do some operations then return the
power state. If call the below function 3 minutes into the future,
how can i intercept what is created?

Thanks for any help this type of thing is a little out of my area of
normal programming so I'm struggling a little bit.

private unsafe IntPtr AddJob( SystemTime st, string AppName,
string Args)
{
CE_NOTIFICATION_TRIGGER nt = new
CE_NOTIFICATION_TRIGGER();
CE_USER_NOTIFICATION un = new CE_USER_NOTIFICATION();
IntPtr h;

string dialogTextTest = "This is a test";
char* dialogText = dialogTextTest.ToCharArray();

fixed (char* pAppName = AppName.ToCharArray())
{
fixed (char* pArgs = Args.ToCharArray())
{
nt.Size = (UInt32)Marshal.SizeOf(nt);
nt.Type = 2;
nt.pAppName = pAppName;
nt.pArgs = pArgs;
nt.StartTime = st;
un.DialogText = dialogText;
h = CeSetUserNotificationEx(IntPtr.Zero, nt, un);
}
}
return h;
}
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off