in reply to Re^2: On Yaks and the Shaving Thereof - finding exported symbols of a C library
in thread On Yaks and the Shaving Thereof - finding exported symbols of a C library

Aha...

As long as GetProcAddress is in the core, you even can use it from Perl...
but - beware: perldoc win32

Win32::GetProcAddress(INSTANCE, PROCNAME) Returns the address of a function inside a loaded library. The information about what you can do with this address has been l +ost in the mist of time. Use the Win32::API module instead of this deprecated function.

anyway, you could do this in XS, then, but still - I would prefer parsing output of 'dumpbin' command...

update still no way to have function name by ordinal, BTW...
:(

Replies are listed 'Best First'.
Re^4: On Yaks and the Shaving Thereof - finding exported symbols of a C library
by Corion (Patriarch) on Mar 23, 2011 at 10:26 UTC

    Yes - my current list of preferences is

    1. See how ExtUtils::CChecker fares, especially concerning speed per checked symbol and the compatibility wishes of Maddingue. Currently Net::Pcap claims to be compatible back to Perl 5.004, and this build prerequisite will likely break that.
    2. See whether I can coax DynaLoader into providing a list of symbols. On Win32, DynaLoader is basically LoadLibrary() and GetProcAddress() anyway.
    3. Parse the output of nm or dumpbin.exe to get at the list of exported symbols. This has the attractive feature of allowing to find the symbols not only of DLLs but also of .a and .o files.