Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ C Threading
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 19-Apr-13 0:49am
Comments
CPallini at 19-Apr-13 6:10am
   
Does your system satisfy minimum requirements (Windows Vista)?
Aayman Khalid at 19-Apr-13 6:23am
   
no it's xp:(
Philippe Mori at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Aayman Khalid at 19-Apr-13 7:35am
   
Alright,Thank you...
CPallini at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 575
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 369
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,466
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,897


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 19 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100