Поделиться через


IMediaEvent::FreeEventParams

 
Microsoft DirectShow 9.0

IMediaEvent::FreeEventParams

The FreeEventParams method frees resources associated with the parameters of an event.

Syntax

  HRESULT FreeEventParams(
  long lEventCode,
  LONG_PTR lParam1,
  LONG_PTR lParam2
);

Parameters

lEventCode

[in] Event code.

lParam1

[in] First event parameter.

lParam2

[in] Second event parameter.

Return Values

Returns S_OK.

Remarks

After you call the IMediaEvent::GetEvent method to retrieve an event notification, you must call FreeEventParams. This method frees any resources that were allocated for the event parameters. Pass in the same variables used for the GetEvent call.

Example Code

hr = pEvent->GetEvent(&evCode, &param1, &param2, 0);
// Handle the event (not shown). 
hr = pEvent->FreeEventParams(evCode, param1, param2);

Requirements

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

Library: Use Strmiids.lib.

See Also