Sharing file pointer between applications and DLLs

Joined
Oct 5, 2006
Messages
2
Reaction score
0
Hi,

I am doing C programming on Windows.

I have an application that uses two DLLs. I want the application and the DLLs to generate a single log file.

I open the log file in the application and then pass the file pointer to the DLLs. However, in the DLLs, when I do fprintf with the file pointer, the application crashes with an access violation.

Is it not possible to share file pointers between DLLs and applications?

Regards,
Dhruv
 
Joined
Oct 5, 2006
Messages
2
Reaction score
0
Hi,

I found that the crash is occuring at
"_lock_str(stream);"

in fprintf(...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top