?/TD>
Microsoft DirectX 9.0

IDirectInputEffect::Initialize Method


Initializes a DirectInputEffect object.

Syntax

HRESULT Initialize(      

    HINSTANCE hinst,     DWORD dwVersion,     REFGUID rguid );

Parameters

hinst
Instance handle to the application or dynamic-link library (DLL) that is creating the DirectInputEffect object. Microsoft?DirectInput?uses this value to determine whether the application or DLL has been certified and to establish any special behaviors that might be necessary for backward compatibility. It is an error for a DLL to pass the handle to the parent application.
dwVersion
Version number of DirectInput for which the application is designed. This value is normally DIRECTINPUT_VERSION. Passing the version number of a previous version causes DirectInput to emulate that version.
rguid
Address of the globally unique identifier (GUID) identifying the effect with which the interface is associated. The IDirectInputDevice8::EnumEffects method can be used to determine which effect GUIDs are supported by the device.

Return Value

If the method succeeds, the return value is DI_OK.

If the method fails, the return value can be DIERR_DEVICENOTREG.



Remarks

If this method fails, the underlying object should be considered to be an indeterminate state and needs to be reinitialized before it can be subsequently used.

If this method succeeds, all effect parameters will be invalid. You must call IDirectInputEffect::SetParameters before an effect can be downloaded or started.

The IDirectInputDevice8::CreateEffect method automatically initializes the effect after creating it. Applications normally do not need to call the IDirectInputEffect::Initialize method.



© 2002 Microsoft Corporation. All rights reserved.