Windows Driver Kit: User-Mode Driver Framework
IWDFIoRequest::GetFileObject
The GetFileObject method retrieves the file object that is associated with an I/O request.
void
GetFileObject(
OUT IWDFFile** ppFileObject
);
Parameters
- ppFileObject
- A pointer to a buffer that receives a pointer to the IWDFFile interface for the file object. Note that returning NULL is valid.
Return Value
None
Example
The following code example verifies if a request's file object matches the file object that the caller provides and, if so, performs cleanup processing for the request:
IWDFIoRequest request;
IWDFFile *MatchFile;
IWDFFile *fxFile;
request->GetFileObject(&fxFile);
if (MatchFile == fxFile) {
Device->CancelRequest(request, TRUE);
}
Requirements
Headers: Declared in Wudfddi.h. Include Wudfddi.h.
See Also
IWDFFile
APIScan Requirements
Header: Wudfddi.h
Function: IWDFIoRequest::GetFileObject