IDirectInputEffect::Initialize
Initializes a DirectInputEffect object.
HRESULT Initialize(
HINSTANCE hinst,
DWORD dwVersion,
REFGUID rguid
);
Parameters
- hinst
- Instance handle to the application or 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
- Reference to (C++) or address of (C) the 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 Values
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.
The IDirectInputDevice8::CreateEffect method automatically initializes the effect after creating it. Applications normally do not need to call the Initialize method.
Requirements
Windows NT/2000/XP: Requires Windows® 2000.
Windows 98/Me: Requires Windows 98 or later. Available as a redistributable for Windows 98.
Header: Declared in Dinput.h.