Hi Devs,
In WinCE my Ndis Virtual NIC Miniport driver (it’s a
Serialized driver) throws an exception when
NdisMIndicateReceivePacket is called, with the
following msg.
Coredll: DEBUGCHK failed in file
d:\cedar\private\winceos\coreos\core\dll\noprof..\cscode.c
at line 110
I managed to get the cscode.c file from microsoft
site.
The exception occurs when the following line is
excecuted.
<OwnerThread == hTh);>>
Give below is the excerpt from that file.
----------------------------------------------
/* If fastpath, adjust critical section, else trap to
kernel for rescheduling /
/
@doc BOTH EXTERNAL
@func VOID | LeaveCriticalSection | Releases
ownership of the specified critical
section object.
@parm LPCRITICAL_SECTION | lpcsCriticalSection |
address of critical section object
@comm Follows the Win32 reference description without
restrictions or modifications.
*/
VOID WINAPI LeaveCriticalSection(LPCRITICAL_SECTION
lpcs) {
HANDLE hTh = UCurThread();
volatile CRITICAL_SECTION vpcs = lpcs;
/ Check for leave without enter /
DEBUGCHK(vpcs->OwnerThread == hTh);
if (vpcs->OwnerThread != hTh)
return;
if (vpcs->LockCount != 1)
vpcs->LockCount–; / Simply decrement count if more
than 1 */
else {
vpcs->OwnerThread = (HANDLE)((DWORD)hTh | 1);
if (vpcs->needtrap)
LeaveCritSec(lpcs);
else
InterlockedTestExchange((PLONG)&vpcs->OwnerThread,
(DWORD)hTh | 1, 0L);
}
}
-----------------------------------------------------
My driver is a Virtual NIC so the receive indications
do not come from Ndis Context.
Any one any suggestion to overcome this problem ?
Thanx in advance
ME
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com