none
why OpenEvent will return NULL RRS feed

  • Question

  • Hi Everyone:

    i have a application and a service(which run on LocalSystem),the service will a Create a gloable Event, and App will Open this Event. It seems ok on NT/XP, but on vista, when App Open this Event, it will return handle NULL. this is why? Thanks

    Saturday, December 2, 2006 1:42 PM

Answers

  • The corresponding error code (from GetLastError() right after the failing OpenEvent) would be most useful in confirming this but:
    If it's 5, it's likely that the event is not ACLed properly so that it can be opened with the access required by the application (which probaly ran as admin on XP, and not anymore in Vista).
    If it's 2, it's likely that the application doesn't specify Global\ when calling OpenEvent (on XP, applications often run in session 0, and on Vista, they never do).

    Monday, December 4, 2006 11:16 PM

All replies

  • The corresponding error code (from GetLastError() right after the failing OpenEvent) would be most useful in confirming this but:
    If it's 5, it's likely that the event is not ACLed properly so that it can be opened with the access required by the application (which probaly ran as admin on XP, and not anymore in Vista).
    If it's 2, it's likely that the application doesn't specify Global\ when calling OpenEvent (on XP, applications often run in session 0, and on Vista, they never do).

    Monday, December 4, 2006 11:16 PM
  • Thanks, Yes, It seems that specify Global\ is ok...
    Wednesday, December 6, 2006 12:45 AM