IDirectInputJoyConfig8::EnumTypes メソッド (dinputd.h)

IDirectInputJoyConfig8::EnumTypes メソッドは、DirectInput で現在サポートされているジョイスティックの種類を列挙します。 ジョイスティックの種類では、DirectInput がジョイスティック デバイスと通信する方法について説明します。 これには、各軸の存在と位置、デバイスでサポートされているボタンの数などの情報が含まれます。

構文

HRESULT EnumTypes(
  LPDIJOYTYPECALLBACK unnamedParam1,
  LPVOID              unnamedParam2
);

パラメーター

unnamedParam1

DirectInput ジョイスティックの種類を受け取るアプリケーション定義のコールバック関数を指します。 関数プロトタイプについては、「解説」セクションを参照してください。

unnamedParam2

コールバック関数に渡される 32 ビットのアプリケーション定義値を指定します。 この値には、任意の 32 ビット値を指定できます。便宜上、LPVOID としてプロトタイプ化されています。

戻り値

成功した場合はDI_OKを返します。それ以外の場合は、次のいずれかの COM エラー値を返します。

リターン コード 説明
DIERR_INVALIDPARAM
1 つ以上のパラメーターが無効でした。

注釈

このコールバックは、IDirectInputJoyConfig8::EnumTypes メソッドの呼び出しの結果として DirectInput ジョイスティック型を受け取ります。



/*
Parameters
pwszTypeName 
Points to the name of the joystick type. A buffer of MAX_JOYSTRING characters is sufficient to hold the type name. The type name should never be shown to the end user; instead, the "display name" should be shown. Use IDirectInputJoyConfig8::GetTypeInfo to obtain the display name of a joystick type. Type names that begin with a pound sign ("#") represent predefined types that cannot be modified or deleted. 

pvRef 
Points to the application-defined value given in the IDirectInputJoyConfig8::EnumTypes method.

Return value
Returns a BOOL value, DIENUM_CONTINUE, to continue the enumeration, or DIENUM_STOP to stop the enumeration. 

*/


BOOL DIEnumJoyTypeProc(
   LPCWSTR pwszTypeName,
   LPVOID  pvRef
);
 



要件

要件
対象プラットフォーム デスクトップ
Header dinputd.h (Dinputd.h を含む)