IFileSinkFilter Interface

Interface methods:

HRESULT SetFileName(LPCOLESTR pszFileName, const AM_MEDIA_TYPE * pmt)

Parameters

pszFileName

Pointer to a string that contains the name of the file to receive the media samples, as an OLESTR type.

pmt

Pointer to an AM_MEDIA_TYPE structure that indicates the type of media samples to be written to the file and the media type of the sink filter's input pin. This parameter is ignored and is provided only for compatibility. Always pass NULL.

 

Description

Sets the name of the output DICOM file. If pszFileName does not exist, a file by that name will be created. If pszFileName currently exists, the existing file will be overwritten. For more information, refer to the DirectShow 9.0  IFileSinkFilter::SetFileName and AM_MEDIA_TYPE documentation in the DirectX documentation on MSDN (http://windowssdk.msdn.microsoft.com/library/).

Returns

ERROR_FILENAME_EXCED_RANGE

The file name is longer than 260 characters, so the name cannot be set.

S_FALSE

The filter is in the streaming state, so the name cannot be set.

E_POINTER

pszFileName is NULL, so the name cannot be set.

S_OK

Success.

 

 

HRESULT GetCurFile (LPOLESTR * ppszFileName, AM_MEDIA_TYPE * pmt)

Parameters

ppszFileName

Address of a pointer to a string to be updated with the name of the current file receiving the media samples, as an OLESTR type. The method allocates the memory for the string returned in ppszFileName. The caller must free it by calling CoTaskMemFree.

pmt

Pointer to an AM_MEDIA_TYPE structure to be updated with the type of media samples being written to the file. This parameter can be NULL, in which case the method does not return the media type. If the filter’s input pin is not connected this variable will not be updated. If this method succeeds the caller must free the memory allocated for the structure by calling the FreeMediaType function in the base DirectShow class library.

  

Description

Gets the name of the current file along with its media type information. For more information, refer to the DirectShow 9.0  IFileSinkFilter::GetCurFile and AM_MEDIA_TYPE documentation in the DirectX documentation on MSDN (http://windowssdk.msdn.microsoft.com/library/).

Return

E_OUTOFMEMORY

Insufficient memory.

E_FAIL

No file is open.

E_POINTER

ppszFileName is NULL.

S_OK

Success.

See Also

LEAD DICOM Writer (2.0)

Introduction to the LEAD DICOM Writer

ILTDicWrt Interface

LEAD DICOM Writer User Interface (2.0)