file formats
May 7, 2007 1:09 AM

Is there any way on windows xp to find out what process the computer goes through, say, when I double click on a word document or play a song, or do anything.

Like what code it uses to do this, where that code is, etc.
posted by amsterdam63 to Computers & Internet (9 answers total) 1 user marked this as a favorite
Windows code is proprietary, but maybe How Operating Systems Work on Howstuffworks is a good starting point. Not sure on what you're looking for, do you have a computer science/coding background or are you just curious?

Also, what do you mean by "file formats" in your title?
posted by ALongDecember at 1:27 AM on May 7, 2007


I'm really just curious. By file formats, I was originally going ask about how the computer distinguishes the 1's and 0's in one file as text, and in another as sound waves.
posted by amsterdam63 at 1:32 AM on May 7, 2007


For your original question, wikipedia has a decent answer.
posted by ALongDecember at 1:37 AM on May 7, 2007


Depending on your understanding of computer code, you may be looking for tools like a disassembler; most debugger tools include at least a rudimentary disassembler. If you were trying to do a complete reverse engineering project, and were working with a RISC processor, you might want to try a decompiler, but with x86 CISC processors, decompilers are less useful.
posted by paulsc at 1:39 AM on May 7, 2007


Sysinternals is the site for you. Lots of low level system tools so you can take that peek under the hood.
posted by Mach5 at 2:27 AM on May 7, 2007


In answer to your second question, and talking specifically about Microsoft's Windows products - the computer recognises what type of data a file represents (in the main) by the file extension. file.txt will be handled by the computer as a text file, whereas file.mp3 will be handled as a music file, etc.

It is, of course, not as simplistic as this - different applications store their 1s and 0s in different ways and some applications can recognise their own files even if the file extension is wrong (often because the first data in the file is some information as to what's in the file).

Different operating systems work in different ways, but, in general on Microsoft OSs, the extension is king!
posted by benzo8 at 3:20 AM on May 7, 2007


So, to follow up, reading your question again, basically when you double-click on a file, Windows checks the file extension and looks it up in a table against the application it should use to open that type of file. It then calls the application, sending it the name of the file you clicked on as an argument. The application opens, and tries to load the file.

If you right-click on a file and select Properties from the drop-down menu, youĺl see an Option "Opens With" which enables you to manipulate this process somewhat. (Warning - messing with this when you don't know what you're doing can break things!)
posted by benzo8 at 3:24 AM on May 7, 2007


Mach5 nails it. To expand a little more on this. Process explorer will show you the processes your computer is using. Word uses word.exe, etc. It also may spawn other processes. This is processing (CPU) stuff.

Next is disk. You want to use FileMon (file monitor) to see what files are in use when you start a new program. This is disk stuff.

Next is network. TCPView shows you what network connections are active. This is internet/LAN stuff.

These three tools are very user-friendly and will reveal a lot about the operating system and the applications in use.

I'll also mention autoruns, which will show you what programs start at boot time.
posted by damn dirty ape at 8:03 AM on May 7, 2007


The computer doesn't so much distinguish the bits in one file as text, another as sound waves, another as numbers and another as pixel values, as interpret the bits in those ways.

Whether that interpretation is meaningful or useful is largely up to you.

Notice that I'm talking about bits, not "1's and 0's": that pair of number values is simply one of many meanings that can be attached to bit values.

Different application programs interpret bits (or more frequently, groups of bits) in different ways, and each has a set of operations it can perform on those bits that help you use them for what you've decided they're for.

For example, if you make a short sound recording on Windows and save it as foo.wav, then start Wordpad, go to File->Open and tell it to show All Files, it will actually let you open foo.wav with the bits interpreted as text characters instead of sound sample numbers. It will look like gibberish, but you will be able to make changes; and if you do so, and save it back to foo.wav, and then open foo.wav with something that plays sound, you will probably hear some differences.

Most applications have a large variety of interpretations for the bits in the files they manipulate. In a typical Word document, for example, some bit groups will be interpreted as numbers, others as text characters, others as pixel values, and still others as metadata that specifies what kind of interpretation should be applied to other bits elsewhere in the file. The collection of interpretation rules defines a file format, and most applications define at least one for their own use.

On Windows, the filename extension (.txt, .doc, .wav, .pdf, .exe, .dll etc) serves as a hint (which is usually correct) about what format the file so named is in. And as benzo8 says, Windows uses the file extension to look up the appropriate application program to process that file when you double-click on it.

You can find out which applications on your particular Windows installation will be run for each recognized file extension by looking under Tools->Options->File Types in Windows Explorer. Be careful changing things in there; it really is easy to break things. It's also useful to turn off the "Tools->Options->View->Hide extensions for known file types" option, to get a more complete picture of what your machine is up to.
posted by flabdablet at 8:26 AM on May 7, 2007


« Older So does this guy like me or what?   |   26 year sobriety gift for dad? Newer »
This thread is closed to new comments.