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. Function IsDestinationReachable

Function IsDestinationReachable

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
14 Posts 5 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.
  • A Alan Martinis

    Can someone help me using function "IsDestinationReachable". When I try to build my application, I got folowing error message: OPFB error LNK2019: unresolved external symbol _IsDestinationReachableA@8 referenced in function "public: virtual int __thiscall MYPRGApp::InitInstance(void)" (?InitInstance@COPFBApp@@UAEHXZ) If someone have some code examle how to use this function, please send me. I include "Sensapi.h" and use library "Sensapi.lib". Thank yoou !

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

    It's as simple as that. I don't know what else you've got in place that is causing this linker error. If I omit the Sensapi.lib, I get an LNK2001 error. I was unable to find LNK2019. Is this a .NET project?


    Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

    A 2 Replies Last reply
    0
    • A Alan Martinis

      Can someone help me using function "IsDestinationReachable". When I try to build my application, I got folowing error message: OPFB error LNK2019: unresolved external symbol _IsDestinationReachableA@8 referenced in function "public: virtual int __thiscall MYPRGApp::InitInstance(void)" (?InitInstance@COPFBApp@@UAEHXZ) If someone have some code examle how to use this function, please send me. I include "Sensapi.h" and use library "Sensapi.lib". Thank yoou !

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #4

      According to the documentation[^], the import library for IsDestinationReachable is sensapi.lib. Have you perhaps changed configurations (e.g. from Debug to Release) and only included that library in the Link tab for one of them?

      1 Reply Last reply
      0
      • D David Crow

        It's as simple as that. I don't know what else you've got in place that is causing this linker error. If I omit the Sensapi.lib, I get an LNK2001 error. I was unable to find LNK2019. Is this a .NET project?


        Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

        A Offline
        A Offline
        Alan Martinis
        wrote on last edited by
        #5

        Can you show me how (few lines) including how to create some LPQOCINFO ? This is my source part that generate this error. if ( IsDestinationReachable("www.google.com", NULL) == TRUE) AfxMessageBox("Google ok !");

        D A 2 Replies Last reply
        0
        • A Alan Martinis

          Can you show me how (few lines) including how to create some LPQOCINFO ? This is my source part that generate this error. if ( IsDestinationReachable("www.google.com", NULL) == TRUE) AfxMessageBox("Google ok !");

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

          QOCINFO oci; oci.dwSize = sizeof(QOCINFO); IsDestinationReachable("www.google.com", &oci);


          Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

          1 Reply Last reply
          0
          • A Alan Martinis

            Can you show me how (few lines) including how to create some LPQOCINFO ? This is my source part that generate this error. if ( IsDestinationReachable("www.google.com", NULL) == TRUE) AfxMessageBox("Google ok !");

            A Offline
            A Offline
            Alan Martinis
            wrote on last edited by
            #7

            Still doesn't working...thank you for your effort, but please help me one more time .. I'm gona crazy wit this... This is part of my code. As you may see that I include Sensapi.h, and in properties of application I include library SensAPI.Lib (/IMPLIB:"SensAPI.Lib"). Do you have any earthly Idea what might be wrong with this ? #include "stdafx.h" #include "MYPRG.h" #include "MYPRGDlg.h" #include "Sensapi.h" #ifdef _DEBUG #define new DEBUG_NEW #endif ...... BOOL MYPRGApp::InitInstance() { ... QOCINFO oci; oci.dwSize = sizeof(QOCINFO); IsDestinationReachable("www.google.com", &oci); ....

            D 1 Reply Last reply
            0
            • D David Crow

              It's as simple as that. I don't know what else you've got in place that is causing this linker error. If I omit the Sensapi.lib, I get an LNK2001 error. I was unable to find LNK2019. Is this a .NET project?


              Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

              A Offline
              A Offline
              Alan Martinis
              wrote on last edited by
              #8

              Interesting thing is that, if I omit the Sensapi.lib, I get the same error as I get it with included library ?!

              1 Reply Last reply
              0
              • A Alan Martinis

                Still doesn't working...thank you for your effort, but please help me one more time .. I'm gona crazy wit this... This is part of my code. As you may see that I include Sensapi.h, and in properties of application I include library SensAPI.Lib (/IMPLIB:"SensAPI.Lib"). Do you have any earthly Idea what might be wrong with this ? #include "stdafx.h" #include "MYPRG.h" #include "MYPRGDlg.h" #include "Sensapi.h" #ifdef _DEBUG #define new DEBUG_NEW #endif ...... BOOL MYPRGApp::InitInstance() { ... QOCINFO oci; oci.dwSize = sizeof(QOCINFO); IsDestinationReachable("www.google.com", &oci); ....

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

                So you have "sensapi.lib" in the Object/library modules: box on the Link tab of the Project Settings dialog?


                Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

                A 1 Reply Last reply
                0
                • D David Crow

                  So you have "sensapi.lib" in the Object/library modules: box on the Link tab of the Project Settings dialog?


                  Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

                  A Offline
                  A Offline
                  Alan Martinis
                  wrote on last edited by
                  #10

                  Yes, why ?

                  D 1 Reply Last reply
                  0
                  • A Alan Martinis

                    Yes, why ?

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

                    So where is the /IMPLIB operative being used?


                    Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

                    A 1 Reply Last reply
                    0
                    • D David Crow

                      So where is the /IMPLIB operative being used?


                      Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

                      A Offline
                      A Offline
                      Alan Martinis
                      wrote on last edited by
                      #12

                      Sorry...misunderstanding From options you may see that /IMPLIB:"Sensapi.lib" is there. /OUT:"Debug/MYPRG.exe" /INCREMENTAL /NOLOGO /DEBUG /PDB:"Debug/MYPRG.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"Sensapi.lib" /MACHINE:IX86 I also try to include Sensapi.DLL file in this .cpp source, but still get same error. Do you think that I have to configure, or setup, or.... I don't know what else should I and where to... Should I put #include "Sensapi.h" directive on some particula place, should I include this library somwhere else except this (MYPROG Property Pages --> Configuration Properties --> Linker --> Advanced --> Import Library --> Sensapi.lib) ? I try to find some source code (or project file) that use this function on Internet, but it wasn't successfully. Do you have any other idea what might be wrong ?

                      M 1 Reply Last reply
                      0
                      • A Alan Martinis

                        Sorry...misunderstanding From options you may see that /IMPLIB:"Sensapi.lib" is there. /OUT:"Debug/MYPRG.exe" /INCREMENTAL /NOLOGO /DEBUG /PDB:"Debug/MYPRG.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"Sensapi.lib" /MACHINE:IX86 I also try to include Sensapi.DLL file in this .cpp source, but still get same error. Do you think that I have to configure, or setup, or.... I don't know what else should I and where to... Should I put #include "Sensapi.h" directive on some particula place, should I include this library somwhere else except this (MYPROG Property Pages --> Configuration Properties --> Linker --> Advanced --> Import Library --> Sensapi.lib) ? I try to find some source code (or project file) that use this function on Internet, but it wasn't successfully. Do you have any other idea what might be wrong ?

                        M Offline
                        M Offline
                        Mike Dimmick
                        wrote on last edited by
                        #13

                        /IMPLIB is for telling the linker to generate an import library with that name, based on the exports from your binary. To use an import library, you include it in the list of files to link. In the Visual Studio .NET IDE, this is found under Configuration Properties > Linker > Input > Additional Dependencies. If you've already been using /IMPLIB, your output directory will likely contain a file sensapi.lib, which could cause the linker to pick that file. If so, delete it.

                        A 1 Reply Last reply
                        0
                        • M Mike Dimmick

                          /IMPLIB is for telling the linker to generate an import library with that name, based on the exports from your binary. To use an import library, you include it in the list of files to link. In the Visual Studio .NET IDE, this is found under Configuration Properties > Linker > Input > Additional Dependencies. If you've already been using /IMPLIB, your output directory will likely contain a file sensapi.lib, which could cause the linker to pick that file. If so, delete it.

                          A Offline
                          A Offline
                          Anonymous
                          wrote on last edited by
                          #14

                          Thank you !!!!!!!!!!!!!!!!!!!!!!! It's working !!! I can't believe it !!!! Thank you !!!

                          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