Linker Error : NetApiBufferFree

Posted on 2008-11-13
Last Modified: 2013-12-14
error LNK2019: unresolved external symbol _NetApiBufferFree@4 referenced in function "int __stdcall MyWlxLoggedOutSASDlgProc(struct HWND__ *,unsigned int,unsigned int,long)" (?MyWlxLoggedOutSASDlgProc@@YGHPAUHWND__@@IIJ@Z)

Where do i place netapi32.lib file. I am working it Visual Studio 2005.
Question by:AnanthakrishnanKC
    LVL 6

    Expert Comment

    In Project properties->linker->Input
    LVL 6

    Expert Comment

    You can also type
    #pragma comment(lib, "netapi32")
    in the code file that use the lib.

    Author Comment

    i also did but not still i have such problem?
    LVL 6

    Expert Comment

    Open the VC++ directories under Tools->options. Check that the folder containing the lib is present in the list.
    LVL 39

    Accepted Solution

    >>>> Check that the folder containing the lib is present in the list.

    It is Tools->Options->Projects-VC++ Directories->Show Directories For->Library Files.

    The folders specified here are global library folders valid for all projects.

    You also could add a library path for the one project only by

    Project -> Properties -> Configuration Properties -> Linker -> Common -> Addititional Library Folders...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
    IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
    The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
    The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now