|
Boost Users : |
From: Slavomir Kaslev (slavomir.kaslev_at_[hidden])
Date: 2007-08-31 03:41:13
On 8/31/07, Kamil Zubair <kamilzubair_at_[hidden]> wrote:
> Hi, I'm trying to bind Win32 API function RegCloseKey
> like this (I'm using VC 2005 Express):
>
> HKEY hKey;
> //--initialize hKey
> boost::function<LONG(void)> RegClose =
> boost::bind(&RegCloseKey, hKey);
>
It seems that Boost.Bind can't handle __stdcall functions. Fortunately
Boost.Function can. Try this as a workaround:
HKEY key;
function<LONG ()> f = bind(function<LONG (HKEY)>(RegCloseKey), key);
Cheers.
-- Slavomir Kaslev
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