federico.caselli
Posts: 11
Joined: Tue Mar 28, 2006 9:41 pm
Location: Italy

FindAndConnect in a windows service

Mon Apr 03, 2006 8:05 pm

Hi,

I'm trying to write the FindAndConnect routines inside a windows service.

I'm getting an error at the
<font color="blue">devices = nwork.DiscoverDevices</font id="blue">call.
This is the error:

Failed to start device inquriy. Check if Bluetooth is enabled.
at Franson.BlueTools.Toolkit.PullExceptions(IntPtr obj)
at Franson.BlueTools.Network.DiscoverDevices()

If I run the original FindAndConnect app, I can find my remote device and all works fine.

In the winforms sample there is the
<font color="blue">m_manager.Parent = Me</font id="blue">
assignment. In my windows service application I didn't write this line, since I've no controls to assign. Could it be the cause of the error?

Is there any way to do the FindAndConnect things in a Windows service?

Thanks.

Return to “BlueTools”