locked
What is the equivalent for ftell() in C++ winRT?

    Question

  • Hi,

    I have the following code

    ComPtr<IStream> sourceStream;
     HRESULT hri = CreateStreamOverRandomAccessStream(reinterpret_cast<IUnknown*>(istream), IID_PPV_ARGS(&sourceStream));

    I have to check the file position by using IStream.

    Please help me out what is the equivalent for ftell() in IStream.

    Ashok

    Friday, September 13, 2013 5:32 AM

All replies

  • I can't seem to find one in WinRT.  I'll ask about it, but couldn't you keep track of this manually?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, September 13, 2013 2:34 PM
    Moderator
  • Hi Matt,

    Thanks for the reply. Since we have to do the code similar below

    if (fseek(pFile, ftell(pFile)+2, SEEK_SET)) {
        return -1;
       }

    it is not possible to keep track manually. Please help me to resolve ftell in winRT.

    Regards

    Ashok

    Friday, September 20, 2013 5:12 AM