共用方式為


GattReadRequest.StateChanged 事件

定義

這是讀取要求狀態變更時所觸發的事件。

// Register
event_token StateChanged(TypedEventHandler<GattReadRequest, GattRequestStateChangedEventArgs const&> const& handler) const;

// Revoke with event_token
void StateChanged(event_token const* cookie) const;

// Revoke with event_revoker
GattReadRequest::StateChanged_revoker StateChanged(auto_revoke_t, TypedEventHandler<GattReadRequest, GattRequestStateChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<GattReadRequest,GattRequestStateChangedEventArgs> StateChanged;
function onStateChanged(eventArgs) { /* Your code */ }
gattReadRequest.addEventListener("statechanged", onStateChanged);
gattReadRequest.removeEventListener("statechanged", onStateChanged);
- or -
gattReadRequest.onstatechanged = onStateChanged;
Public Custom Event StateChanged As TypedEventHandler(Of GattReadRequest, GattRequestStateChangedEventArgs) 

事件類型

Windows 需求

應用程式功能
bluetooth

適用於