Author Topic: WCL in Service  (Read 3556 times)

novice

  • Guest
WCL in Service
« on: May 28, 2009, 08:34:09 AM »
Good Day

hi

Can i use wcl.net in Windows Service
i tried to a create windows service that will discover bluetooth , but the problem is it not discovering i tried my  code in  windows application and it works fine , but in service, events is not working ,it doesnt trigerr OnDiscoveryStarted, and OnDiscoveryComplete.
to discover i use
int intierror = wclBluetoothDiscovery1.Discovery(wclradio,15);

do you have some idea wahat would be the reason, is there anything that i have to configure to be able to use wcl in windows service

                   
Thanks

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: WCL in Service
« Reply #1 on: May 28, 2009, 09:29:55 AM »
Hi,

it is possible but yur service must have message loop.

novice

  • Guest
Re: WCL in Service
« Reply #2 on: May 28, 2009, 09:39:26 AM »
Good Day

What do mean by message loop? :-[

Thanks

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: WCL in Service
« Reply #3 on: May 28, 2009, 10:01:56 AM »
Window Mesage Loop. WCL is based on windows messages and requires the message loop to process the messages.

Offline fabio.santini

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
Re: WCL in Service
« Reply #4 on: January 12, 2010, 06:00:37 PM »
I have the same problem too.
I searched throw the web, but I just found some examples for C++, I found anything for VB.net...

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: WCL in Service
« Reply #5 on: January 12, 2010, 06:10:46 PM »
Would be great if you create ticket on support.btframework.com with link to this post. So I can not forget to write the sample for VB.NET. Just please, explaing what would you like to do (what kind of sample you need).
Thanks.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: WCL in Service
« Reply #6 on: January 13, 2010, 01:54:06 PM »
Hi,

Please, find the attached file with WCL in Service demos. Note that not all Bluetooth stacks can be called from Service application.

Offline fabio.santini

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
Re: WCL in Service
« Reply #7 on: January 13, 2010, 06:17:42 PM »
Thank you for this example.
I thinked I could add other parts bu myself, but there is not working... Infact, I need a ProximitySenderDemo as a Windows service, I tried to add parts but it is not moving on

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: WCL in Service
« Reply #8 on: January 13, 2010, 06:22:00 PM »
It is very bad idea to add wclProximitySender into service because it will work with MS only then

Offline fabio.santini

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
Re: WCL in Service
« Reply #9 on: January 14, 2010, 09:11:42 AM »
It would not be a problem.

Is there something I should add for letting ProximitySender work?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: WCL in Service
« Reply #10 on: January 14, 2010, 09:51:18 AM »
Hi,

You have to remove usage of wclBluetoothDiscovery from demo code and add wclProximitySender. Also you need to add logic and even handlers.

 

Sitemap 1 2 3 4 5 6 7 8 9