Microsoft DirectX 8.1 (C++)

IDirectMusicScript8::CallRoutine

The CallRoutine method executes a routine in the script.

Syntax

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 those in the following table.

Return code
DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE
DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR
DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR
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.

See Also

IDirectMusicScript8