Removing WMI Support From the NDIS Miniport Driver Object Identifier Functions (Windows Embedded CE 6.0)

1/6/2010

After you modify the NDIS miniport driver send and receive functions, modify the NDIS miniport driver object identifier functions.

To remove WMI support from the NDIS miniport driver object identifier functions

  1. In %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport, open Mp_req.c.

  2. Exclude E100_wmi.h from the Windows Embedded CE NDIS miniport driver build.

    The following code example shows how to exclude E100_wmi.h from the Windows Embedded CE build.

    #ifndef UNDER_CE
    #include "e100_wmi.h"
    #endif
    
  3. Exclude the NICGuidList initialization from Windows Embedded CE build.

    The following table shows how to exclude the NICGuidList initialization from the Windows Embedded CE build.

    #ifndef UNDER_CE    //  No WMI support in CE.
    //
    // WMI support
    // check out the e100.mof file for examples of how the below
    // maps into a .mof file for external advertisement of GUIDs
    //
    #define NIC_NUM_CUSTOM_GUIDS  4       
    
    static const NDIS_GUID NICGuidList[NIC_NUM_CUSTOM_GUIDS] = {
        { // {F4A80276-23B7-11d1-9ED9-00A0C9010057} example of a uint set
            E100BExampleSetUINT_OIDGuid,
            OID_CUSTOM_DRIVER_SET,
            sizeof(ULONG),
            // Not setting fNDIS_GUID_ALLOW_WRITE flag means that we don't allow
            // users without administrator privilege to set this value, but we do 
            // allow any user to query this value
            (fNDIS_GUID_TO_OID | fNDIS_GUID_ALLOW_READ)
        },
        { // {F4A80277-23B7-11d1-9ED9-00A0C9010057} example of a uint query
            E100BExampleQueryUINT_OIDGuid,
                OID_CUSTOM_DRIVER_QUERY,
                sizeof(ULONG),
                // setting fNDIS_GUID_ALLOW_READ flag means that we allow any
                // user to query this value.
                (fNDIS_GUID_TO_OID | fNDIS_GUID_ALLOW_READ)
        },
        { // {F4A80278-23B7-11d1-9ED9-00A0C9010057} example of an array query
            E100BExampleQueryArrayOIDGuid,
                OID_CUSTOM_ARRAY,
                sizeof(UCHAR),  // size is size of each element in the array
                // setting fNDIS_GUID_ALLOW_READ flag means that we allow any
                // user to query this value.
                (fNDIS_GUID_TO_OID|fNDIS_GUID_ARRAY | fNDIS_GUID_ALLOW_READ)
        },
        { // {F4A80279-23B7-11d1-9ED9-00A0C9010057} example of a string query
            E100BExampleQueryStringOIDGuid,
                OID_CUSTOM_STRING,
                (ULONG) -1, // size is -1 for ANSI or NDIS_STRING string types
                // setting fNDIS_GUID_ALLOW_READ flag means that we allow any
                // user to query this value.
                (fNDIS_GUID_TO_OID|fNDIS_GUID_ANSI_STRING | fNDIS_GUID_ALLOW_READ)
        }
    };
    #endif  //  UNDER_CE
    
  4. From the IDE Build menu, choose Open Build Release Directory.

  5. Navigate to the directory containing your Windows Embedded CE NDIS miniport driver.

    Be sure your NDIS miniport driver is in %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport.

  6. Build the Windows Embedded CE NDIS miniport driver with the Build tool.

    For more information about the Build tool, see Build Tool. Microsoft recommends using the -c parameter with the Build tool to delete all object files.

See Also

Tasks

How to Migrate a Windows-based Desktop NDIS Miniport Driver to Windows Embedded CE