View Single Post
Old 05-08-2018, 05:08
aliali aliali is offline
Join Date: Jan 2002
Posts: 54
Rept. Given: 4
Rept. Rcvd 8 Times in 4 Posts
Thanks Given: 1
Thanks Rcvd at 5 Times in 4 Posts
aliali Reputation: 8
Originally Posted by bugficks View Post
w/ thread_local its a per thread map and lib is loaded/freed per thread, if that thread exits is see no problem there. OS lib ref count is the same as it was before thread was entered.

well again, this was just a c++ type safe replacement for original post, nothing more nothing less. if you want to do an uber lib loader youre free to do so

if you want to optimize lookup you could as well just add an optional opaque pointer and store some infos there.
PHP Code:
template <typename Ftypename... ArgTypes>
auto DynCallT(void **opaqueLPCTSTR libNameLPCSTR funcNameArgTypes... args)

opaque && *opaque
    { (
cast_opaque_t)(opaque) ...} 
    { *
opaque=... }
void *ppp=0;
DynCallT(ppp, ...); 
anyways, it is what it is and it doesnt want to be more
Is it possible to have a pure ANSI C implementation of the above code
Reply With Quote