Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: [OT: C] Getting pointers to functions

by BrowserUk (Patriarch)
on Dec 30, 2016 at 14:02 UTC ( [id://1178653]=note: print w/replies, xml ) Need Help??


in reply to [OT: C] Getting pointers to functions

Assuming that all the functions you're trying to get the addresses of are exported from a dll, you could use GetProcAddress() to look them up.

Two possible problems:

  1. It's a windows-only function, though I would think that *nix would have something similar.
  2. The names required are those exported, which is (mostly) okay for C code, but can be horribly mangled for C++.

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: [OT: C] Getting pointers to functions
by syphilis (Archbishop) on Dec 31, 2016 at 08:19 UTC
    ...you could use GetProcAddress() to look them up

    Good point - I hadn't thought of that largely because I'm using static libraries.
    Although I habitually use static libraries, there's no real need for me to avoid using dynamic mpfr and gmp libraries.

    Cheers,
    Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1178653]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found