Questions tagged [createthread]
70 questions
0
votes
1 answer
Error in C++ builder CreateThread()
Hey, I'm Trying to make a programa in C++ that generate triangle, square and sine, waves. I enter the frequence, amplitude, etc, and it calculates the average of the wave. And i cah choose what wave generate by selecting a radio button.
This is a…

rogcg
- 10,451
- 20
- 91
- 133
0
votes
2 answers
How to wrap function pointer in plain C
Is it possible to "wrap" a function pointer in C somehow, similar to what you would do with a lambda in C#?
Actual problem I am having is:
I have a couple of functions with different parameters:
// more than two in actual code
void DoStuff(void) {…

Lou
- 4,244
- 3
- 33
- 72
0
votes
1 answer
Multithreading program executing only last created thread?
I have created 4 threads, but when i am executing this program I am getting this as output:
Thread #: 1
Thread #: 2
Thread #: 3
Thread #: 3
Thread #: 4
Thread #: 4
Thread #: 4
Thread #: 5
Thread #: 5
Thread #: 5
.
.
.
Thread #: 5
Thread #:…

Shikha Sinha
- 15
- 4
0
votes
1 answer
createthread in WinCE
I have this code written in MFC as a win32 application:
CZoneThread* pThread = new CZoneThread( sZoneInfo );
pThread->CreateThread();
Here, CZoneThread is another class.
Will this code work correctly in WinCE as well?

ame
- 317
- 1
- 6
- 21
0
votes
1 answer
C++ CreateThread() LPSTR argument error Windows 7 (64)
i'm trying to create a simple program using CreateThread() function. I need to pass an LPSTR argument to the new thread function inside struct pDataArray. Im following the example of MSDN ( MSDN CreateThread() Example ).
typedef struct MyData…

Ikary
- 47
- 1
- 7
0
votes
1 answer
How do i solve this run time error?
I tried to hook CreateThread() function by using Detour library. But it won't work due to some errors. Finally just call the CreateThread function rather than direct call, I construct my own DLL. During DLL construct and program compilation. It…

Muthupandi
- 109
- 3
- 11
0
votes
0 answers
C++: Which API is recommended for implementing threading model in a windows application
I have a C++ application which needs to be multi-threaded in windows platform. After browsing some forums, I gave CreateThread API a try. Here is the link giving details regarding its signature.
But, it always throws Access violation error and after…

Sankalp
- 2,796
- 3
- 30
- 43
0
votes
2 answers
CreateThread vs PsCreateSystemThread - What is the difference?
I would like to ask what are the differences between PsCreateSystemThread and CreateThread. From MSDN description it seems to that PsCreateSystemThread is for Kernel Thread.
CreateThread seem like a kernel thread but share the same virtual space…

user2306421
- 83
- 1
- 2
- 10
0
votes
1 answer
Synchronizing a thread with two running threads, c++, windows
I am a newbie in multithread programming and this is my first post here! So please bear with me.
I have two cameras which I would like to track an object simultaneously (two independent threads) and output its position to the main function or…

user2426357
- 31
- 5
0
votes
1 answer
Win32api passing struct to create thread
i'm trying to get this struct into my thread, however i'm getting trash in it.
struct i'm using:
typedef struct {
HWND hWnd;
int cntrlid;
TCHAR text[BUFF];
}parametros;
in the message switch i have the case to control a button witch…

Roger Martins
- 33
- 6
0
votes
2 answers
Creating thread in windows 8 with c language
i wanted to know does the routine CreateThread works in windows 8 ?
if yes does it enough to add header file #include or some other changes are added in windows 8

user121986
- 81
- 1
- 2
0
votes
1 answer
Windows CreateThread within a class function call, pointer reference crash?
Below I have an int main() and two header files, one of which is a class for creating a thread and another which is a class called object that gets created within the windows_thread class. This really simple exercise should output 99 but instead its…

pandoragami
- 5,387
- 15
- 68
- 116
0
votes
2 answers
CreateThread inside a class error: argument of type 'DWORD (windows_thread::)(void*)' does not match 'DWORD (*)(void*)'?
I tried to create a thread inside of a class and I got an error. I'm just wondering if there is way around this or must I use threads within int main() only?
C:\windows_thread_2\windows_thread_2.cpp||In member function 'void…

pandoragami
- 5,387
- 15
- 68
- 116
0
votes
1 answer
C++ CreateThread does not show result
i'm trying make asynchronous server listener with C++ i'm new in c++ but i must do this project , i'm web developer (PHP) but PHP can't make async connections + he is very poor language for big amount of connections... i can write simple listener…

user1360571
- 1
- 3
0
votes
1 answer
Winsock threaded server does not work well when multiple clients connect?
I have a server that spawns a thread for each client that connects to it. The thread then deals with receiving/sending data to the client. Here is my server code:
//////////////
// START //
/////////////
while( 1 )
{
if(…

infinitloop
- 2,863
- 7
- 38
- 55