Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook - Using Forms (http://www.outlookbanter.com/outlook-using-forms/)
-   -   Bluetooth programming (http://www.outlookbanter.com/outlook-using-forms/89015-bluetooth-programming.html)

Deepika April 14th 09 09:31 AM

Bluetooth programming
 
Hi
I am trying to do bluetooth programming on Microsoft Visual C++ 6.0.
I am using basic functions like WSALookupServiceBegin().
i wrote the code like this
WSAQUERYSET wsaq;
wsaq.dwNameSpace = NS_BTH;

The problem is, the compiler is not recognising NS_BTH and giving compile
time error.
I included the following sets of headers and lib

#include winsock
#include winsock2
#include bthdef
#include BluetoothAPIs.h
#include Ws2bth.h
#pragma comment(lib, "ws2_32.lib")

The same goes with socket creation.
Even if i am trying to create socket using the below code

SOCKET client_socket = socket (AF_BT, SOCK_STREAM, BTHPROTO_RFCOMM);

following error are coming up

error C2065: 'NS_BTH' : undeclared identifier
error C2065: 'AF_BT' : undeclared identifier
error C2065: 'BTHPROTO_RFCOMM' : undeclared identifier

i am not able to understand what else needs to be included.
Is it because of Microsoft stack or some SDK is required?

Sue Mosher [MVP][_3_] April 14th 09 02:22 PM

Bluetooth programming
 
Wrong forum. This group is for discussions of Outlook custom forms. Try
posting in a C++ group.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Deepika" wrote in message
...
Hi
I am trying to do bluetooth programming on Microsoft Visual C++ 6.0.
I am using basic functions like WSALookupServiceBegin().
i wrote the code like this
WSAQUERYSET wsaq;
wsaq.dwNameSpace = NS_BTH;

The problem is, the compiler is not recognising NS_BTH and giving compile
time error.
I included the following sets of headers and lib

#include winsock
#include winsock2
#include bthdef
#include BluetoothAPIs.h
#include Ws2bth.h
#pragma comment(lib, "ws2_32.lib")

The same goes with socket creation.
Even if i am trying to create socket using the below code

SOCKET client_socket = socket (AF_BT, SOCK_STREAM, BTHPROTO_RFCOMM);

following error are coming up

error C2065: 'NS_BTH' : undeclared identifier
error C2065: 'AF_BT' : undeclared identifier
error C2065: 'BTHPROTO_RFCOMM' : undeclared identifier

i am not able to understand what else needs to be included.
Is it because of Microsoft stack or some SDK is required?





All times are GMT +1. The time now is 12:58 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com