pass pointer to a thread function ?

From: mandatory (
Date: 03/13/05

Date: Sun, 13 Mar 2005 23:48:38 +0100


i would like to pass a pointer to a thread function to a class.

The function in my code that i would like to get the address of, and pass it
to a class function is:

DWORD ServiceExecution(LPDWORD param)

And i would like to somehow send the address to a class function, similar to

MyClass.ServiceExe (ServiceExecution):

Can this be done ? i have abit troubles getting it working - i remember that
i in the early years in normal C could do this fairly easy - but it has
really slipped my mind how the syntax is, and if its possible at all...

hope you can help !

Relevant Pages

  • Re: MFC thread question
    ... was not in my mind. ... But by passing 'this' you permit the static thread function to call a nonstatic member function, ... Once you are in the nonstatic member function there is no further need to use the pointer. ...
  • Re: verknuepfte liste umdrehen
    ... its expression in the syntax of declarations. ... several into an array, yields it from a function, or ... is a pointer to it. ... declare an integer, a pointer to an integer, a pointer to a ...
  • Re: Why C has Pointers.
    ... Sure it is because it ain't *(arr + i). ... you look closer you will will see there is not a single pointer in my ... C syntax, even if it wasn't clear what the syntax you were using was ... (which is false according to C syntax and semantics on any ...
  • Re: inline
    ... structure members regardless of their type, ... structure, it could "inline" it in the sense that it would become a compile-time constant, sometimes allowing the compiler to completely throw away whole branches of conditionals, etc. ... Are you saying that I would want to use the pointer in the structure instead of directly calling Common_Deg2Radin those cases when I do *not* want the call inlined? ... It's just a regular function with a funny name and an implicit extra parameter that needs to be passed to the function using a funny syntax that looks like the syntax of an indirect call through a pointer sitting inside the structure. ...
  • Re: Request for code sample re OutputCleanpoint
    ... difficultry getting the data and syntax correct: ... Second is to call the method SetProperty of this interface and three things ... The pointer to the buffer and the length of the pointer or the buffer .. ...