Windows CE .NET

This function obtains the hardware status.

Note    If you must use this operation, then use it with extreme caution. If the Bluetooth controller is inactive, such as when it is removed or turned off, then this operation forces enumeration of present hardware as if the controller were inserted, and is therefore expensive in terms of time and resources.
int BthGetHardwareStatus(
  int* pistatus


[out] Pointer to an integer that returns the hardware status. The following table shows the possible values.
Value Description
HCI_HARDWARE_UNKNOWN The stack is not present.
HCI_HARDWARE_RUNNING The adapter is installed and the stack is running.
HCI_HARDWARE_INITIALIZING The adapter might be installed. The stack is currently on the way up. Call again later.
HCI_HARDWARE_ERROR The adapter might be installed. The stack is on the way down. Call again later.
HCI_HARDWARE_SHUTDOWN The adapter is installed, but the stack is not running.
HCI_HARDWARE_NOT_PRESENT The adapter is not present.

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.

Other standard error codes may be returned as appropriate.


OS Versions: Windows CE .NET 4.2 and later.
Header: Bt_api.h.
Link Library: Btdrt.lib.

See Also

Bluetooth Platform Development Functions

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.