Re: Waitable Timers
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Sun, 18 Dec 2005 10:02:44 -0800
Are you calling OpenWaitableTimer in the same process? If different process,
is it running under the same user login? If the same process, what's the
point of using named objects?
By the way, AVOID using casts on callback function pointers. It may hide
your errors.
"Gary" <debugger@xxxxxxxxxxxxxxxx> wrote in message
news:%Ufpf.3$cL4.103@xxxxxxxxxxxxxxxxxx
> Hello Experts,
> Am doing the following :
>
> tmr = CreateWaitableTimer(NULL,TRUE,timername);
> /* The handle value in tmr looks fine. Now.... */
> retopen = OpenWaitableTimer(NULL, FALSE, timername);
>
> The value of retopen is NULL handle. Why is that ???
> At that time
> LastErrorValue: 5 ( Invalid Handle )
> LastStatusValue: c0000022 ( Access Denied )
>
>
> Now when I do a :
> SetWaitableTimer( tmr, &liDueTime,0, (PTIMERAPCROUTINE)func1,NULL, 0);
>
> The above goes fine with no issues. But then again, if I used that handle
> to do a WaitForMultipleObjectsEx() on the timer handle, then also I fail
> with the same above errors. The above happens even if I used un-named
> timers too.
>
> Please let me know what would I be missing on.
>
> Thanks,
> Gary.
>
.
- Follow-Ups:
- Re: Waitable Timers
- From: Scherbina Vladimir
- Re: Waitable Timers
- References:
- Waitable Timers
- From: Gary
- Waitable Timers
- Prev by Date: Re: Get Windows Logon User from inside a windows service
- Next by Date: Re: Waitable Timers
- Previous by thread: Waitable Timers
- Next by thread: Re: Waitable Timers
- Index(es):