how to get FILE* from CPVRTResourceFile ?

This topic contains 2 replies, has 2 voices, and was last updated by  Scott 5 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30853

    mkandula
    Member

    Hi,

    I have a situation where I need to get the FILE* ptr which you obtain from fopen, but I need this from a the object of CPVRTResourceFile. How is this possible ?

    Thanks.

    #35784

    mkandula
    Member

    hmm..ONLY source modification is the answer !! I actually needed this in Android, but I see you embed stuff into resource file and can be acccessed as string !! Suits me 🙂

    Request : please consider adding a function to retrieve FILE* ptr if not a memoryfile and where applicable. This is mainly to be compatible with other FILE handing sources.

    #35785

    Scott
    Moderator

    Hi,

     
    CPVRTResourceFile, when using the default load function only has the file open temporarily while it reads everything into memory. Once it has done reading it closes the file so there would be no FILE pointer for you to retrieve if such a function existed.
     
    From your own code you should be able to use fopen to get the FILE pointer that you can use.
     
    Thanks,
     
    Scott
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.