Re: Waitable Timers
- From: "Scherbina Vladimir" <vladimir.scherbina@xxxxxxxxx>
- Date: Sun, 18 Dec 2005 20:56:34 +0200
If he creates timer in another process then he should care about security.
Especially when this process is system. I've met a situation when created
mutexes (and other objects) under winlogon.exe (winlogon notifcation
package) could not be opened from another process because of security
issues. SetSecurityInfo with GRANT_ACCESS solves this problem.
--
Vladimir
"Alexander Grigoriev" <alegr@xxxxxxxxxxxxx> wrote in message
news:u4dCD1$AGHA.744@xxxxxxxxxxxxxxxxxxxxxxx
> 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: Gary
- Re: Waitable Timers
- References:
- Waitable Timers
- From: Gary
- Re: Waitable Timers
- From: Alexander Grigoriev
- Waitable Timers
- Prev by Date: Re: Waitable Timers
- Next by Date: Re: Waitable Timers
- Previous by thread: Re: Waitable Timers
- Next by thread: Re: Waitable Timers
- Index(es):
Relevant Pages
|