Microsoft DirectX 9.0

RenderEngine.SetSourceNameValidation Method

The SetSourceNameValidation method specifies how the render engine validates file names.


    FilterString As String,
    pOverride As MediaLocator,
    Flags As Long



String containing pairs of filter strings formatted as required by the lpstrFilter member of the Microsoft® Win32® OPENFILENAME structure. The media locator uses this filter if it displays an Open dialog box.


Optional MediaLocator object to use in place of the default. To use the default media locator, set the value of this parameter to NULL. See Remarks for more information.


Bitwise combination of flags taken from the File Name Validation Flags, specifying the behavior of the MediaLocator object. The SFN_VALIDATEF_CHECK flag must be present. The SFN_VALIDATEF_IGNOREMUTED flag has no effect with this method.

Error Codes

If the method fails, an error is raised, and Err.Number can be set to the following value:

Value Description
E_MUST_INIT_RENDERER Render engine failed to initialize.


Using the pOverride parameter, you can supply your own custom implementation of the MediaLocator object.

Currently, this method does not validate dynamically loaded sources. See SetDynamicReconnectLevel.

See Also