This might be a bit of a forehead-slapper… it looks like you accidentally picked up the *miniport driver* characteristics, and not the *filter driver* characteristics.
NDIS_OBJECT_TYPE_MINIPORT_DRIVER_CHARACTERISTICS
should be
NDIS_OBJECT_TYPE_FILTER_DRIVER_CHARACTERISTICS
and similar for the other constants.
For a filter driver, only 4 handlers are actually mandatory: Attach/Detach, Pause/Restart. All others are optional. (However, there is an NDIS bug in Vista and Win7 that causes sub-optimal OID handling for a few specific OIDs if you do not provide an OidRequest handler, and you’re the top filter in a stack. Best to provide that one too.)
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@bemac.com
Sent: Friday, April 01, 2011 4:43 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] NDIS 6.20 filter Sample
Hi,
I have tried doing what you suggest, again, but I still get a 10005 error, Invalid characteristics when loading the filter driver, under Windows 7 32 bit o/s. The DDK I am using is 7600.16385.1. The O/S does not have to have SP1 on it?
The DDK states that on 6.20 that these are mandatory functions and cannot be null? but other docs say they are optional.
#if (NDIS_SUPPORT_NDIS61) || (NDIS_SUPPORT_NDIS620) #pragma message(“NDIS6.20 Support”)
// NDIS Version 6.2
FChars.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_DRIVER_CHARACTERISTICS;
FChars.Header.Size = NDIS_SIZEOF_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
FChars.Header.Revision = NDIS_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
#else
// NDIS Version 6.00
FChars.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_DRIVER_CHARACTERISTICS;
FChars.Header.Size = NDIS_SIZEOF_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_1;
FChars.Header.Revision = NDIS_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_1;
#endif
added
#if (NDIS_SUPPORT_NDIS61) || (NDIS_SUPPORT_NDIS620)
// required characteristics for NDIS 6.10 & 6.20
// default them to nothing
FChars.CancelDirectOidRequestHandler = NULL;
FChars.DirectOidRequestHandler = NULL;
FChars.DirectOidRequestCompleteHandler = NULL; #endif
Steve
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer