Sample Code

Windows Driver Samples/ Sample UMDF Filter above UMDF Function Driver for OSR USB-FX2 (UMDF Version 1)/ C++/ umdf_driver/ queue.h/

/*++

Copyright (c) Microsoft Corporation, All Rights Reserved

Module Name:

    queue.h

Abstract:

    This file defines the queue callback interface.

Environment:

    Windows User-Mode Driver Framework (WUDF)

--*/

#pragma once

//
// Queue Callback Object.
//

class CMyQueue : 
    public CUnknown
{
protected:    
    //
    // Unreferenced pointer to the partner Fx device.
    //

    IWDFIoQueue *m_FxQueue;

    //
    // Unreferenced pointer to the parent device.
    //

    PCMyDevice m_Device;

    HRESULT
    Initialize(
        _In_ WDF_IO_QUEUE_DISPATCH_TYPE DispatchType,
        _In_ bool Default,
        _In_ bool PowerManaged
        );

protected:

    CMyQueue(
        _In_ PCMyDevice Device
        );

    virtual ~CMyQueue();

    HRESULT
    Configure(
        VOID
        );

public:
    
    IWDFIoQueue *
    GetFxQueue(
        VOID
        )
    {
        return m_FxQueue;
    }


    PCMyDevice
    GetDevice(
        VOID
        )
    {
        return m_Device;
    }
    
    //
    // IUnknown
    //

    STDMETHOD_(ULONG,AddRef) (VOID) {return CUnknown::AddRef();}

    _At_(this, __drv_freesMem(object))
    STDMETHOD_(ULONG,Release) (VOID) {return CUnknown::Release();}

    STDMETHOD_(HRESULT, QueryInterface)(
        _In_ REFIID InterfaceId, 
        _Outptr_ PVOID *Object
        );
};

Our Services

  • What our customers say about us?

© 2011-2024 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS