Anfängerfrage zu Singlethreading
-
Hallo Leuz,
komme von Borland C++ und wollte mal fragen...
Wie erstelle ich einen Thread in VS.NET?In Borland ging das über NEU Thread-Objekt, gibts sowas auch in der VS Umgebung?
Danke Euch schonmal

-
..Also in C++ 6.0 geht das so.
CWinThread * Callback_Thread; Callback_Thread = AfxBeginThread( ThreadSend, // function to run on thread (LPVOID)this, // value to pass to function THREAD_PRIORITY_NORMAL, // thread's priority 0, // stack size CREATE_SUSPENDED, // create susupended thread NULL); //start thread Callback_Thread->ResumeThread();ThreadSend ist eine function die aussieht wie unten aufgemalt und die den thread steuern soll.
UINT ThreadSend(LPVOID xthis) { int tsg_return = 0; Transaction* _this = (Transaction*)xthis; tsg_return = _this->sendFile(); return 0; }Diese function schaut fast immer gleich aus.
hilft Dir das?
lg
l00P
-
Danke das wars genau

-