Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Threads, Method pointers

6 views
Skip to first unread message

Micahel Ribbons

unread,
Jan 17, 2004, 10:38:02 PM1/17/04
to
To start a new thread you pass CreateThread the address of a function to
start processing at.
How can I pass the address of a method of an object? EG @oMyObject:Method()?

Is this unsafe?

Michael Ribbons


Jamal Assaf

unread,
Jan 18, 2004, 1:01:11 AM1/18/04
to

Michael Rubinstein

unread,
Jan 18, 2004, 5:30:37 PM1/18/04
to
Michael, you can't and you shouldn't. Multithreading and OOP are
different animals, you are better off not mixing them. What are trying to
do?
If you need to launch a thread within a method, you can do it. But you
don't pass the address of the method. Instead you write a strong-typed
function declared AS DWORD or AS LONG (STRICT) and within your method you
make a call to CreateThread(), or better CreateVOThread(), passing the
address of that function. Within the function you do the processing you
need, taking precautions described in CAVO Help/How To section.

Michael

"Micahel Ribbons" <ri...@iinet.net.au> wrote in message
news:400a0014$0$1724$5a62...@freenews.iinet.net.au...

0 new messages