Share via


IDSF::DeleteState Method

The DeleteState method deletes the public state of the driver that the specified GUID specifies.

Syntax

HRESULT DeleteState(
  [in]  DSFStateType Type,
  [in]  BSTR Guid
);

Parameters

  • Type [in]
    The type of state to delete.

  • Guid [in]
    The GUID of the driver whose state is to be deleted.

Return Value

DeleteState returns S_OK if the public state is deleted or E_INVALIDARG if the Type value is not a valid DSFDefaultStateType.

This method can also return a standard COM return value.

Remarks

Currently, DSF supports only DSFDefaultStateType as the state type.

Examples

The following C++ code example shows you how to delete the public state that is associated with a known driver.

HRESULT CMyDevice::DeleteSaveState(BSTR bstrGuid)
{
 DSFStateType Type  = DSFDefaultStateType;
      HRESULT         hr       = S_OK;

     //Delete the saved state for this device
 hr = m_piDSFObject->DeleteState(Type, bstrGuid);

 return hr;
}

Requirements

Header

DSFif.h

See Also

IDSF

IDSF:ReadState

IDSF:WriteState

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010