Boost logo

Boost Users :

From: Ben Hutchings (ben.hutchings_at_[hidden])
Date: 2005-03-11 07:14:22


Olenhouse, Jason wrote:
> I'm trying to pass a member function pointer around to the Windows Service Control Manager through
> Windpws API functions, but I think I'm having troubles with the __stdcall convention.
<snip>

No, the problem is passing a member function pointer. A member function
pointer is not type-compatible with a function pointer with the same
parameter types, regardless of whether they have the same calling
convention.

ServiceMain has to be a static member or free function. If you really
need to pass your own argument(s) to it then use a static variable or
TLS slot.

Ben.


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