c++ - How to Return a vector to Windows thread function? -


I have written a library that contains functions and two thread functions. From the I user program, As a parameter I will call in the form. The function creates threads according to the number of drive IDs given by me. Then this thread process will process the drive to get the list of folders from the drive and keep it in line once it is finished, it is called certain threads (which I have started with MAX_Threads) and this child Threads will act on the queue and list the files inside the drive in their respective vector. Now my problem is that I have to return these vectors to the statement which is called a library. I referenced through many sites, but I did not find the desired results.

The snippet I have implemented ..

  ListFiles (string drive) {create loop (not drive) threads} DWORD WINAPI File List: Parathread (LPVODS) {// Process Drive Directories. Push_back (path + "\\" + FFD cipher name); // global queue // it will be closed and then each thread loop (max-threads) will be inserted by CreateThreads and will be released. DWORD WINAPI FileList :: List (LPVODSS) {// Make Local Local Vector / Local Queue for each Thread  

Now I want to return these vectors to the statement that list list files Want to return what is in the library .

The library can create a function vector and pass its address in the LPVOD thread parameter. If you need many vectors, they are put in the strat and the address of the strat is passed in the LPVOID thread parameter.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -