C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2009, 11:13 AM   #1
Registered User
 
Join Date: Oct 2008
Posts: 51
Bluetooth printer

Hi,
I connect a win Mobile 6 device in bluetooth connection with a printer. I implement a winsock scheme. In the following code on my mobile device (which is the client, the printer being the server) I need to reference the serviceClassID, but no idea where to take it from:

SOCKADDR_BTH Bnam;
...
Lnm = sizeof(SOCKADDR_BTH);
...
memset(&Bnam,0,Lnm);
Bnam.addressFamily = AF_BTH;
Bnam.btAddr = 0x37A68022C; // MAC address of the bluetooth printer
Bnam.serviceClassId = ???; // here is the problem !
if (connect(Pd->soc,(SOCKADDR *) // connect socket to printer
&Bnam,Lnm)==SOCKET_ERROR)
N = WSAGetLastError(); // 10014 error, whatever I put in serviceClassID
…….

What is supposed that I assign to that variable?
Thanks

PS: Looked into the registry key of the device corresponding to the printer (instatiated through the device discovery), I know the structure, but no member fits the serviceClassID
Opariti is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bluetooth Questions Tonto Tech Board 2 05-30-2009 02:41 AM
Set Printer Prior To Loading Print Dialog Box Beaner Windows Programming 3 10-10-2008 01:02 PM
C / Bluetooth Question michaelmatthews C Programming 7 05-31-2007 11:39 AM
changing property (layout) of a printer leojose Windows Programming 5 12-05-2005 07:16 AM
Success - Output to Printer noraa C Programming 5 08-04-2002 09:12 AM


All times are GMT -6. The time now is 01:16 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22