By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,655 Members | 962 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,655 IT Pros & Developers. It's quick & easy.

fclose() causing access violation in threadFunc

P: n/a
Hello,

I saw several posts dealing with similar issues but was unable to
find a resolution.

I have a multi-threaded application where different threads
operate on different files. I do not see a chance for a conflict where
a file pointer from one thread would be available to another. However,
I'm getting an Access Violation on the fclose() in some threads. I
would appreciate any insight into the same. Since this is a C++ group,
I also tried ofstream related methods, but they too cause the same
error.

Thanks in advance,

Anoop
Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Anoop Nair wrote:
I saw several posts dealing with similar issues but was unable to
find a resolution.

I have a multi-threaded application where different threads
operate on different files. I do not see a chance for a conflict where
a file pointer from one thread would be available to another. However,
I'm getting an Access Violation on the fclose() in some threads. I
would appreciate any insight into the same. Since this is a C++ group,
I also tried ofstream related methods, but they too cause the same
error.


Multi-threading is not part of C++ and that makes your problem basically
not possible to solve using C++ language means. I am guessing here, but
you probably will be able to find more information in a newsgroup specific
to threads (comp.programming.threads) or to your OS (comp.os.???).

Victor
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.