Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6228057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:19:27+00:00 2026-05-24T09:19:27+00:00

see i m writing one avi demuxer library. In which i have exported multiple

  • 0

see i m writing one avi demuxer library. In which i have exported multiple API to do different functionality. NOw when 1st time one aviopen() is called with i/p filename, i parse whole file & save some info in some structure which i have malloc. now when again any API is called for that file should use that structure’s info & do some work.

i DO NOT want to expose those structure to library user. even i DO NOT want no give him the pointer of that structure. In that case how can i keep the track of that structure???

i also want to give multiple file support in my library so if any application wants to open more than one file at a time then he can do that.

so here how can i maintain handle of each opened file for allocated structure?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:19:27+00:00Added an answer on May 24, 2026 at 9:19 am

    An opaque pointer is the usual way to implement this.

    If you don’t want to pass a pointer at all for some reason, you could keep a global (“private”) array/hash of your structures, and give your users an index in that global container (could be a plain int). That’s much more work (and much more failure-prone and potentially racy) than just handing out opaque pointers though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing an sql statement (see below) which compares 2 serial numbers on 2
I developed some application 'till now. Now I'm writing a new one and in
In writing a copy constructor for one of my classes ( which holds a
Ok this one is might not have a straight forward answer but lets see.
I have an ASP.NET application which tracks statistics by creating and writing to custom
I am writing a Greasemonkey script in which in one place I'm converting all
I am writing GUI applications for some time now and one thing I always
I'm writing some form. I have one field in this form that contains a
I am writing a service which needs to see if its caller holds a
I'm writing an application for android and have a fairly simple SQLite3 database (see

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.