Microsoft DirectX 8.0 (C++) |
Retrieves the name of a routine in a script. This method might be used by music-authoring applications that need to enumerate all routines in a script.
HRESULT EnumRoutine( DWORD dwIndex, WCHAR *pwszName );
If the method succeeds, one of the following success codes is returned:
S_OK | The routine was enumerated. |
S_FALSE | There is no routine with the supplied index value. |
DMUS_S_GARBAGE_COLLECTED | See Garbage Collection. |
DMUS_S_STRING_TRUNCATED | The name is longer than MAX_PATH. |
If the method fails, return values can include the following:
DMUS_E_NOT_INIT |
E_POINTER |
The following example, where pScript is a valid IDirectMusicScript8 interface pointer, displays the indexes and names of all routines in the script:
WCHAR wszRoutineName[MAX_PATH]; int i = 0; while (S_OK == pScript->EnumRoutine(i++, wszRoutineName)) printf("Routine number %d is called %S\n", i, wszRoutineName);
Header: Declared in dmusici.h.