the other funny thing is that i can't find QueueUserWorkItem in my MSDN lib on my computer i can find it only in the internet versionQuote:
Originally Posted by Arjay
Printable View
the other funny thing is that i can't find QueueUserWorkItem in my MSDN lib on my computer i can find it only in the internet versionQuote:
Originally Posted by Arjay
Since you are using VC6, you will probably need to install the Platform SDK. This includes features in Windows that weren't available when VC6 was released.Quote:
Originally Posted by raindog
Arjay
i'll dl it and let you know but it will take me about 10h because i have a 128Kb/s connection :sick:
could you please explain to me the questions i've asked at the end of the 1. page of this thread
thanx in advance
The '::' colons are a scoping operators which don't really matter much in this c-style program. In C++, if I was in a window class that had a member FindWindow, if I wanted to call the native FindWindow api (instead of my FindWindow member), I would call ::FindWindow. This would tell the compiler to look outside the class scope for the function. In this sample, it really doesn't matter since we don't have a class with a CloseHandle method anyway - I really did it out of habit. _tmain is the default main declaration given when creating a console project in .net 2003. It appropriately passes the correct ANSI or UNICODE strings to main depending on the compiler settings (i.e. whether the app is compiled as UNICODE).Quote:
Originally Posted by raindog
Arjay
thank you very very much:thumb:
i've installed it i've registered it with visual studio and it still won't work ... looks like there is no hope since i use visual studio 6. i'll have to write my own thread pool :sick:Quote:
Q What version of Microsoft Visual Studio is required to build the Platform SDK samples?
To build the Platform SDK samples, you need either Microsoft Visual Studio .NET or Microsoft Visual Studio 2003. For more information, see Microsoft Visual Studio
Did you make sure to change the include and lib search order so that the platform sdk files are used before the VC6 ones? Search VC help for 'VC++ Directories.' If I recall correctly it's in the "Tools\Options" menu. There should be no reason for QueueUserWorkItem not to work in VC6 with the current SDK installed.Quote:
Originally Posted by raindog
Arjay
now it passes the compile but there is a problem the last thing that the prog writes is IN thread count 500 but it never writes out the resultQuote:
Originally Posted by Arjay
Did you import the threadpool.cpp exactly into the VC6 project? Have you set a breakpoint on the start of the Integral function and debug it?Quote:
Originally Posted by raindog
yes and no thread passes by theQuote:
Originally Posted by Arjay
i think that is because even thou i use this method i still need 1000 threads to be created and the pool allows only 500... i think this because when i raise the deltax to say 1 it works fineCode:WaitForMultipleObjects(sizeof(aHandles)/sizeof(HANDLE),
&aHandles[0],
TRUE,
INFINITE);
I tried both the 0.015 and 0.010 values and it worked - do these values work for you?Quote:
Originally Posted by raindog
no they both stop at in 500 threads could you send me the exe files of those which workQuote:
Originally Posted by Arjay
this is how the program copiled on my computer with 0.01 looks like
what operating sistem do u use ... i use XP SP2 ... if you use some other maybe that is why it works with you ... and you see an average of 400 threads because the rest of the screen flies by and you only see the exiting stage but to reach the lowest children you still need to create more than a 1000 threads when using 0.01 .... just a thought :)