Platform SDK: DirectX |
The IDirectInputDevice7::GetEffectInfo method can be used to retrieve information about the device's support for an effect whose GUID is known. It retrieves the same information that is returned in the DIEFFECTINFO structure during enumeration. For more information, see Effect Enumeration.
The following code example fetches information about an effect whose GUID is stored in the EffectGuid variable and determines whether the direction of the effect can be changed without stopping and restarting it:
DIEFFECTINFO diEffectInfo; diEffectInfo.dwSize = sizeof(DIEFFECTINFO); lpdid2->GetEffectInfo(&diEffectInfo, EffectGuid); if (diEffectInfo.dwDynamicParams & DIEP_DIRECTION) { // Can reset parameter dynamically }
In DirectX for Visual Basic, information about a supported effect must be obtained from the DirectInputEnumEffects enumeration object. See Effect Enumeration.
The following code example gets information about the first enumerated effect and determines whether the direction of the effect can be changed without stopping and restarting it:
' diEnumEffects is an initialized DirectInputEnumEffects object. Dim params As Long params = diEnumEffects.GetDynamicParams(1) If params And DIEP_DIRECTION Then Debug.Print "Direction is dynamic." End If