BthSetSecurityUI
This function allows an application to provide an event that will be signaled by the stack when a device without a PIN sends a PIN request.
int BthSetSecurityUI(
HANDLE hEvent,
DWORD dwStoreTimeout,
DWORD dwProcTimeout
);
Parameters
- hEvent
[in] The event handle. The event must be kept open. When hEvent=NULL, the handler is freed. - dwStoreTimeout
[in] The period of time, in msec, for which the PIN request is active (not refused) before it is read by BthGetPINRequest. - dwProcTimeout
[in] The period of time, in msec, for which PIN request is kept open after it has been retrieved if the shell responded with BthRefusePINRequest or BthSetPIN.
Return Values
This function returns ERROR_SUCCESS when it completes successfully.
A return value of ERROR_SERVICE_NOT_ACTIVE indicates that the hardware is not inserted or that the Bluetooth stack is not present.
A return value of ERROR_INVALID_PARAMETER indicates that time is either too short (<1000 msec) or too long (>600sec).
A return value of ERROR_ALREADY_ASSIGNED indicates that the event was already set by another application.
Other standard error codes may be returned as appropriate.
Remarks
This is intended for use by the shell to provide Bluetooth PIN code input dialog which is displayed when the PIN request comes from Bluetooth adapter. Only one application at a time can establish itself as the security UI handler. Until the application clears its status, by calling BthSetSecurityUI with NULL event handler, all attempts by other processes to establish themselves as handlers of PIN requests will fail. However, the application itself can call the function with different parameters as many times as necessary.
Requirements
OS Versions: Windows CE .NET 4.2 and later.
Header: Bt_api.h.
Link Library: Btdrt.lib.
See Also
Bluetooth Platform Development Functions | Bluetooth
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.