| Microsoft DirectX 9.0 SDK Update (October 2004) | 
The Init method associates the script with the performance that will play the sounds.
Syntax
HRESULT Init(
  IDirectMusicPerformance* pPerformance,
  DMUS_SCRIPT_ERRORINFO* pErrInfo
);Parameters
pPerformance
Address of the IDirectMusicPerformance8 interface of the performance object.
pErrInfo
Address of a DMUS_SCRIPT_ERRORINFO structure that receives information if an error occurs. Set this member to NULL if you do not want error information.
Requirements
  Header: Dmusici.h
  Library: Dmscript.dll, Dscripd.dll
Return Values
If the method succeeds, one of the following success codes is returned:
| Return code | Description | 
| S_OK | The script was initialized. | 
| S_FALSE | The script has already been attached to a different performance. | 
| DMUS_S_GARBAGE_COLLECTED | See Garbage Collection. | 
If the method fails, return values can include the following:
| Return code | 
| DMUS_E_NOT_INIT | 
| DMUS_E_SCRIPT_CONTENT_READONLY | 
| DMUS_E_SCRIPT_ERROR_IN_SCRIPT | 
| DMUS_E_SCRIPT_VARIABLE_NOT_FOUND | 
| E_POINTER | 
| E_NOINTERFACE | 
See Also