How to realize ## without #define (maybe with inline)?

H

Hua.watson

#define ABC_DLL_F_GET(hDll, func_name) \
{ \
(fproc_t &)lpfn##func_name = abc_GetProcAddress(hDll, #func_name); \
}

If I want to modity this #define macro to something in good C++ style
like a inline func, how should I do$B!)(B

Thanks
 
H

Hua.watson

by the way, this macro is used in an .cpp to provide explicit linking
of DLL. It provides accessing to exported functions of DLL just like a
normal function, as well as use the same header file provided by the
DLL

Is there any good library provides this functionality ? Then I need
not write it myself
 
I

Ian Collins

by the way, this macro is used in an .cpp to provide explicit linking
of DLL. It provides accessing to exported functions of DLL just like a
normal function, as well as use the same header file provided by the
DLL

Is there any good library provides this functionality ? Then I need
not write it myself
Maybe you should ask on a windows programming group where dlls are topical.
 
R

red floyd

Maybe you should ask on a windows programming group where dlls are topical.

I'm not so sure. I'm as much of an off-topic cop as the next guy, and
it seems that what he's really looking for is how to replace the
(ugly) macro with an inline function, which *is* on topic.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top