Alireza
Wed Mar 03 13:20:27 CST 2004
> What about the 'Cancelled' boolean returned by NdisMCancelTimer()? Do
> you check its value?
Apparently he gets this ASSERT -in- the call to Cancel routine.
-ali
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Stephan Wolf" <stewo68@hotmail.com> wrote in message
news:6e8a2a95.0403030521.189d8ee0@posting.google.com...
> What about the 'Cancelled' boolean returned by NdisMCancelTimer()? Do
> you check its value?
>
> If it is FALSE, the timer could not be stopped, which leads to serious
> problems if you do not take appropriate action (e.g. active wait
> (loop) until your timer callback has terminated - actually a *real*
> problem because there is no way to guarantee this from a driver, see
> e.g.
http://www.google.com/groups?selm=3c028392.511645%40news.t-online.de).
>
> Stephan
> ---
> paochen_paul@hotmail.com (Paul Simon) wrote in message
news:<4d62e692.0402270157.533edcb3@posting.google.com>...
> > In the MiniprotHalt routine, I have to cancel timer queue
> > which I have set with NdisSetTimer and NdisInitializeTimer
> > at Miniport InitializeHandler. When I called *NdisMCancelTimer*,
> > I got an assertion failed.
> >
> > *** Assertion failed: ((Timer)->Header.Type == TimerNotificationObject)
> > || ((Timer)->Header.Type == TimerSynchronizationObject)
> > *** Source File: D:\nt\private\ntos\ke\timerobj.c, line 186
> >
> > The code
> > VOID MPHalt(
> > IN NDIS_HANDLE MiniportAdapterContext)
> > {
> > PMP_ADAPTER Adapter = (PMP_ADAPTER) MiniportAdapterContext;
> > ...
> > // Cancel pending timers
> > NdisMCancelTimer(&Adapter->Timer, &Cancelled);
> > ...
> > }
> >
> > Could you give me any suggestions or clues, thank in advance.