IWDFIoRequest::SetInformation method

The SetInformation method sets the size of information for a request.

Syntax


void SetInformation(
  [in]  ULONG_PTR Information
);

Parameters

Information [in]

A ULONG_PTR value that specifies the size of information to set for the request.

Return value

None

Examples

The following code example sets the size of a request's information.


HRESULT
CUmdfHidFile::HandleGetCollectionInformation(
    __in IWDFIoRequest* WdfRequest
    )
{
    PHIDP_COLLECTION_DESC collectionDesc = m_Collection->GetCollectionDesc();
    HID_COLLECTION_INFORMATION collectionInfo;

    CComPtr<IWDFMemory> wdfMemory;

    HRESULT hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);

    collectionInfo.DescriptorSize = collectionDesc->PreparsedDataLength;
    collectionInfo.Polled = false;
    collectionInfo.Reserved1[0] = 0;
    collectionInfo.VendorID = 0;
    collectionInfo.ProductID = 0;
    collectionInfo.VersionNumber = 0;

    WdfRequest->GetOutputMemory(&wdfMemory);

    if (wdfMemory != NULL)
    {
        hr = wdfMemory->CopyFromBuffer(0, 
                                       &collectionInfo, 
                                       sizeof(collectionInfo));
    }

    if (SUCCEEDED(hr))
    {
        WdfRequest->SetInformation(sizeof(collectionInfo));
    }

    return hr;
}

Requirements

End of support

Unavailable in UMDF 2.0 and later.

Minimum UMDF version

1.5

Header

Wudfddi.h (include Wudfddi.h)

DLL

WUDFx.dll

See also

IWDFIoRequest

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.