Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How to realize ## without #define (maybe with inline)?

Reply
Thread Tools

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

 
 
Hua.watson@gmail.com
Guest
Posts: n/a
 
      09-15-2008
#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?

Thanks
 
Reply With Quote
 
 
 
 
Hua.watson@gmail.com
Guest
Posts: n/a
 
      09-15-2008
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

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      09-15-2008
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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.

--
Ian Collins.
 
Reply With Quote
 
red floyd
Guest
Posts: n/a
 
      09-15-2008
On Sep 14, 10:45*pm, Ian Collins <(E-Mail Removed)> wrote:
> (E-Mail Removed) wrote:
> > 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.


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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
how to realize WDS?? sjdy Wireless Networking 1 04-04-2005 05:05 AM
How to realize the communication of applet and ejb? Java 0 08-23-2004 05:42 AM
Switching items between listboxes, and letting .net realize it. Ryan Ternier ASP .Net 1 07-25-2004 05:18 PM
How to realize user interfereing like CS program? Lei Guangfu ASP .Net 1 10-19-2003 06:31 AM



Advertisments