Wireless Communication Library Support Forum

Common => Common => Topic started by: pleaseking on June 04, 2013, 05:27:58 PM

Title: Integrating WCL with pure Win32 API app
Post by: pleaseking on June 04, 2013, 05:27:58 PM
Dear all,

I am currently evaluating WCL to be used with our application. The app is a pure native Win32 app doing custom graphics and rendering inside a window, i.e. it does not use any of MFC or COM things. We do use ATL strings however. So the question is: would WTL work in such environment? How do we deal with __hook and friends? How are you doing messaging? Can it work in a console application even?

Thanks,
  Michael
Title: Re: Integrating WCL with pure Win32 API app
Post by: Mike Petrichenko on June 04, 2013, 09:06:12 PM
Hello,

WCL does not use MFC and can work with native win32 apps as well as in console apps (take a look on console demo).
Title: Re: Integrating WCL with pure Win32 API app
Post by: pleaseking on June 14, 2013, 06:07:02 PM
Thanks for the pointer - works now.
Title: Re: Integrating WCL with pure Win32 API app
Post by: pbergqvist on January 13, 2014, 02:52:48 PM
Also, I think it's worth mentioning that a Windows message loop is required to get the events working.

This was causing me some issues when trying to use the Bluetooth Server.
Title: Re: Integrating WCL with pure Win32 API app
Post by: Mike Petrichenko on January 13, 2014, 04:44:05 PM
Hello,

I already wrote on this forum that windows messahing is the only way to use Toshiab BT stack as well as WidComm requires it. The other reason of using Windows messaging is to synchronize threads to make WCL usable from MFC (which is not thread safe) as well as with VCL and .NET. So if you think then you find that Windows messaging is actualy great  and the only one way to make WCL usable. At least without it there is no Toshiba.

And, of course, Windows messages processing requires Windows message loop as you (I am sure) know.