PC Review


Reply
Thread Tools Rate Thread

Connecting to BT device 'by name'?

 
 
Leif Eirik Olsen
Guest
Posts: n/a
 
      6th May 2005
Hi all,

Not sure this question is specific to CF, but in my PocketPc app I have the
following code to let my users select an available bluetooth device to
connect to :

PortHandle = CreateFile("Com6:", GENERIC_READ | GENERIC_WRITE, 0, 0,
OPEN_EXISTING, 0, 0);

The above code brings up the a system dialog box where user may select a
device.

Q: Is there anyway to avoid this dialogbox and always connect to a device
that I already know the name of?

The reason I 'need' this is that my application should only connect to our
own bluetooth enabeled antenne, thus the user should not need to be bothered


regards,
Leo





 
Reply With Quote
 
 
 
 
Peter Foot [MVP]
Guest
Posts: n/a
 
      6th May 2005
From the description it appears you are using the widcomm stack. There is a
tweak whereby you can avoid this prompt and always have the port connect to
the last used device by making a registry change:-
http://www.gpsdotnet.com/kb/article.aspx?id=10262

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net |
http://www.opennetcf.org

"Leif Eirik Olsen" <leif-eirik.olsen@_REMOVE_plugging.com> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> Not sure this question is specific to CF, but in my PocketPc app I have
> the
> following code to let my users select an available bluetooth device to
> connect to :
>
> PortHandle = CreateFile("Com6:", GENERIC_READ | GENERIC_WRITE, 0, 0,
> OPEN_EXISTING, 0, 0);
>
> The above code brings up the a system dialog box where user may select a
> device.
>
> Q: Is there anyway to avoid this dialogbox and always connect to a device
> that I already know the name of?
>
> The reason I 'need' this is that my application should only connect to our
> own bluetooth enabeled antenne, thus the user should not need to be
> bothered
>
>
> regards,
> Leo
>
>
>
>
>



 
Reply With Quote
 
Leif Eirik Olsen
Guest
Posts: n/a
 
      6th May 2005
"Peter Foot [MVP]" <(E-Mail Removed)> skrev i melding
news:(E-Mail Removed)...
> From the description it appears you are using the widcomm stack. There is

a
> tweak whereby you can avoid this prompt and always have the port connect

to
> the last used device by making a registry change:-
> http://www.gpsdotnet.com/kb/article.aspx?id=10262


Thanks alot for your swift replay,

I'll have a go at it right away

regards,
Leo


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting PPC Pro Device Emulator with Physical Device Himanshu Lakdawala Microsoft Access 2 4th Feb 2010 12:24 PM
Connecting to TPM Device =?Utf-8?B?RG9u?= Windows Vista Hardware 3 22nd Jun 2007 04:57 PM
Connecting to a Socket on the device when connecting via ActiveSyn =?Utf-8?B?U2ltb24gSGFydA==?= Microsoft Dot NET Compact Framework 5 17th Aug 2006 05:37 PM
Connecting a Fax device =?Utf-8?B?U3RlcGhlbiBNYXJrcw==?= Windows XP Print / Fax 11 4th Sep 2004 05:33 PM
Help connecting a device news.microsoft.com Microsoft Dot NET Compact Framework 5 14th Jan 2004 06:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:10 PM.