EVT_ACX_OBJECT_PROCESS_EVENT_REQUEST funzione di callback (acxrequest.h)

Il callback EVT_ACX_OBJECT_PROCESS_EVENT_REQUEST viene usato dal driver per gestire le notifiche degli eventi.

Sintassi

EVT_ACX_OBJECT_PROCESS_EVENT_REQUEST EvtAcxObjectProcessEventRequest;

void EvtAcxObjectProcessEventRequest(
  ACXOBJECT Object,
  ACXEVENT Event,
  ACX_EVENT_VERB Verb,
  ACXEVENTDATA EventData,
  WDFREQUEST Request
)
{...}

Parametri

Object

Oggetto ACX associato alla richiesta.

Event

Oggetto ACXEVENT (descritto in Riepilogo degli oggetti ACX). Oggetto AcxEvent che rappresenta una notifica asincrona disponibile a livello di driver. Gli eventi possono essere aggiunti ad AcxCircuits, AcxStreams, AcxElements e AcxPins. Internamente vengono esposti come eventi KS ai livelli superiori.

Verb

Verbo dell'enumerazione ACX_EVENT_VERB che descrive il tipo di operazione.

EventData

Oggetto ACXEVENTDATA ACX facoltativo che fornisce informazioni sull'evento.

Request

Oggetto WDFREQUEST facoltativo associato a questa operazione.

Per altre informazioni sull'uso degli oggetti richiesta WDF, vedere Creazione di oggetti richiesta framework e intestazione wdfrequest.h.

Valore restituito

nessuno

Osservazioni

Esempio

Di seguito è riportato un esempio di utilizzo.


EVT_ACX_OBJECT_PROCESS_EVENT_REQUEST CodecR_EvtMuteElementChangeEventCallback;

...


VOID
CodecR_EvtMuteElementChangeEventCallback(
    _In_        ACXOBJECT       Object,
    _In_        ACXEVENT        Event,
    _In_        ACX_EVENT_VERB  Verb,
    _In_opt_    ACXEVENTDATA    EventData,
    _In_opt_    WDFREQUEST      Request
    )
{
    NTSTATUS                    status = STATUS_NOT_SUPPORTED;
    PCODEC_MUTE_ELEMENT_CONTEXT muteCtx = NULL;
    CODEC_MUTE_EVENT_CONTEXT *  muteEventCtx;
    
    PAGED_CODE();
    
    muteCtx = GetCodecMuteElementContext(Object);
    ASSERT(muteCtx);

    // for testing.
    muteEventCtx = GetCodecMuteEventContext(Event);
    ASSERT(muteEventCtx);

    //
    // Take the correct action: enable/disable.
    //
    switch (Verb)
    {
    case AcxEventVerbEnable:
        AcxEventAddEventData(Event, EventData);
        WdfTimerStart(muteEventCtx->Timer, WDF_REL_TIMEOUT_IN_MS(10));
        status = STATUS_SUCCESS;
        break;
        
    case AcxEventVerbBasicSupport:
        status = STATUS_SUCCESS;
        break;
        
    case AcxEventVerbDisable:
        ASSERT(Request == NULL);
        //
        // Verb is AcxEventVerbDisable;
        // It is ok to generate events even if no one is listening.
        // If present, ACX completes the request associated with this action.
        //
        break;
        
    default:
        ASSERT(FALSE);
        status = STATUS_INVALID_DEVICE_REQUEST;
        break;
    }

    if (Request != NULL)
    {
        WdfRequestComplete(Request, status); 
    }
}

Requisiti di ACX

Versione minima di ACX: 1.0

Per altre informazioni sulle versioni ACX, vedere La panoramica della versione di ACX.

Requisiti

Requisito Valore
Intestazione acxrequest.h
IRQL PASSIVE_LEVEL

Vedi anche

  • [acxrequest.h header] (index.md)