IDirectMusicScript8::GetVariableNumber

DirectMusic

Microsoft DirectX 9.0 SDK Update (Summer 2004)

IDirectMusicScript8::GetVariableNumber

The GetVariableNumber method retrieves a 32-bit signed value from a variable declared in the script.

Syntax

HRESULT GetVariableNumber(
  WCHAR *pwszVariableName,
  LONG *plValue,
  DMUS_SCRIPT_ERRORINFO *pErrInfo
);

Parameters

pwszVariableName

Name of the script variable.

plValue

Address of a variable that receives the value.

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:

Return code Description
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:

Return code
DISP_E_TYPEMISMATCH (See Winerror.h.)
DMUS_E_NOT_INIT
DMUS_E_SCRIPT_VARIABLE_NOT_FOUND
E_POINTER

Requirements

  Header: Declared in dmusici.h.

See Also


© 2004 Microsoft Corporation. All rights reserved.