Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. How can we call mingw WLAN NOTIFICATION CALLBACK
Forum Updated to NodeBB v4.3 + New Features

How can we call mingw WLAN NOTIFICATION CALLBACK

Scheduled Pinned Locked Moved 3rd Party Software
17 Posts 4 Posters 5.3k 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.
  • T Offline
    T Offline
    tushar.kachhadiya
    wrote on last edited by
    #1

    Hello Everyone

    i am working WiFi using wlanapi library mingw. i have registered this function WLAN NOTIFICATION
    CALLBACK but i am not getting notification. it just register and then not works. this is the function i have made.

    NOTIFICATION CALLBACK FUNCTION
    WLAN_NOTIFICATION_CALLBACK WINAPI MainWindow::NotificationCallback(PWLAN_NOTIFICATION_DATA pNotifData,void* pContext)
    {
    if (pNotifData != NULL)
    {
    ui->label2->setText(GetAcmNotificationString(pNotifData->NotificationCode));
    }
    }
    Please tell me if the above callback function is correct or not?

    Here is the code how I am regestering the callback function using WlanRegisterNotification

    NotiffData is declared in Header.
    PWLAN_NOTIFICATION_DATA NotifData

    dwResult = WlanRegisterNotification(hClient,NotifData->NotificationSource,FALSE,MainWindow::NotificationCallback(NotifData,context),NULL,NULL,&dwPrevNotifType);

    i want to know my code is right or wrong. why i am not getting notification of wireless lan. if anybody have solution for this task, please reply me.

    Not sure but every time it returns the "Unknown Code"

    Thanks

    Tushar Kachhadiya

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      This question being essentially WINAP related, you should rather ask on a MSDN forum

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tushar.kachhadiya
        wrote on last edited by
        #3

        Hi Samuel

        Can Qt have any Similar Function like WLAN_NOTIFICATION_CALLBACK to get WiFi Status. i have QT5.2.1 MingW. so If you have any thought about this issue.Please Help me.

        Thank You

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Have a look at the Bearer Management documentation

          Hope it helps

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tushar
            wrote on last edited by
            #5

            Hi Samuel

            Can you tell me how to disable a QTest console output window of Qdebug.
            My Qt Version is 5.2.1.

            Thanks

            Tushar Kachhadiya

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              What console are you referring to ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tushar
                wrote on last edited by
                #7

                Hi,

                I referring the console window which is opens while we run the application. The console window is shows all QDebug messages and warning messages.

                The library I used QTest library and Qttest5.dll after including this two files. I got that console output window with my application. I tried using this configuration t with application.pro file to disable that window but it didn't disable that window. It just disables the Qdebug messages.

                QT += testlib

                DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT

                So, if you have any solution or suggestion related this issue. please let me know.

                Thanks & Regards

                Tushar Kachhadiya

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Well, that's the normal behavior for tests, what are you trying to achieve ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tushar
                    wrote on last edited by
                    #9

                    Hi,

                    I want to disable that console output window. i used qwait method to set some delay in for loop before that I used single shot timer but it hangs all process, so I removed it.

                    So, if you have any solution related this, Please help me.

                    Thanks & Regards

                    Tushar Kachhadiya

                    1 Reply Last reply
                    0
                    • IamSumitI Offline
                      IamSumitI Offline
                      IamSumit
                      wrote on last edited by
                      #10

                      hii
                      if you want to disable console window then write in .pro file
                      CONFIG -= console
                      hope it helps

                      Be Cute

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        tushar
                        wrote on last edited by
                        #11

                        Hi,
                        lamSumit

                        Thanks for suggestion. I tried this CONFIG-=console but console window is still there. So, If you have any other idea then share with me.

                        1 Reply Last reply
                        0
                        • IamSumitI Offline
                          IamSumitI Offline
                          IamSumit
                          wrote on last edited by
                          #12

                          hi
                          http://qt-project.org/forums/viewthread/40984

                          Be Cute

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            tushar
                            wrote on last edited by
                            #13

                            Hi
                            lamSumit

                            I tried that configuration but still getting same issue with deployed application. when i run myapplication.exe file from deployed directory still debug window starts with application.

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              qWait is to be used only for tests not in production code. Don't use it in your application.

                              Unless you are doing something unclean, QTimer singleShot should not block anything

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • IamSumitI Offline
                                IamSumitI Offline
                                IamSumit
                                wrote on last edited by
                                #15

                                if your console window is still there then
                                you have to reconfigure the project means let start fresh.
                                just do the following--
                                1)CONFIG -=console //in .pro file
                                2)Delete debug and release folder
                                3)delete from create in directory(source code) the files that generated while previous configuration, like visual studio .pro file .you have to keep only your main files like all .cpp, .h and .pro files only
                                4)After doing above open your project in Qt creator and it will ask for configure just hit that button you will get fresh(cleaned) project.
                                just do above steps.your problem will be solved.

                                Be Cute

                                1 Reply Last reply
                                0
                                • T Offline
                                  T Offline
                                  tushar
                                  wrote on last edited by
                                  #16

                                  [quote author="SGaist" date="1403212297"]qWait is to be used only for tests not in production code. Don't use it in your application.

                                  Unless you are doing something unclean, QTimer singleShot should not block anything[/quote]

                                  Thanks Samuel

                                  1 Reply Last reply
                                  0
                                  • T Offline
                                    T Offline
                                    tushar
                                    wrote on last edited by
                                    #17

                                    [quote author="IamSumit" date="1403242351"]if your console window is still there then
                                    you have to reconfigure the project means let start fresh.
                                    just do the following--
                                    1)CONFIG -=console //in .pro file
                                    2)Delete debug and release folder
                                    3)delete from create in directory(source code) the files that generated while previous configuration, like visual studio .pro file .you have to keep only your main files like all .cpp, .h and .pro files only
                                    4)After doing above open your project in Qt creator and it will ask for configure just hit that button you will get fresh(cleaned) project.
                                    just do above steps.your problem will be solved.

                                    [/quote]

                                    Thanks lamSumit
                                    Still getting same issue. i removed that qtest library.

                                    1 Reply Last reply
                                    0

                                    • Login

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