
31 Aug
2007
31 Aug
'07
7:41 a.m.
On 8/31/07, Kamil Zubair <kamilzubair@yahoo.com> 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