What is the purpose of this function argument?

This is a discussion on What is the purpose of this function argument? within the C++ Programming forums, part of the General Programming Boards category; In the following code pertaining to DLLs, what is the purpose of the second argument of GetProcAddress()? Code: _dllFunction = ...

  1. #1
    Use this: dudeomanodude's Avatar
    Join Date
    Jan 2008
    Location
    Hampton, VA
    Posts
    391

    What is the purpose of this function argument?

    In the following code pertaining to DLLs, what is the purpose of the second argument of GetProcAddress()?

    Code:
    _dllFunction = ( dllFunction )GetProcAddress( hInstLibrary, "secondArg" );
    Thanks in advance,

    dudeguy
    Ubuntu Desktop
    GCC/G++
    Geany (for quick projects)
    Anjuta (for larger things)

  2. #2
    Registered User
    Join Date
    Apr 2008
    Posts
    890

  3. #3
    Use this: dudeomanodude's Avatar
    Join Date
    Jan 2008
    Location
    Hampton, VA
    Posts
    391
    I'm confused...

    So, the second argument has something to do with the .def file that lists the exports of the dll? MSDN is sometimes written in a manner where someone is assumed to know more than he/she actually might know...
    Ubuntu Desktop
    GCC/G++
    Geany (for quick projects)
    Anjuta (for larger things)

  4. #4
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    839
    it's the name of the exported function whose address is being returned

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. doubt in c parser coding
    By akshara.sinha in forum C Programming
    Replies: 4
    Last Post: 12-23-2007, 01:49 PM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 09:10 AM
  4. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM
  5. Replies: 5
    Last Post: 02-08-2003, 07:42 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21