Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Bluetooth Block

Bluetooth Block

Scheduled Pinned Locked Moved C / C++ / MFC
help
20 Posts 4 Posters 0 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 tanu misra

    hi.. Does any body have Idea of how to turn off bluetooth through code in computer,so that it is not able to connect with any other bluetoth device. Thanks :)

    D Offline
    D Offline
    David Crow
    wrote on last edited by
    #10

    If it's a registry setting, you could use regmon to see what key/value is changed.

    "One man's wage rise is another man's price increase." - Harold Wilson

    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

    "Man who follows car will be exhausted." - Confucius

    T 1 Reply Last reply
    0
    • D David Crow

      If it's a registry setting, you could use regmon to see what key/value is changed.

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "Man who follows car will be exhausted." - Confucius

      T Offline
      T Offline
      tanu misra
      wrote on last edited by
      #11

      hi. Sry bt its not registry setting,it has to be done through sum code in c/c++ :)

      D 1 Reply Last reply
      0
      • T tanu misra

        hi. Sry bt its not registry setting,it has to be done through sum code in c/c++ :)

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #12

        I was not aware that the registry could not be changed via code. Hmmm, you learn something new each day.

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Man who follows car will be exhausted." - Confucius

        T 1 Reply Last reply
        0
        • D David Crow

          I was not aware that the registry could not be changed via code. Hmmm, you learn something new each day.

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Man who follows car will be exhausted." - Confucius

          T Offline
          T Offline
          tanu misra
          wrote on last edited by
          #13

          hi.. Know Im able to disable bluetooth throughcode,but it ask for a restart. But I dont want to restart the system.. can anyone help me in this regard. And after sum search I found a function named BluetoothSetServiceState() It is used to disable bluetooth.. but it is not working,neither it is giving any error.. Does any 1 have any idea about this function,how to use it? Thanks in advance Nidhi. :)

          D 1 Reply Last reply
          0
          • T tanu misra

            hi.. Know Im able to disable bluetooth throughcode,but it ask for a restart. But I dont want to restart the system.. can anyone help me in this regard. And after sum search I found a function named BluetoothSetServiceState() It is used to disable bluetooth.. but it is not working,neither it is giving any error.. Does any 1 have any idea about this function,how to use it? Thanks in advance Nidhi. :)

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #14

            tanu misra wrote:

            And after sum search I found a function named BluetoothSetServiceState() It is used to disable bluetooth.. but it is not working...

            What does it return?

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "Man who follows car will be exhausted." - Confucius

            T 1 Reply Last reply
            0
            • D David Crow

              tanu misra wrote:

              And after sum search I found a function named BluetoothSetServiceState() It is used to disable bluetooth.. but it is not working...

              What does it return?

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "Man who follows car will be exhausted." - Confucius

              T Offline
              T Offline
              tanu misra
              wrote on last edited by
              #15

              Syntax- DWORD BluetoothSetServiceState( HANDLE hRadio, BLUETOOTH_DEVICE_INFO *pbtdi, GUID *pGuidService, DWORD dwServiceFlags ); Return Value Returns ERROR_SUCCESS upon successful completion. The following lists common errors. Return code Description ERROR_INVALID_PARAMETER The dwServiceFlags are not valid. ERROR_SERVICE_DOES_NOT_EXIST The GUID specified in pGuidService is not supported. E_INVALIDARG dwServiceFlags is set to BLUETOOTH_SERVICE_DISABLE and the service is already disabled, or dwServiceFlags is set to BLUETOOTH_SERVICE_ENABLE and the service is already enabled.

              D 1 Reply Last reply
              0
              • T tanu misra

                Syntax- DWORD BluetoothSetServiceState( HANDLE hRadio, BLUETOOTH_DEVICE_INFO *pbtdi, GUID *pGuidService, DWORD dwServiceFlags ); Return Value Returns ERROR_SUCCESS upon successful completion. The following lists common errors. Return code Description ERROR_INVALID_PARAMETER The dwServiceFlags are not valid. ERROR_SERVICE_DOES_NOT_EXIST The GUID specified in pGuidService is not supported. E_INVALIDARG dwServiceFlags is set to BLUETOOTH_SERVICE_DISABLE and the service is already disabled, or dwServiceFlags is set to BLUETOOTH_SERVICE_ENABLE and the service is already enabled.

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #16

                Um, why are you sending this to me? :confused:

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "Man who follows car will be exhausted." - Confucius

                T 1 Reply Last reply
                0
                • D David Crow

                  Um, why are you sending this to me? :confused:

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "Man who follows car will be exhausted." - Confucius

                  T Offline
                  T Offline
                  tanu misra
                  wrote on last edited by
                  #17

                  hi I though u asked me that what does this function return..

                  D 1 Reply Last reply
                  0
                  • T tanu misra

                    hi I though u asked me that what does this function return..

                    D Offline
                    D Offline
                    David Crow
                    wrote on last edited by
                    #18

                    I did. You were supposed to tell me what it returns when you use it.

                    "One man's wage rise is another man's price increase." - Harold Wilson

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    "Man who follows car will be exhausted." - Confucius

                    T 1 Reply Last reply
                    0
                    • D David Crow

                      I did. You were supposed to tell me what it returns when you use it.

                      "One man's wage rise is another man's price increase." - Harold Wilson

                      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                      "Man who follows car will be exhausted." - Confucius

                      T Offline
                      T Offline
                      tanu misra
                      wrote on last edited by
                      #19

                      Hi.. it returns me following error ERROR_SERVICE_DOES_NOT_EXIST,which means GUID does not exist..

                      T 1 Reply Last reply
                      0
                      • T tanu misra

                        Hi.. it returns me following error ERROR_SERVICE_DOES_NOT_EXIST,which means GUID does not exist..

                        T Offline
                        T Offline
                        tanu misra
                        wrote on last edited by
                        #20

                        hi.. NEED HELP those who have laptops with inbuild bluetooth plz tell me the services used by bluetooth you can find bluetooth sevices in task manager these services will start from BT... or bt... and manufacture of driver used by bluetooth.. Thanks :)

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups