Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The SetDVDDirectory method sets the DVD drive that the DVD Navigator filter will read from.
Syntax
HRESULT SetDVDDirectory(
[in] LPCWSTR pszwPath
);
Parameters
[in] pszwPath
Pointer to a wide-character string that specifies the path of the root directory.
Return value
Returns one of the following values.
| Return code | Description |
|---|---|
|
Success. |
|
The pszwPath parameter points to an invalid DVD path, or a DVD drive is not found while enumerating. |
|
The DVD Navigator is not initialized. |
|
Invalid domain. For details, see Remarks. |
Remarks
If pszwPath is NULL, the DVD Navigator tries to select a DVD volume on any available drive. On startup, the DVD Navigator automatically looks for a drive, starting at drive C, with a VIDEO_TS folder in the root folder. It is therefore only necessary to call SetDVDDirectory when you have more than one DVD drive on a machine, or if your DVD drive letter is A or B. When specifying the path, include the video_ts folder.
| C++ |
|---|
SetDVDDirectory(L"e:\\video_ts"); |
| C++ |
|---|
SetDVDDirectory(L"d:\\webdvd\\hidden"); |
SetDVDDirectory returns, you must set the DVD_ResetOnStop flag in IDvdControl2::SetOption to TRUE and stop the filter graph through a call to IMediaControl::Stop on the Filter Graph Manager. If DVD_ResetOnStop is set to FALSE, then SetDVDDirectory returns VFW_E_DVD_INVALIDDOMAIN.
This method is demonstrated in the DVDSample application in CDvdCore::SetDirectory.
The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.
| Annex J Command Name | Valid Domains |
| None | DVD_DOMAIN_Stop |
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows XP [desktop apps only] |
| Minimum supported server | Windows Server 2003 [desktop apps only] |
| Target Platform | Windows |
| Header | strmif.h (include Dshow.h) |
| Library | Strmiids.lib |