Thread: _beginthread & calling a class member function

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    20

    _beginthread & calling a class member function

    I have a class with public functions & member variables. Within one of its function definitions I am calling _beginthread to do a longer function. That longer functions is of that class from which I called _beginthread. I cannont pass the additional thread any variables:
    Code:
    void __cdecl FUNCTION(void *)
    {
    ClassFunction();
    
    _endthread();
    }
    How can I access any member functions with out an object?

    Thanks!

  2. #2
    Tropical Coder Darryl's Avatar
    Join Date
    Mar 2005
    Location
    Cayman Islands
    Posts
    503
    You can't.

    While it's possible to access static member functions without an object, they in turn can only use other static member functions/data.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  2. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 08:56 AM
  3. Replies: 6
    Last Post: 04-27-2006, 10:55 AM
  4. Staticly Bound Member Function Pointers
    By Polymorphic OOP in forum C++ Programming
    Replies: 29
    Last Post: 11-28-2002, 01:18 PM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM