Skip to content

Latest commit

 

History

History
144 lines (112 loc) · 4.02 KB

nf-wdfpdo-wdfpdomarkmissing.md

File metadata and controls

144 lines (112 loc) · 4.02 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:wdfpdo.WdfPdoMarkMissing
WdfPdoMarkMissing function (wdfpdo.h)
The WdfPdoMarkMissing method informs the framework that a device is no longer accessible.
wdf\wdfpdomarkmissing.htm
wdf
02/26/2018
WdfPdoMarkMissing function
DFDeviceObjectFdoPdoRef_a4198313-bd10-4b8a-a032-f253cdaccc7b.xml, WdfPdoMarkMissing, WdfPdoMarkMissing method, kmdf.wdfpdomarkmissing, wdf.wdfpdomarkmissing, wdfpdo/WdfPdoMarkMissing
wdfpdo.h
Wdf.h
Universal
1.0
DriverCreate, KmdfIrql, KmdfIrql2
Wdf01000.sys (see Framework Library Versioning.)
<= DISPATCH_LEVEL
Windows
WdfPdoMarkMissing
wdfpdo/WdfPdoMarkMissing
APIRef
kbSyntax
LibDef
Wdf01000.sys
Wdf01000.sys.dll
WdfPdoMarkMissing

WdfPdoMarkMissing function

-description

[Applies to KMDF only]

The WdfPdoMarkMissing method informs the framework that a device is no longer accessible.

-parameters

-param Device [in]

A handle to a framework device object that represents the device's physical device object (PDO).

-returns

If the operation succeeds, the function returns STATUS_SUCCESS. Additional return values include:

Return code Description
STATUS_INVALID_PARAMETER
The Device handle does not represent a PDO.
STATUS_NO_SUCH_DEVICE
The device object could not be found.
 

The method might also return other NTSTATUS values.

A system bug check occurs if the driver supplies an invalid object handle.

-remarks

For more information about WdfPdoMarkMissing, see Static Enumeration.

Examples

The following code example searches a list of child devices to find one that matches a specified serial number. When the example finds the correct child, it calls WdfPdoMarkMissing to indicate that the child is not accessible. This example was taken from the Toaster sample bus driver and simplified.

WDFDEVICE  hChild = NULL;
NTSTATUS  status = STATUS_INVALID_PARAMETER;
BOOLEAN  found = FALSE;
PPDO_DEVICE_DATA  pdoData;

WdfFdoLockStaticChildListForIteration(Device);

while ((hChild = WdfFdoRetrieveNextStaticChild(
                                               Device, 
                                               hChild,
                                               WdfRetrieveAddedChildren
                                               )) != NULL) {
    pdoData = PdoGetData(hChild);  // Device object context space
    if (SerialNo == pdoData->SerialNo) {
        status = WdfPdoMarkMissing(hChild);
        if(!NT_SUCCESS(status)) {
            KdPrint(("WdfPdoMarkMissing failed 0x%x\n", status));
            break;
        }
        found = TRUE;
        break;
    }
}
WdfFdoUnlockStaticChildListFromIteration(Device);

-see-also

WdfFdoLockStaticChildListForIteration

WdfFdoRetrieveNextStaticChild

WdfFdoUnlockStaticChildListFromIteration