Freigeben über


IAMResourceControl::Reserve

 
Microsoft DirectShow 9.0

IAMResourceControl::Reserve

The Reserve method reserves or unreserves a device resource.

Syntax

  HRESULT Reserve(
  DWORD dwFlags,
  PVOID pvReserved
);

Parameters

dwFlags

[in] Flag indicating whether to reserve or unreserve this device. The value must be a member of the AMRESCTL_RESERVEFLAGS enumeration.

pvReserved

[in] Must be NULL.

Return Values

Returns S_OK if the device was successfully reserved or unreserved, S_FALSE if the device is currently reserved and will continue to be held, or an HRESULT error code if the device can't be reserved.

Remarks

A resource can be reserved multiple times. If the method returns S_OK, the filter increments an internal reserve count. For every call to reserve a device that returns S_OK, the caller must make a matching call to unreserve the device.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also