eckmul
December 15th, 2004, 05:04 AM
Hi,
First of all, sorry for my english.
I'm making some modifications in a soft that do not use MCF, and I want to use the CreateThread function.
HANDLE CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
SIZE_T dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter,
DWORD dwCreationFlags,
LPDWORD lpThreadId
);
One of the parameters is the adress of a function, but I would prefer to put a method's adress, and it doesn't compile...
I could create a function which could call the method of my class ( and I must create a global variable with the instance of my class) but that's not very smart.
I'm wondering too if I could cast the adress of my method into the right type, I'm not sure it's very safe. Does anyone have already tried ?
Thanks for your help.
First of all, sorry for my english.
I'm making some modifications in a soft that do not use MCF, and I want to use the CreateThread function.
HANDLE CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
SIZE_T dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter,
DWORD dwCreationFlags,
LPDWORD lpThreadId
);
One of the parameters is the adress of a function, but I would prefer to put a method's adress, and it doesn't compile...
I could create a function which could call the method of my class ( and I must create a global variable with the instance of my class) but that's not very smart.
I'm wondering too if I could cast the adress of my method into the right type, I'm not sure it's very safe. Does anyone have already tried ?
Thanks for your help.