Windows Media Format SDK banner art
PreviousNext

To Read Windows Media Files

  1. Create an IWMReader object.

  2. Call Open with a URL (possibly a local file name) and a user-supplied callback. After Open is completed, the file is opened and parsed. This interface uses QueryInterface to access the IWMHeaderInfo, IWMProfile and IWMReaderAdvanced interfaces. Open is an asynchronous call; it returns almost immediately (if the URL is valid), and the user should wait for appropriate OnStatus calls to be sent to the callback.  The Open method returns the WMT_OPENED status message to the callback.

  3. Call GetOutputCount and GetOutputProps to get the format for each output.

  4. Call Start. Status messages and samples will then begin arriving in the callback function.

  5. Continue with any combination of the methods Start, Stop, and Pause until the reading and writing operations are finished.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.