Microsoft DirectX 8.0 (C++)

IDirectMusicScript8::CallRoutine

Executes a routine in the script.

HRESULT CallRoutine(
  WCHAR *pwszRoutineName,
  DMUS_SCRIPT_ERRORINFO *pErrInfo
);

Parameters

pwszRoutineName
Name of the routine.
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.

Return Values

If the method succeeds, the return value is S_OK or DMUS_S_GARBAGE_COLLECTED. See Garbage Collection.

If the method fails, return values can include the following:

DMUS_E_NOT_INIT
DMUS_E_SCRIPT_ERROR_IN_SCRIPT
DMUS_E_SCRIPT_ROUTINE_NOT_FOUND
E_POINTER

Remarks

Control does not return to the application until the routine finishes running.

Requirements

  Header: Declared in dmusici.h.