Boost logo

Boost Users :

Subject: Re: [Boost-users] [function] dynamic function factory
From: Alexander Lamaison (awl03_at_[hidden])
Date: 2010-03-10 14:59:49


On Wed, 10 Mar 2010 20:51:38 +0100, joel falcou wrote:

> Alexander Lamaison wrote:
>> template<typename Signature>
>> boost::function<Signature> proc_address(
>> hmodule hmod, const std::string& name)
>> {
>> return boost::function<Signature>(GetProcAddress(hmod, name.c_str());
>> }

> IIRC MSVC has problem with the int() notation try the portabel function
> usage:
>
> boost::function<int,void> or something

Unfortunately, I can't write proc_address<int, int> because it only has the
single Signature template paramter. I notice that the boost 'portable
syntax' would be boost::function*X*<int, void, etc...>. I don't have
numbered versions of proc_address. Is this what I need to get it to work?

Alex


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net