Sample Code

Windows Driver Samples/ Power Framework (PoFx) Sample (UMDF Version 2)/ C++/ Driver/ SingleComp/ HwSim.h/

/*++

Copyright (c) Microsoft Corporation.  All rights reserved.

    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
    KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
    PURPOSE.

Module Name:

    HwSim.h

Abstract:
    Header file for the hardware simulation module of the UMDF2 sample driver for
    a single-component device.

Environment:

    User mode

--*/

#pragma once

NTSTATUS
HwSimInitialize(
    _In_ WDFDEVICE Device
    );
    
VOID
HwSimD0Entry(
    _In_ WDFDEVICE Device
    );
    
VOID
HwSimD0Exit(
    _In_ WDFDEVICE Device
    );

ULONG
HwSimReadComponent(
    _In_ WDFDEVICE Device
    );

//
// This structure represents the hardware simulation module's device context
// space
//
typedef struct _HWSIM_CONTEXT {
    //
    // The following member tracks whether or not the device is in D0
    //
    BOOLEAN DevicePoweredOn;

    //
    // The following member tracks whether or not we have previously entered the
    // D0 state for this device
    //
    BOOLEAN FirstD0Entry;
} HWSIM_CONTEXT, *PHWSIM_CONTEXT;

WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(HWSIM_CONTEXT, HwSimGetDeviceContext)

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