Notify.SetUserNotification Error

  • Thread starter Thread starter Balch
  • Start date Start date
B

Balch

Does the SetUserNotification function in the SDF work for the
NetConnect event. I am trying to call it with the following code and
all I get is an exception:

UserNotificationTrigger trigger = new UserNotificationTrigger();
trigger.Application = m_app.AppFolder + "Loader.exe";
trigger.Arguments = "-NetConnect";
trigger.Type = NotificationType.Event;
trigger.Event = NotificationEvent.NetConnect;

UserNotification notification = new UserNotification();
notification.Action = 0;
int nConnEventHandle = Notify.SetUserNotification(trigger,
notification);


I can successfully call the Notify.SetUserNotification using similiar
code with a NotificationType of Time and with valid StartTime and
EndTime values.

Thank you for your help,

Balch
 
I guess I do not know what I need to do to get an expert to respond to
my inquiry. Has anyone else been able to use Notfy.SetUserNotification
with the NetConnect event successfully?

I am able to use CeRunAppAtEvent, but the SetUserNotification seems a
lot cleaner because it return a handle that can be used to query if the
event is set or not.
 
If anyone cares, I was able to call Notfy.SetUserNotification if I pass
in null for the second parameter.
 
Back
Top