Share via


IDSFDebug::SetObjectFlags Method

The SetObjectFlags method sets diagnostic flags for an object.

Syntax

HRESULT SetObjectFlags(
  [in]  DSFFlagType FlagType,
  [in]  unsigned long Flags
);

Parameters

  • FlagType [in]
    The type of flags to set.

  • Flags [in]
    The new value of flags for the specified type.

Return Value

SetObjectFlags returns one of the following values:

Return code Description
S_OK

The flags were updated correctly.

E_INVALIDARG

The FlagType parameter was not valid.

 

Remarks

Objects that support diagnostic settings by using IDSFDebug::SetObjectFlags document the possible values for the FlagType and Flags parameters.

Examples

The following C++ code example shows how to enable diagnostic output from a SoftUSBEndpoint object. The SoftUSBEndpoint object documents the values it supports for the FlagType and Flags parameters.

HRESULT SetEndpointDiagnostics(ISoftUSBEndpoint *piSoftUSBEndpoint)
{
    IDSFDebug *piDSFDebug = NULL;

    HRESULT hr = piSoftUSBEndpoint->QueryInterface(__uuidof(IDSFDebug),
                                                   reinterpret_cast<void **>(&piDSFDebug));
    if (SUCCEEDED(hr))
    {
        hr = piDSFDebug->SetObjectFlags((DSFFlagType)SOFTUSBENDPOINT_OBJECTFLAGS,
                                        SOFTUSBENDPOINT_TRACETRANSFERINPUTANDOUPUT);
        piDSFDebug->Release();
    }
    return hr;
}

The following VBScript code example shows how to enable diagnostic output from a SoftUSBEndpoint object.

Sub SetEndpointDiagnostics(SoftUSBEndpoint)
    const SOFTUSBENDPOINT_OBJECTFLAGS                = 100
    const SOFTUSBENDPOINT_TRACETRANSFERINPUTANDOUPUT = &H00000003
 
        SoftUSBEndpoint.SetObjectFlags SOFTUSBENDPOINT_OBJECTFLAGS,  SOFTUSBENDPOINT_TRACETRANSFERINPUTANDOUPUT
End Sub

Requirements

Header

DSFif.h

See Also

SoftUSBEndpoint

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010