none
IcmpCreateFile() - Unresolved external... RRS feed

  • Question

  • Here I am again...

     

    Hello experts!

     

    I'm sure someone here has had to ping an ip address from a c++ smart device program. I sure hope so!  I am using visual studio 2005 writing a smart device application.

     

    I am trying to use icmpapi.h and ipexport.h to call IcmpSendEcho.  The first step is to call IcmpCreateFile() to retrieve a handle.  The first step fails.

     

    I've included icmpapi.h and ipexport.h.  Intellesense knows about IcmpCreateFile() because I see the pop up for the function definition...Also if I type in ::, I get a list of functions...the IcmpCreateFile is there!!

     

    Why am I getting...

    Error 3 error LNK2019: unresolved external symbol IcmpCreateFile referenced in function...

     

    HELP...please!!

     

    Here are the things I've tried to fix the problem...gathered from travels over the web.

     

    1. Put the includes inside extern "C"

    Code Snippet

    extern "C"

    {

    #include

    #include

    }

     

     

    2. Put the function declaration inside extern "C"

    Code Snippet

    extern "C"

    {

    HANDLE IcmpCreateFile();

    }

     

     

    3.  Added the path to these h files in Additional Include Directories in the properties->C/C++->General

    4.  Changed SubSystem from Not Set to every other one in the list in Properties->Linker->System

     

    I am out of ideas...

     

    Thank you in advance...

     

    Paula

     

    Thursday, September 20, 2007 1:57 PM

Answers

All replies