Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IMFReadWriteClassFactory::CreateInstanceFromURL method

Creates an instance of the sink writer or source reader, given a URL.

Syntax


HRESULT CreateInstanceFromURL(
  [in]  REFCLSID      clsid,
  [in]  LPCWSTR       *pwszURL,
  [in]  IMFAttributes pAttributes,
  [in]  REFIID        riid,
  [out] LPVOID        *ppvObject
);

Parameters

clsid [in]

The CLSID of the object to create.

ValueMeaning
CLSID_MFSinkWriter

Create the sink writer. The ppvObject parameter receives an IMFSinkWriter interface pointer.

CLSID_MFSourceReader

Create the source reader. The ppvObject parameter receives an IMFSourceReader interface pointer.

 

pwszURL [in]

A null-terminated string that contains a URL. If clsid is CLSID_MFSinkWriter, the URL specifies the name of the output file. The sink writer creates a new file with this name. If clsid is CLSID_MFSourceReader, the URL specifies the input file for the source reader.

pAttributes [in]

A pointer to the IMFAttributes interface. You can use this parameter to configure the sink writer or source reader. For more information, see the following topics:

This parameter can be NULL.

riid [in]

The IID of the requested interface.

ppvObject [out]

Receives a pointer to the requested interface. The caller must release the interface.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This interface is available on Windows Vista if Platform Update Supplement for Windows Vista is installed.

Requirements

Minimum supported client

Windows 7, Windows Vista and Platform Update Supplement for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

Mfreadwrite.h

See also

IMFReadWriteClassFactory

 

 

Show:
© 2017 Microsoft