Sorry. I found out the error when studying the call stack. It has nothing to do with the multi-thread programming but because the key used in the encryption function is destroyed when any of the encryption function is finished within a thread. The memory access violation was caused by reading an empty encryption key:-)
cheers
User Profile
Collapse
-
access violation reading location when using WaitForMultipleObjects
Hi,
I am writing a multi-threads encryption application. The idea of the code is to create a number of threads to encrypt files. I have a thread pool say the maximum threads is 10. If the number of tasks (number of files waiting to be encrypted) is larger than the thread pool size, I first create 10 new threads to execute the encryption function. Then I wait for any of the threads to be signaled in the thread pool using WaitForMultiple Objects... -
-
Q regarding a strange behavior when using ifstream
Hi,
I now run into a very strange behavior when using ifstream. Can anyone please help me out here:
Basically, what I want to do is to encrypt a plain text file into a cipher text and then decrypt it back to the plain text file. I use ifstream to read the file into the buffer. Let's say the size of my encrypted file is 816 bytes. Normally after opening the file and calling the inf.read(garbag e, 16), the get pointer...
No activity results to display
Show More
Leave a comment: