Sharing file pointer between applications and DLLs

Discussion in 'C Programming' started by Dhruv, Oct 5, 2006.

  1. Dhruv

    Dhruv

    Joined:
    Oct 5, 2006
    Messages:
    2
    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
     
    Dhruv, Oct 5, 2006
    #1
    1. Advertising

  2. Dhruv

    Dhruv

    Joined:
    Oct 5, 2006
    Messages:
    2
    Hi,

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

    in fprintf(...)
     
    Dhruv, Oct 5, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWFydGluIExlZQ==?=

    Sharing Session State between Applications

    =?Utf-8?B?TWFydGluIExlZQ==?=, Sep 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    571
    =?Utf-8?B?U3VkaGFrYXIgU2FkYXNpdnVuaVttdnBd?=
    Sep 7, 2004
  2. W Akthar
    Replies:
    4
    Views:
    548
    Kevin Spencer
    Nov 4, 2004
  3. groston
    Replies:
    1
    Views:
    388
    =?Utf-8?B?U2NvdHQgU2ltb25z?=
    Jan 19, 2005
  4. =?Utf-8?B?RnJhbmNpcyBSZWVk?=

    Sharing Users, but not roles between Applications

    =?Utf-8?B?RnJhbmNpcyBSZWVk?=, Apr 8, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    519
    =?Utf-8?B?RnJhbmNpcyBSZWVk?=
    Apr 10, 2006
  5. Steve Wampler
    Replies:
    2
    Views:
    2,312
    Steve Wampler
    May 21, 2004
Loading...

Share This Page