Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qt 5.9 calling wlanapi
Qt 6.11 is out! See what's new in the release blog

qt 5.9 calling wlanapi

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 437 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pihi42
    wrote on last edited by
    #1

    I'm using qt 5.9 with Visual Studio 2015 for a desktop app.
    With recent windows 11 update 24h2, the os is showing that my application is using location services.
    Since my app is not using location services at all, I was surprised by this.

    Turns out that qt is periodically calling (every 10 seconds or so) wlanapi, function WlanScan, and this causes the windows reporting as "using location". WlanScan is called only if wifi network is connected.
    I found this out by using Rohitab's Api Monitor.

    I cannot determine how or why these calls are being made. I am using networking via QTcpSocket (listening to connections) and QNetworkRequest (for downloads). I would like to disable calls to WlanScan function of wlanapi.
    Any help would be appreciated.

    jsulmJ 1 Reply Last reply
    0
    • P pihi42

      I'm using qt 5.9 with Visual Studio 2015 for a desktop app.
      With recent windows 11 update 24h2, the os is showing that my application is using location services.
      Since my app is not using location services at all, I was surprised by this.

      Turns out that qt is periodically calling (every 10 seconds or so) wlanapi, function WlanScan, and this causes the windows reporting as "using location". WlanScan is called only if wifi network is connected.
      I found this out by using Rohitab's Api Monitor.

      I cannot determine how or why these calls are being made. I am using networking via QTcpSocket (listening to connections) and QNetworkRequest (for downloads). I would like to disable calls to WlanScan function of wlanapi.
      Any help would be appreciated.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @pihi42 Did you try with a more recent Qt version?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      P 1 Reply Last reply
      0
      • jsulmJ jsulm

        @pihi42 Did you try with a more recent Qt version?

        P Offline
        P Offline
        pihi42
        wrote on last edited by
        #3

        @jsulm Not yet. For now, just trying to understand the issue.

        jsulmJ 1 Reply Last reply
        0
        • P pihi42

          @jsulm Not yet. For now, just trying to understand the issue.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @pihi42 Then I guess you will have to look into Qt source code to find out where WlanScan is called.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pihi42
            wrote on last edited by
            #5

            I traced the problem to the qnativewifibearer.dll which was deployed automatically by winqtdeploy. Simply deleting that plugin module stopped wlanscan. The remaining question is - why did the module scan the wifi network every 10 seconds without any requests on its own? Why did winqtdeploy deploy the module that is not needed?
            Anyway, that solved my root problem.

            1 Reply Last reply
            1
            • P pihi42 has marked this topic as solved on

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved