Microsoft DirectX 8.0 (C++)

IDirectMusicScript8::GetVariableObject

Retrieves an object pointer from a variable declared in the script.

HRESULT GetVariableObject(
  WCHAR *pwszVariableName,
  REFIID riid,
  LPVOID FAR *ppv,
  DMUS_SCRIPT_ERRORINFO *pErrInfo
);

Parameters

pwszVariableName
Name of the script variable.
riid
Unique identifier of the interface. See the IID defines in Dmusici.h. All the standard interfaces have a defined identifier consisting of "IID_" plus the name of the interface. For example, the identifier of IDirectMusicTrack8 is IID_IDirectMusicTrack8.
ppv
Address of a variable that receives a pointer to the desired interface of the 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.

Return Values

If the method succeeds, one of the following success codes is returned:

S_OK The value was retrieved.
S_FALSE The variable does not exist in the script.
DMUS_S_GARBAGE_COLLECTED See Garbage Collection.

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

DMUS_E_NOT_INIT
DMUS_E_SCRIPT_VARIABLE_NOT_FOUND
E_NOINTERFACE
E_POINTER

Requirements

  Header: Declared in dmusici.h.

See Also

IDirectMusicScript8::SetVariableObject