Re: pass pointer to a thread function ?

From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: 03/14/05


Date: Sun, 13 Mar 2005 19:25:04 -0500


"mandatory" <okllsam@nptklooohs.ru> wrote...
> 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 this:
>
> MyClass.ServiceExe (ServiceExecution):
>
> Can this be done ?

Not if the class function is a non-static member. See the FAQ, section 33.

> [..]

V



Relevant Pages

  • Re: Really **wonderful** website for C interview questions!!!!!
    ... > then you should take a look at the C FAQ by Steve Summit... ... to return a string from a function"), and compare FAQ 7.5b. ... ("What is a NULL pointer? ... Or see pages/7_6.html ("How to declare an array of N pointers to ...
    (comp.lang.c)
  • Re: working with addresses
    ... The URL to the C FAQ has been in my sig block for years. ... what the FAQ emphasises is that those who seek to write portable code ... reason for it, and I guessed that speed might be your reason. ... likely to make for further imbalances in pointer sizes. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: help alleaviate inheritance design confusion
    ... > within the bounds of Liskov Substitution Principle. ... > the base pointer to a derived object to garner access to the derived ... a.c.l.l.c-c++ FAQ: http://www.comeaucomputing.com/learn/faq ...
    (alt.comp.lang.learn.c-cpp)
  • Re: returning from worker thread
    ... I will be moving my audio thread pointer to become a member of my view. ... let the audio thread function basically act as a switch and not much more; ... What's wrong, at shutdown, with signaling the audio thread's WFSO (which ...
    (microsoft.public.vc.mfc)
  • Re: current address
    ... > Vu Pham wrote: ... >> In order to mark the current address at a given point of the variable ... The OP should also remember that although pointer can be written ... C++ Faq: http://www.parashift.com/c++-faq-lite ...
    (comp.lang.c)