Click here to Skip to main content
15,884,962 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey,
I am new to thread pools and well I wanted to start of by creating and destroying a thread pool first,I assume that's how we create a thread pool:

PTP_POOL Pool = CreateThreadpool(NULL);
if(Pool!=NULL)
{
cout<<"Pool Created"<<endl;
}

the code builds fine,however when I run it,I get the following pop up message:

The procedure entry point Create Threadpool could not be located in the dynamic link library KRENEL32.dll
Posted
Comments
CPallini 19-Apr-13 6:10am    
Does your system satisfy minimum requirements (Windows Vista)?
Aayman Khalid 19-Apr-13 6:23am    
no it's xp:(
Philippe Mori 19-Apr-13 18:40pm    
You should always read MSDN documentation for a function that you don't know and pay attention to its requirements.

1 solution

As CPallini has pointed out this API requires Windows Vista at runtime and a _WIN32_WINNT >= 0x0600 at compile time in order to use it.

There are plenty of other C++ Thread Pool implementations which work very well on Windows and existed before Microsoft chose to expose an API to their own. Try searching Code Project for 'Thread Pool' and you'll see.
 
Share this answer
 
Comments
Aayman Khalid 19-Apr-13 7:35am    
Alright,Thank you...
CPallini 19-Apr-13 7:56am    
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900