|  | 
| Previous | Next | 
The AddScript method adds a script, consisting of type and command strings, and a specific time, to the header section of the Windows Media file.
Syntax
HRESULT AddScript(
  WCHAR*  pwszType,
  WCHAR*  pwszCommand,
  QWORD  cnsScriptTime
);
Parameters
pwszType
[in] Pointer to a wide-character NULL-terminated string containing the type.
pwszCommand
[in] Pointer to a wide-character NULL-terminated string containing the command.
cnsScriptTime
[in] Specifies the script time in 100-nanosecond increments.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
| Return code | Meaning | 
| NS_E_INVALID_STATE | The writer is not in a configurable state. | 
| E_UNEXPECTED | The method failed for an unspecified reason. | 
Remarks
Before BeginWriting has been called, the writer only supports AddScript. The reader does not support AddScript, and always returns E_NOTIMPL.
See Also
| Previous | Next |