By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,130 Members | 2,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,130 IT Pros & Developers. It's quick & easy.

Bluetooth API calls (not using Sockets)

P: n/a
Hi,

I am trying to make this simple code work but I have no success doing
so:

BLUETOOTH_DEVICE_SEARCH_PARAMS btsp = { sizeof(btsp) };
BLUETOOTH_DEVICE_INFO btdi = { sizeof(btdi) };

btsp.fReturnAuthenticated = TRUE;
btsp.fReturnRemembered = TRUE;
btsp.cTimeoutMultiplier = 40;
btsp.fReturnUnknown = TRUE;
btsp.fReturnConnected = TRUE;
btsp.fIssueInquiry = TRUE;

hFind = BluetoothFindFirstDevice( &btsp, &btdi );

GetLastError(...);....
When I call GetLastError; It tells me that => "1722 The RPC server
is
unavailable."
I am developping with SDK SP1 under Windows XP SP1 with Visual Studio
.NET. My bluetooth interface is an IOGEAR (USB). ( I tried with
Belkin
USB interface as well and it did not work). I have installed
q323183_wxp_sp2_x86_enu.exe which resolved some problems but I still
cannot see the Bluetooth device around the computer.

Although, if I use the "Explore my Bluetooth place" I do find my
bluetooth device (2 of them actually).

Any advice ???
*---------------------------------*
Posted at: http://www.GroupSrv.com
*---------------------------------*

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hello !

Although you're not using Windows Sockets, try including all WSA2 headers
(standard and Bluetooth ones), then calling WSAStartup properly before
attempting to use Bluetooth.

There's a small tidy undocumented section somewhere stating that Bluetooth
cannot be used without dows Sockets. But I think it was left out of the
actual docs.

If that doesn't help, try looking for Bluetooth radio devices. It's much
alike, but with BluetoothFindFirstRadio instead.

Calling WSAStartup should clear the RPC server error.

-Antti Keskinen
"cmartin64x" <cm********@hotmail-dot-com.no-spam.invalid> wrote in message
news:41********@127.0.0.1...
Hi,

I am trying to make this simple code work but I have no success doing
so:

BLUETOOTH_DEVICE_SEARCH_PARAMS btsp = { sizeof(btsp) };
BLUETOOTH_DEVICE_INFO btdi = { sizeof(btdi) };

btsp.fReturnAuthenticated = TRUE;
btsp.fReturnRemembered = TRUE;
btsp.cTimeoutMultiplier = 40;
btsp.fReturnUnknown = TRUE;
btsp.fReturnConnected = TRUE;
btsp.fIssueInquiry = TRUE;

hFind = BluetoothFindFirstDevice( &btsp, &btdi );

GetLastError(...);....
When I call GetLastError; It tells me that => "1722 The RPC server
is
unavailable."
I am developping with SDK SP1 under Windows XP SP1 with Visual Studio
NET. My bluetooth interface is an IOGEAR (USB). ( I tried with
Belkin
USB interface as well and it did not work). I have installed
q323183_wxp_sp2_x86_enu.exe which resolved some problems but I still
cannot see the Bluetooth device around the computer.

Although, if I use the "Explore my Bluetooth place" I do find my
bluetooth device (2 of them actually).

Any advice ???
*---------------------------------*
Posted at: http://www.GroupSrv.com
*---------------------------------*

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.