<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Bluetoothapis.h windows SDK - Issue]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I'm new to the Froum, so first of all, Hello all !</p>
<p dir="auto">I almost never post on forum before a lot of search, but here i'm blocked with something and i don't know how to success my problem.</p>
<p dir="auto">I actually want to use BluetoothApi from windows SDK, i checked the documentation and so, i try to use the BluetoothFindDirstDevice without any sucess.</p>
<p dir="auto">I mean i get no error inside Qt, but the program crash.</p>
<p dir="auto">Here is my code</p>
<pre><code>HBLUETOOTH_DEVICE_FIND hfind;
    hfind=NULL;

    BLUETOOTH_DEVICE_SEARCH_PARAMS params;
    params.dwSize=sizeof(BLUETOOTH_DEVICE_SEARCH_PARAMS);

    params.fReturnAuthenticated=true;
    params.fReturnConnected=true;
    params.fReturnUnknown=false;
    params.fReturnRemembered=true;
    params.fIssueInquiry=true;
    params.hRadio=NULL;
    params.cTimeoutMultiplier=5;

    BLUETOOTH_DEVICE_INFO btdi;
    ZeroMemory(&amp;btdi,sizeof(BLUETOOTH_DEVICE_INFO));
    btdi.dwSize=sizeof(BLUETOOTH_DEVICE_INFO);

    hfind=BluetoothFindFirstDevice(&amp;params,&amp;btdi);

    if(hfind!=NULL)
    {
    qDebug()&lt;&lt;"We find a bt"   ;
    }else{
      qDebug()&lt;&lt;"Nothing"   ;
    }
</code></pre>
<p dir="auto">Qt 5.8 RC with minGW<br />
Windows 10 platform 64</p>
<p dir="auto">My Pro.file</p>
<pre><code>QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = BluetoothTest
TEMPLATE = app

INCLUDEPATH +="D:\WinSDK\Include"

LIBS += "D:\WinSDK\Lib\10.0.14393.0\um\x86\WSock32.Lib"
LIBS += "D:\WinSDK\Lib\10.0.14393.0\um\x86\bthprops.lib"


SOURCES += main.cpp\
        mainwindow.cpp

HEADERS  += mainwindow.h

FORMS    += mainwindow.ui
</code></pre>
<p dir="auto">i don't know if you need more info to help me. if so ask me.</p>
<p dir="auto">Many thanks</p>
]]></description><link>https://forum.qt.io/topic/75366/bluetoothapis-h-windows-sdk-issue</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Nov 2026 05:23:21 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/75366.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 22 Jan 2017 07:14:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bluetoothapis.h windows SDK - Issue on Sun, 22 Jan 2017 12:19:24 GMT]]></title><description><![CDATA[<p dir="auto">Awesome man.</p>
<p dir="auto">That show me that sometimes ask the question is more usefull than searching for hours....</p>
<p dir="auto">I didn't know that i could not use Windows SDK with MinGW i understand now. windows SDK needs to be with Visual compiler ...</p>
<p dir="auto">Many thanks have a nice Day.</p>
]]></description><link>https://forum.qt.io/post/370925</link><guid isPermaLink="true">https://forum.qt.io/post/370925</guid><dc:creator><![CDATA[NicoFrom13]]></dc:creator><pubDate>Sun, 22 Jan 2017 12:19:24 GMT</pubDate></item><item><title><![CDATA[Reply to Bluetoothapis.h windows SDK - Issue on Sun, 22 Jan 2017 10:18:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi, welcome to the forum.</p>
<p dir="auto">You can't use Windows SDK provided by Microsoft with MinGW. It ships with its own, modified version of it. It probably compiles because you have errors in your config in the .pro file: <code>\</code> is an escape character and that's not how you pass libraries to the linker.</p>
<p dir="auto">Remove the INCLUDEPATH. MinGW kit already has a path to its own version of Windows SDK. Also remove the LIBS paths and only add:</p>
<pre><code>LIBS += -lWSock32 -lbthprops
</code></pre>
<p dir="auto">Tthere's a <code>-l</code>(lowercase L) before the name of the lib and no <code>.lib</code> suffix.<br />
After that <code>Build-&gt;run qmake</code> and you should be good to go.</p>
]]></description><link>https://forum.qt.io/post/370916</link><guid isPermaLink="true">https://forum.qt.io/post/370916</guid><dc:creator><![CDATA[Chris Kawa]]></dc:creator><pubDate>Sun, 22 Jan 2017 10:18:16 GMT</pubDate></item></channel></rss>