• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How does an OS hand a data file over to a process when a user clicks on an icon?

chrstrbrts

Senior member
Hello,

Let's say you have an icon displayed on your GUI somewhere.

The icon represents a data file e.g. a text file, mp3, jpeg, etc.

The OS at some point has associated that file with a program.

We see this when the data file's icon is a copy of the program's logo e.g. a pdf file whose icon is a small adobe logo.

Anyway, my question is when you double click on a data file icon, how does the OS hand the data over to the process it just created?

Does it malloc the whole data file into the new process's heap?

Thanks.
 
Nope. The executables have variables, or command line options you can pass to them. So the os passes the name of the file to open when it launches the executable.
 
An icon is just an icon. The file will not actually be opened until it finds the program with which to open it. Then, that program actually opens the file.
 
Back
Top