EVT_UFX_DEVICE_PORT_CHANGE コールバック関数 (ufxclient.h)
USB デバイスが接続されている新しいポートの種類を更新するクライアント ドライバーの実装。
構文
EVT_UFX_DEVICE_PORT_CHANGE EvtUfxDevicePortChange;
void EvtUfxDevicePortChange(
[in] UFXDEVICE unnamedParam1,
[in] USBFN_PORT_TYPE unnamedParam2
)
{...}
パラメーター
[in] unnamedParam1
UfxDeviceCreateへの以前の呼び出しでクライアント ドライバーが受信した USB デバイス オブジェクトへのハンドル。
[in] unnamedParam2
新しいポートの種類を示すUSBFN_PORT_STATE型指定されたフラグ。
戻り値
何一つ
備考
関数ホスト コントローラーのクライアント ドライバーは、UfxDeviceCreate メソッドを呼び出すことによって、EVT_UFX_DEVICE_PORT_CHANGE 実装を USB 関数クラス拡張 (UFX) に登録します。
UFX は、このイベント コールバックを呼び出して、デバイスの新しい状態についてクライアント ドライバーに通知します。
クライアント ドライバーは、UfxDeviceEventComplete メソッドを呼び出すことによって、このイベントの完了を示します。
例
EVT_UFX_DEVICE_PORT_CHANGE UfxDevice_EvtDevicePortChange;
VOID
UfxDevice_EvtDevicePortChange (
_In_ UFXDEVICE UfxDevice,
_In_ USBFN_PORT_TYPE NewPort
)
/*++
Routine Description:
EvtDevicePortChange handler for the UFXDEVICE object.
Caches the new port type, and stops or resumes idle as needed.
Arguments:
UfxDevice - UFXDEVICE object representing the device.
NewPort - New port type
--*/
{
NTSTATUS Status;
PUFXDEVICE_CONTEXT Context;
PAGED_CODE();
TraceEntry();
Context = UfxDeviceGetContext(UfxDevice);
TraceInformation("New PORT: %d", NewPort);
//
// #### TODO: Insert code to examine the device USB state and port type
// and determine if it needs to stop or resume idle.
UfxDeviceEventComplete(UfxDevice, STATUS_SUCCESS);
TraceExit();
}
必要条件
要件 | 価値 |
---|---|
ターゲット プラットフォーム の | ウィンドウズ |
最小 KMDF バージョン | 1.0 |
UMDF の最小バージョン を する | 2.0 |
ヘッダー | ufxclient.h |
IRQL | PASSIVE_LEVEL |
関連項目
UfxDeviceCreate の
UfxDeviceEventComplete の