Tuesday, March 24, 2009

Black Hole Thermodynamics

One of the features of Hawking and Bekenstein's development of black hole thermodynamics is that it ties many many pieces of physics together. Among those pieces are:

The realisation from Quantum Mechanics that we can think of all matter-energy as waves.

The realisation from classical physics that in a confined region, waves exist as standing waves.

The realisation from thermodynamics that the entropy can be viewed as a measure of the number of combinations or permutations of an ensemble that are equivalent. This is equivalent to viewing the entropy more conventionally as a measure of the heat divided by the temperature of a body. According to the Second Law of Thermodynamics, in a closed system the entropy never decreases.

The realisation from Heisenberg's Uncertainty Principle that we can violate the principle of Conservation of Energy so long as we do it for only a short period of time.

The realisation from classical physics that all objects with a temperature above absolute zero radiate away energy as electromagnetic radiation.

Feynman's theory of antimatter as regular matter going backwards in time.

Virtual Pair Production

Recall Heisenberg's Uncertainty Principle. It basically puts a limit on how much we can reduce the disturbance we introduce in a system by doing a measurement on it. There are a number of forms of the principle, and here we shall use only one of them:

The uncertainty in any measurement of the energy of an object times the uncertainty in when the object had that energy will always be at least equal to a universal constant.

Technical note: The universal constant is Planck's constant h divided by 2 pi.

A moment's reflection on the implications of this form of the Uncertainty Principle may convince you that this means that the energy does not even have a definite value but only a lower and upper bound.

Thus the principle of conservation of energy can be violated so long as the violation occurs for only a brief period of time.

Now consider Dirac's infinite sea of negative energy electrons. One of those electrons can violate conservation of energy by spontaneously jumping into a positive energy state provided it falls back into the hole quickly enough. You will recall that we interpret the hole in the sea as a positron. Thus, we believe that this virtual pair production is occurring everywhere in the universe. The pair can only exist for a time of about 10-35 seconds, i.e. 34 zeroes followed by a 1 to the right of the decimal point; this is called the Planck time.

Similarly we believe virtual pairs of proton-antiprotons, neutron-antineutrons etc. are continually being formed and disappearing everywhere in the universe. Wheeler, then, characterises the vacuum at a scale of very small distances as being quantum foam.

Satellite Navigation Using GPS

The NAVSTAR Global Positioning System

The NAVSTAR Global Positioning System,usually called GPS, consists of three components: a space segment of GPS satellites, acontrol segment that monitors and operatesthose satellites and a user segment that employsGPS receivers to observe and recordtransmissions from the satellites and performposition, velocity, attitude and time calculations.

The GPS Space Segment

The space segment is based on three-axisstabilized satellites orbiting in near-circularorbits with a period of half a sidereal day andan inclination of 55 degrees. There are six orbitalplanes, each of them with four satellites.This constellation provides global coveragewith more than four satellites in view at alltimes.

The significance of the visibility of at least four satellites is that the GPS system is intendedto allow instantaneous real time determinationof the user position (3 variables) and thetime of the fix (one more variable). Previouspositioning systems, like the methods used inthe Transit and Tsikada systems, were basedon the processing of several passes of data(requiring hours to days) and did not providethe instantaneous solutions that GPS (orGLONASS) offers.

The GPS satellites carry very stable atomicclocks that are used to derive the ranging signals.The basic signal for civil use, L1, has afrequency of 1575.42 MHz and it is modulatedwith a Clear Acquisition (C/A) PseudoRandom Noise (PRN) code at 1.023 MHz thatis different for every satellite.

The signal isalso modulated with a 10.23 MHz Precise (P)code that is usually encrypted and only availableto authorized users. On top of this thereis a 50-bit-per-second modulation which isused to transmit the satellite ephemerides(predicted orbit and clock) and other information.

Authorized users have also access tothe Precise code on a second frequency L2,that allows users to correct for ionosphericpropagation delays. Some receivers are ableto measure the delay between the signal inthe L1 frequency and the L2 frequency withoutaccess to the P code. There are plans toadd in future satellites another frequency forcivil users so they can easily correct for ionosphericdelays.

The GPS Control Segment

The GPS control segment tracks and monitorsthe signal from the GPS space segmentand estimates the orbits and clock behaviourof the satellites. This information is uploadedto the satellites so it can be transmitted to users.

The GPS User Segment

The GPS user segment can perform two basicmeasurements of the GPS signals. It cancompare the C/A or P code that it is receivingwith a locally generated copy in order tocompute the transmission delay between thesatellite and the receiver. This measurementis called pseudorange. Pseudoranges to fouror more satellites can be used to determinethe position of the user once the position ofthe GPS satellites has been obtained usingthe ephemerides of the navigation message.

The second and more precise method is toobtain the difference in phase between thereceived carrier signal and a receiver generatedsignal at the same frequency. Thismeasurement is known as the carrier phaseobservable and it can reach millimetre precision,but it lacks the accuracy of the pseudorangebecause the phase when the trackingis started can only be known with an ambiguityof an unknown number of times the carrierwavelength (about 19 cm for L1)

GPS Global Positioning System

Global Positioning System is a constellation of 24 satellites which orbit at an altitudeof 20,200 km above the earth’s surface in an inclined elliptical orbit. GPS providesvery precise latitude and longitude details which will be in centimetres.

GPS coversthe whole earth and any point on the earth surface can be pin-pointed. The reasonfor choosing GPS satellite is because of its continuous availability throughout theyear.

If the future GPS satellites like GLONASS, GALILEO, etc., are equipped withirradiation measuring instruments like Total Irradiance Monitor [SORCE], etc., andmoreover, if the measurements are made continuously over the earth’s atmospherethen the amount of irradiation data available are enormous which will lead to betterresults in irradiance monitoring.

During any particular year at least a minimum of 12satellites will be facing the Sun and monitoring the irradiance over that region and theorbital paths of the satellite will be well-known.

One more added advantage of usingthe GPS satellite is the repetitive coverage over an area on a single day, so the variationin the same area over a short period of time can also be calculated.

Space- and ground-based measurement and monitoring

At any instant nearly 12 satellites will be facing the Sun and they will measure theirradiance. The orbital path of the satellites are predefined and well-known. To measurethe irradiation precisely the measurement should be made at ground also at thesame instant of time when the satellite is passing over a certain area.

The ground measurementsare performed to reveal the solar irradiation available on the ground afterseveral atmospheric path losses. The reasons to measure the irradiation both on topof the atmosphere and on the ground are to understand the changes occurring in theirradiation during their travel to the surface, etc. Ground instruments are required atseveral clearly available places for measurement.

For example, if the satellite is at a specific location in space and their co-ordinates interms of latitude and longitude are knownby pre-calculations, e.g., 13◦00 N80◦00 E,the satellite measures the irradiation at that particular position in space and if themeasurements are made in the ground at the same place then we can compare thechanges in the values.

If more number of ground stations are established then for eachground station data we will obtain the top of the atmosphere data from the satellite.More stations will lead to better results, because we can compare more ground datawith the satellite data.

For a particular instant of time and at a particular point we will get the irradiation atthe top of the atmosphere, at the ground, the difference in irradiation, the amount of loss during that time and the variation in irradiation when compared to the correspondingprevious readings at the same point of observation.

Though the irradiation variationon the top of the atmosphere is very small, monitoring those small variations will alsohelp us to understand the influence of solar radiation on earth. The ground monitoringis difficult also because of the multiple scattering of radiation from the ground whichmakes the reading difficult.

Though there are some difficulties, the data obtained fromthese calculations will be better than the interpolated or extrapolated values which arewidely used.

Compaq Presario CQ60-101AU laptop drivers for Windows XP

To successfully install the drivers in Compaq Presario CQ60-101AU Laptop with Windows XP operating System

please follow these steps

I. Get the following drivers and install in the given order only.
——————————————————————————
01. Chipset drivers - nVidia nForce chipset driver & Networking controller.exe (117MB)

02. AMD Processor Update - sp35445 (3MB)

03. WinXPSP2 Enhancements - sp28668_Enh4WinXPSP2.exe (3.3MB)

04. VGA/Display - see the manual Installation step below

05. UAA Driver for HD Audio - sp33566_UAA Bus Driver for HD Audio.exe (54MB)

06. HDMI Audio - HDMI-nForce_HDA_10.3.exe (7.5 MB)

07. Audio/Sound - download CQ60-101AU audio driver (3MB) (see help below to see how to install)

08. Modem - sp33839_Modem with SmartCP.exe(6MB)

09. Wireless - Wireless_Atheros.zip (2.2MB), sp34510_HP Wireless Assistant.exe (3.2MB)

10. Webcam - sp35414_HP 1.3MP Webcam Software Drivers.exe (5MB)

11. Dotnetfx2.0 - dotnetfx_2.0.exe (22MB)

12. Touchpad - Synaptics Touchpad.exe (6MB)

13. Quick launch - Quick launch buttons.exe (14MB)

14. Bluetooth - CQ60-101AU driver for bluetooth (98 MB)

——————————————————————–
I. Manual Installation Help for (04. VGA/Display)
——————————————————————–

1. Click START
2. Click RUN
3. Type “devmgmt.msc” in the prompt and click “OK”
4. In other devices>> right click “VGA adapter..”
5. Click “update driver”
6. Select “No, not this time” and Click “Next”
7. Select “Install from a list or specific location(Advanced)” and Click “Next”
8. Select “Don`t search. I will choose” and Click “Next”
9. From the list scroll down and select “Show All Devices” (the first option and not “Sound and video..”)
10. Click “Have Disk..”
11. Click “Browse” and choose this folder (the previous installation temp folder of chipset driver)
12. Select the “C:\NVIDIA\nForceWin2K\18.11\English\Display\nv4_disp.inf″ file and Click “Open”
13. Click “OK”
14. Select “NVIDIA GeForce 8200″
15. Click “Next”
16. Click “Finish”

—————————————————————-
II. Manual Installation Help for (07. Audio/Sound)
—————————————————————-

0. Download the corresponding file and unzip.
01. Click START02. Click RUN0
3. Type “devmgmt.msc” in the prompt and click “OK”
04. In other devices>> You will see two nos of “Audio Device on HD Audio Bus”
05. Right Click the first one and Click “disable”
06. In other devices>> right click the second Audio Device on ……..
07. Click “update driver”
08. Select “No, not this time” and Click “Next”
09. Select “Install from a list or specific location(Advanced)” and Click “Next”
10. Select “Don`t search. I will choose” and Click “Next”
11. From the list scroll down and select “Sound, video and game controller” and Click next
12. Click “Have Disk..”
13. Click “Browse” and choose this folder
14. Select the “/XP32/WiSVHe5″ file and Click “Open”
15. Click “OK”
16. Click “Next”
17. A menu appears saying “Installing …. Do you want to continue?” Click “YES”
18. Click “Continue Anyway”
===============================================================

—————————————————————-
III. Manual Installation Help for (09. Wireless )
—————————————————————-
0. Download the corresponding file and unzip.

1. Click START
2. Click RUN
3. Type “devmgmt.msc” in the prompt and click “OK”
4. In other devices>> right click “Ethernet Controller”
5. Click “update driver”
6. Select “No, not this time” and Click “Next”
7. Select “Install from a list or specific location(Advanced)” and Click “Next”
8. Select “Don`t search. I will choose” and Click “Next”
9. From the list scroll down and select “network Adapters” and Click “Next” wait
10. Click “Have Disk..”
11. Click “Browse” and choose this folder
12. Select the “/Atheros/net5211″ file and Click “Open”
13. Click “OK”
14. Click “Next”
15. Click “Finish”

SWF File compression strategy

Since SWF files are frequently delivered over a network connection, they should be as compact as possible. Several techniques are used to accomplish this, including the following items:

Reuse—The structure of the character dictionary makes it easy to reuse elements in a SWF file. For example, a shape, button, sound, font, or bitmap can be stored in a file once and referenced many times.

Compression—Shapes are compressed by using an efficient delta encoding scheme; often the first coordinate of a line is assumed to be the last coordinate of the previous line. Distances are also often expressed relative to the last position.

Default values—Some structures, like matrixes and color transforms, have common fields that are used more often than others. For example, for a matrix, the most common field is the translation field. Scaling and rotation are less common. Therefore, if the scaling field is not present, it is assumed to be 100%. If the rotation field is not present, it is assumed that there is no rotation. This use of default values helps to minimize file sizes.

Change Encoding—As a rule, SWF files only store the changes between states. This is reflected in shape data structures and in the place-move-remove model that the display list uses.

Shape Data Structure—The shape data structure uses a unique structure to minimize the size of shapes and to render anti-aliased shapes efficiently on the screen.

The SWF header

All SWF files begin with the following header.



The header begins with a three-byte signature of either 0x46, 0x57, 0x53 (“FWS”); or 0x43,0x57, 0x53 (“CWS”). An FWS signature indicates an uncompressed SWF file; CWSindicates that the entire file after the first 8 bytes (that is, after the FileLength field) wascompressed by using the ZLIB open standard. The data format that the ZLIB library uses isdescribed by Request for Comments (RFCs) documents 1950 to 1952. CWS file compressionis permitted in SWF 6 or later only.

A one-byte version number follows the signature. The version number is not an ASCIIcharacter, but an 8-bit number. For example, for SWF 4, the version byte is 0x04, not theASCII character “4” (0x35).

The FileLength field is the total length of the SWF file, including the header. If this is anuncompressed SWF file (FWS signature), the FileLength field should exactly match the filesize. If this is a compressed SWF file (CWS signature), the FileLength field indicates the totallength of the file after decompression, and thus generally does not match the file size. Havingthe uncompressed size available can make the decompression process more efficient.

The FrameSize field defines the width and height of the on-screen display. This field is stored as a RECT structure, meaning that its size may vary according to the number of bits needed to encode the coordinates. The FrameSize RECT always has Xmin and Ymin value of 0; the Xmax and Ymax members define the width and height.

The FrameRate is the desired playback rate in frames per second. This rate is not guaranteed if, for example, Flash Player is running on a slow or busy CPU. The Frame Count is the total number of frames in this SWF file.

SWF file format specification

The SWF file format (pronounced “swiff ”) delivers vector graphics, text, video, and soundover the Internet and is supported by Adobe® Flash® Player software.

The SWF file format isdesigned to be an efficient delivery format, not a format for exchanging graphics betweengraphics editors.

It is designed to meet the following goals:

On-screen display—The format is primarily intended for on-screen display and supportsanti-aliasing, fast rendering to a bitmap of any color format, animation, and interactivebuttons.

Extensibility—The format is a tagged format, so it can be evolved with new features whilemaintaining backward compatibility with earlier versions of Flash Player.

Network delivery—The format can travel over a network with limited and unpredictable bandwidth. The files are compressed to be small and support incremental rendering throughstreaming. The SWF file format is a binary format and is not human readable like HTML. The SWF file format uses techniques such as bit-packing and structures with optional fieldsto minimize file size.

Simplicity—The format is simple so that Flash Player is small and easily ported. Also, FlashPlayer depends upon a limited set of operating system features only.

File independence—The files display without dependence on external resources suchas fonts.

Scalability—The files work well on limited hardware, and can take advantage of betterhardware when it is available. This ability is important because computers have differentmonitor resolutions and bit depths.

Speed—The files render with quick, high quality.

Scriptability—The format includes tags that provide sequences of byte codes to beinterpreted by a stack machine. The byte codes support the ActionScript™ language. FlashPlayer provides a runtime ActionScript object model that allows interaction with drawingprimitives, servers, and features of Flash Player.

SWF files have the extension .swf and a MIME type of application/x-shockwave-flash.

The SWF format has evolved through several versions. Through SWF 5, substantial additionswere made to the SWF tag set. Starting with SWF 6 and later, the SWF format changes less,as more new features are implemented partly or entirely at the ActionScript level. Startingwith SWF 9, the ActionScript 3.0 language, which employs the new ActionScript VirtualMachine 2 (AVM2) can be used. Anyone planning to generate SWF file content that usesnewer features should become familiar with the ActionScript object model that Flash Playerexposes. Some references for this information are Programming ActionScript 3.0 (seelivedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part5_ProgAS.html), ActionScript 3.0 Language Reference (seelivedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/), and the Adobe ActionScript VirtualMachine 2 (AVM2) Overview at www.adobe.com/go/avm2overview/ (PDF file).Adobe seriously considers all feedback to the SWF file format specification. E-mail anyunclear or potentially erroneous information within the specification to Adobe atflashformat@adobe.com. All such email submissions shall be subject to the Submitt

QTFF Defining Media Data Layouts

The QuickTime file format provides a great deal of flexibility in how media data is physically arranged withina file. However, it also allows media layouts to be created that may be inefficient for playback on a givendevice. To complicate the matter, a media layout that is inefficient for one device may be, in fact, very efficientfor another. The purpose of this appendix is to define some common uses of QuickTime files and describethe media layout in these circumstances.

Using QuickTime Files and Media Layouts

A QuickTime file can reference media data stored in a number of files, including the file itself. If a QuickTimefile references only media data contained within itself, the file is said to be self-contained. A QuickTime filecan also reference media data stored in files that are not QuickTime files. This is because the QuickTime fileformat references media within a URL by file offset, rather than by a data structuring mechanism of a particularfile format. This allows a QuickTime file to refer to data stored in any container format.

Often, it is convenient to store a single media stream per file, for example, when encoding content. It is alsouseful for purposes of reusing content. (To reuse an elementary stream, it is not necessary to extract it froma larger, possibly multiplexed file.)

Because QuickTime can reference media stored in any file, it is not required that media be stored in theQuickTime file format. However, this is recommended. Putting the elementary streams in a QuickTime filehas several advantages, particularly in enabling interchange of the content between different tools. Further,the QuickTime file format adds very little overhead to the media—as little as a few hundred bytes in manycases—so there is no great penalty in storage space.

One of the issues facing any device (a server or a local workstation) that is attempting to play back a QuickTimefile in real time is the number of file seeks that must be performed.

It is possible to arrange the data in a QuickTime file to minimize, and potentially eliminate, any seeks duringthe course of normal playback. (Of course, random access and other kinds of interactivity require seeks.)Minimizing seeks is accomplished by interleaving the media data in the QuickTime file in such a way thatthe layout of the media in the file corresponds to the order in which the media data will be required. It isexpected that most servers, for example, will stream QuickTime media using the facilities of the hint tracks.

Take a scenario where the QuickTime file contains a single hint track that references an audio and a visualmedia stream. In order to eliminate all seeks, the hint track media must be interleaved with the audio andvisual stream data. Because the hint track sample must always be read before the audio and visual mediathat it references, the hint track samples must always immediately precede the samples they reference.

A simple illustration of the ordering of data (that is, time and file offset increasing from left to right) is asfollows:

H0 A0 H1 V1 H2 V2 H3 A1 H4 A2 V3 H5 V4

When a single hint sample references multiple pieces of media data, those pieces of media data must occurin the order that they are referenced.

QuickTime File Format Specification

Overview of QTFF

QuickTime movies are stored on disk, using two basic structures for storing information: atoms (also knownas simple atoms or classic atoms), and QT atoms. To understand how QuickTime movies are stored, you needto understand the basic atom structures described in this chapter. Most atoms you encounter in the QuickTimeFile Format are simple or classic atoms. Both simple atoms and QT atoms, however, allow you to constructarbitrarily complex hierarchical data structures. Both also allow your application to ignore data they don’tunderstand.

Metadata

A QuickTime file stores the description of its media separately from the media data. The description, ormetadata, is called the movie resource, movie atom, or simply the movie, and contains information such asthe number of tracks, the video compression format, and timing information. The movie resource also containsan index describing where all the media data is stored.

The media data is the actual sample data, such as video frames and audio samples, used in the movie. Themedia data may be stored in the same file as the QuickTime movie, in a separate file, in multiple files, inalternate sources such as databases or real-time streams, or in some combination of these.

Atoms

The basic data unit in a QuickTime file is the atom. Each atom contains size and type fields that precede anyother data. The size field indicates the total number of bytes in the atom, including the size and type fields.The type field specifies the type of data stored in the atom and, by implication, the format of that data. Insome cases, the size and type fields are followed by a version field and a flags field. An atom with theseversion and flags fields is sometimes called a full atom.

Atom types are specified by a 32-bit unsigned integer, typically interpreted as a four-character ASCII code.Apple, Inc. reserves all four-character codes consisting entirely of lowercase letters. Unless otherwise stated,all data in a QuickTime movie is stored in big-endian byte ordering, also known as network byte ordering,in which the most significant bytes are stored and transmitted first.

Atoms are hierarchical in nature. That is, one atom can contain other atoms, which can contain still others,and so on. This hierarchy is sometimes described in terms of a parent, children, siblings, grandchildren, andso on. An atom that contains other atoms is called a container atom. The parent atom is the container atomexactly one level above a given atom in the heirarchy.

For example, a movie atom contains several different kinds of atoms, including one track atom for each trackin the movie. The track atoms, in turn, contain one media atom each, along with other atoms that defineother track characteristics. The movie atom is the parent atom of the track atoms. The track atoms are siblings.The track atoms are parent atoms of the media atoms. The movie atom is not the parent of the media atoms,because it is more than one layer above them in the hierarchy.

An atom that does not contain other atoms is called a leaf atom, and typically contains data as one or morefields or tables. Some leaf atoms act as flags or placeholders, however, and contain no data beyond their sizeand type fields.

The format of the data stored within a given atom cannot always be determined by the type field of theatom alone; the type of the parent atom may also be significant. In other words, a given atom type cancontain different kinds of information depending on its parent atom. For example, the profile atom inside amovie atom contains information about the movie, while the profile atom inside a track atom containsinformation about the track. This means that all QuickTime file readers must take into consideration not onlythe atom type, but also the atom’s containment hierarchy.

Tuesday, March 17, 2009

Windows Secrets Codes

Restoring a Lost Desktop

If you ever lose the Desktop but Explorer is still running with the Start Button, you can do this to bring back your Desktop in a Windows box.

1. Click Start

2. Click Run

3. Type a period " . "

4. Then press Enter

Creating a New E-Mail Shortcut

To create a shortcut that will open your default e-mail program starting a new e-mail,

1. Right click on an open area of the desktop

2. Select New / Shortcut

3. For the Command Line, enter mailto:

4. For the title enter something like New E-Mail

5. When you click on this your default e-mail program should start with a new e-mail form.

Creating 3D Window Effect

You can create a nice 3D effect for your windows

1. Start Regedit

2. Go to HKEY_CURRENT_USER \ Control Panel \ Colors

3. Make sure the following setting are there:
. ButtonHilight=128 128 128
. ButtonShadow=255 255 255

Creating Shutdown, Restart and Logoff Icons

To create the icons, create a shortcut on the desktop.

For Shutdown, the command is C:\WINDOWS\RUNDLL.EXE user.exe,exitwindows

For Restart, the command is C:\WINDOWS\RUNDLL.EXE user.exe, exit windows exec

For Logoff, the command is C:\WINDOWS\RUNDLL.EXE shell32.dll,SHExitWindowsEx 0

Having your Favorites and Start Menus Sort Alphabetically

If your Start Menu Program or Favorites are not sorting alphabetically, it is easy to fix this:

1. Start Regedit

2. Go to HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explor er/MenuOrder

3. Under here is are Favorites and Start Menu folders

4. In each there is a value called Order

5. Simply delete (or rename this) and restart Windows

6. Your Favorites or Start Menus should now sort alphabetically

Increasing the Icon Cache

1. Run Reg edit

2. Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explo rer

3. Create a new string called Max Cached Icons

4. Give it a value of 10000

5. This will increase response time in windows and give the Shellicon cache file more elbow room.

Make Icons 256 Color 16-Bit

1. Open the Registry

2. Hit Ctrl+F

3. Type Shell Icon BPP

4. When found, right click the Shell Icon BPP icon

5. Click Modify

6. Change the value from 4 to 16

7. Click Ok

8. Close the registry

9. Restart your computer

Removing Shortcut Arrows

An easy way to remove those irritating arrows from your desktop shortcut icons and not change their properties

1. Right click the Desktop / Properties / Appearance tab

2. Select Item

3. Scroll for Icon

4. The default size is 32

5. Change this to 30

6. Clicking Apply

Adding the Control Panel to the Start Menu

1. Open up the Explorer

2. Go to \WINDOWS\Start Menu

3. Right click in the right-hand panel

4. Add a new folder

5. Name it Control Panel.{21ec2020-3aea-1069-a2dd-08002b30309d}

6. This makes getting to the Control Panel items a little easier

Making Desktop Changes Permanent

To make changes to the Desktop like window size, positon after rebooting:

1. Start Regedit

2. Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policie s\Explorer

3. Create a New Binary Value

4. Name it NoSaveSettings

5. Give it a value of 01 00 00 00

Easy Shortcuts on the Desktop

Here is an easy way to put shortcuts on the Desktop where they can easily be moved to other group icons.

1. Using the Explorer, create a SHORTCUT to the \Windows\Desktop directory in your \Windows\SEND TO directory.

2. Now whenever you want to make a shortcut and move it to the desktop:

3. Just make the shortcut you want using Explorer

4. Right click on that shortcut

5. In the pop up menu select the Send To and Desktop shortcut.

Changing a Folder's Icon

To change the icon of a Folder on desktop:

1. Using the Explorer, move the folder from the Desktop directory to another directory on the hard drive

2. Right click on the new folder and select "Create Shortcut"

3. Move the shortcut to the Desktop

4. Right click and select a new icon

Full Window Drag ( Without Plus! )

1. Start Regedit

2. Open HKEY_CURRENT_USER /ControlPanel /Desktop /DragFullWindows

3. On "DragFullWindows" properties change 0 to 1

Fixing Corrupted Desktop Icons

Easier way to reset icons then deleting SHELLICONCACHE.

There's no need to exit Win95 and delete the SHELLICONCACHE file in order to reset icons that you may have changed (like Network Neighborhood).

1. Go to Control Panel, Display, Appearance Tab.

2. Select Icon from the Item drop down list.

3. Change the Size up or down one and apply.

4. Change the Size back to your original and apply.

If your Start Menu is slow or your icons are black for some reason, it means your Shelliconcache file is corrupt and should be deleted.

Windows Secret - Way to access restricted folders

Use see, DOS has alovely command known as START. Its general syntax is:

START application_path

It does do what it seems to do, start applications. So in you have access to DOS then you can type in the START command to get access to the restricted folder. Now mostly access to DOS too would be blocked. So again you can use the shortcut trick to launch, c:\command.com or c:\windows\command.com. (Command.com is the file which launches MS DOS).

Accessing Restricted Drives.

The problem with most system administrators is that they think that the users or Hackers too are stupid. Almost all system administrators use the Registry Trick (Explained Earlier) to hide all drives in My Computer. So in order to unhide or display all drives, simply delete that particular key.(Refer to beginning of Untold Secrets Section.)

Some systems have the floppy disk disabled through the BIOS. On those systems ift he BIOS is protected, you may need to crack the BIOS password. (For that Refer tothe Windows Hacking Chapter). Sometimes making drives readable (Removing R +) and then creating Shortcuts to them also helps us to get access to them.

Changing your Operating System's Looks by editing .htt files

If you have installed Windows Desktop Update and have the view as Web Page option enabled, you can customise the way the folder looks by selecting View > Customise this folder. Here you can change the background and other things about that particular folder. Well that is pretty lame, right? We hackers already know things as lame as that. Read on for some kewl stuff.

Well, you could also change the default that is stored in a Hidden HTML Template file (I think so..) which is nothing but a HTML document with a .htt extension.This .htt file is found at: %systemroot%\web\folder.htt.

The %systemroot% stands for the drive in which Windows is Installed, which is normally C:

You can edit these .htt files almost just like you edit normal .HTM or .HTML files. Simply open them in an ASCII editor like Notepad. The following is a list of .htt files on your system which control various folders and which can be edited to customise the way various folders look.

controlp.htt Control Panel

printers.htt Printers

mycomp.htt My Computer

safemode.htt Safe Mode

All these files are found in the web folder in %systemfolder%. The folder.htt filehas a line:

'Here's a good place to add a few lines of your own"

which is the place where you can add your own A HREF links. These links would then appear in the folder whose folder.htt file you edited. All this might sound really easy and simple, but you see these .htt files do not contain normal HTML code, instead they contain a mixture of HTML and web bots. Hence they can be difficult for newbies to understand.

Source from Untold Windows Tips and Secrets By Ankit Fadia

Windows Secret - Poledit

Poledit or Policy Editor is a small kewl tool which is being commonly used by system administrators to alter the settings of a system. This utility is noti nstalled by default by Windows. You need to install in manually from the Windows98 Installation Kit from the Resource Kit folder. user.dat file that we sawearlier.

The Policy Editor tool imposes restrictions on the user's system by editing the user.dat file which in turn means that it edits the Windows Registry to change thes ettings. It can be used to control or restrict access to each and every folder and option you could ever think of. It has the power to even restrict access to individual folders, files, the Control Panel,
MS DOS, the drives available etc. Sometimes this software does make life really hard for a Hacker. So how can we remove the restrictions imposed by the Policy Editor? Well read ahead to learnmore.

You see the Policy Editor is not the only way to restrict a user's activities. As we already know that the Policy Editor edits the Windows Registry(user.dat) file to impose such restrictions. So this in turn would mean that we can directly make changes to the Windows Registry using a .reg file or directly to remove or add restrictions.

Launch Regedit and go to the following Registry Key:

HKEY_CURRENT_USER/Software/Microsoft/CurrentVersion/Policies

Under this key, there will definitely be a key named explorer. Now under this explorer key we can create new DWORD values and modify it's value to 1 in order to impose the restriction. If you want to remove the Restriction, then you can simply delete the respective DWORD values or instead change their values to 0. The following is a list of DWORD values that can be created under the Explorer Key-:

NoDeletePrinter : Disables Deletion of already installed Printers

NoAddPrinter : Disables Addition of new Printers

NoRun : Disables or hides the Run Command

NoSetFolders : Removes Folders from the Settings option on Start Menu (ControlPanel, Printers, Taskbar)

NoSetTaskbar : Removes Taskbar system folder from the Settings option on Start Menu

NoFind : Removes the Find Tool (Start >Find)

NoDrives : Hides and does not display any Drives in My Computer

NoNetHood : Hides or removes the Network Neighborhood icon from the desktop

NoDesktop : Hides all items including, file, folders and system folders from the Desktop

NoClose : Disables Shutdown and prevents the user from normally shutting down Windows.

NoSaveSettings : Means to say, 'Don't save settings on exit'

DisableRegistryTools : Disable Registry Editing Tools (If you disable this option,the Windows Registry Editor(regedit.exe) too will not work.)

NoRecentDocsHistory: Removes Recent Document system folder from the Start Menu (IE4 and above)

ClearRecentDocsOnExit: Clears the Recent Documents system folder on Exit.

Nolnternetlcon: Removes the Internet (system folder) icon from the Desktop

Under the same key: HKEY_CURRENT_USER/Software/Microsoft/CurrentVersion/Policies
you can create new subkeys other than the already existing Explorer key. Now create a new key and name it System. Under this new key, system we can create the following new DWORD values(1 for enabling the particular option and 0 for disabling the particular option):

NODispCPL: Hides Control Panel

NoDispBackgroundPage: Hides Background page.

NoDispScrsavPage: Hides Screen Saver Page

NoDispAppearancePage: Hides Appearance Page

NoDispSettingsPage: Hides Settings Page

NoSecCPL: Disables Password Control Panel

NoPwdPage: Hides Password Change Page

NoAdminPaqe: Hides Remote Administration Page

NoProfilePage: Hides User Profiles Page

NoDevMgrPage: Hides Device Manager Page

NoConfigPage: Hides Hardware Profiles Page

NoFileSysPage: Hides File System Button

NoVirtMemPage: Hides Virtual Memory Button

Similarly, if we create a new subkey named Network, we can add the following DWORDv alues under it(1 for enabling the particular option and 0 for disabling the particular option):

NoNetSetupSecurityPage: Hides Network Security Page

NoNelSetup: Hides or disables the Network option in the Control Panel

NoNetSetupIDPage: Hides the Identification Page

NoNetSetupSecurityPage: Hides the Access Control Page

NoFileSharingControl: Disables File Sharing Controls

NoPrintSharing: Disables Print Sharing Controls

Similarly, if we create a new subkey named WinOldApp, we can add the following DWORD values under it(1 for enabling the particular option and 0 for disabling the particular option):

Disabled: Disable MS-DOS Prompt

NoRealMode: Disable Single-Mode MS-DOS.

So you see if you have access to the Windows Registry, then you can easily createnew DWORD values and set heir value to 1 for enabling the particular option and 0for disabling the particular option. But Sometimes, access to the Windows Registryis blocked. So what do you do? Go to the Windows Directory and delete eitheruser.dat or system.dat (These 2 files constitute the Windows Registry.) andreboot. As soon as Windows logs in, it will display a Warning Message informingyou about an error in the Windows Registry. Simply ignore this Warning Message andPress CTRL+DEL+ALT to get out of this warning message.(Do not press OK) You willfind that all restrictions have been removed.

The most kind of restriction found quite commonly is the Specific FolderRestriction, in which users are not allowed access to specific folders, the mostcommon being the Windows folder, or sometimes even access to My Computer isblocked. In effect, you simply cannot seem to access the important kewl fileswhich are needed by you to do remove restrictions. What do you? Well use the RUNcommand. (START >RUN). But unfortunately a system administrator who is intelligentenough to block access to specific folder, would definitely have blocked access tothe RUN command. Again we are stuck.

Windows is supposed to be the most User Friendly Operating System on earth. (Atleast Microsoft Says so.)

It gives the User an option to do the same thing in various ways. You see the RUN command is only the most convenient option of launching applications, but not the only way. In Windows you can create shortcuts to almost anything from a file, folder to a Web URL. So say your system administrator has blocked access to the c:\windows\system folder and you need to access it. What do you do? Simply create a Shortcut to it. To do this right click anywhere on the desktop and select New >Shortcut. A new window titled Create Shortcut pops up. Type in the path of the restricted folder you wish to access, in this case c:\windows\system. Click Next, Enter the friendly name of the Shortcut and then click Finish. Now you can access the restricted folder by simply double clicking on the shortcut icon. Well that shows how protected and secure *ahem Windows *ahem is.

Windows Secret - Outlook Express Tricks

Colorful Background

Don't like the boring background colors of Outlook Express? To change it launchthe Windows Registry Editor and scroll down to the

HKEY_CURRENT_USER\Software\Microsoft\Internet Mail And News key.

On the left pane, click on ColorCycle or select Edit and Modify in the menu. Nowchange the value to 1. Close and restart. Now, launch Outlook Express and wheneveryou open up a New Message, hold down ctrl-shift and tap the z key to scroll tochange the background color. Repeat the keystroke to cycle through the colors.

Internet Explorer 5 Hidden Features

Microsoft Internet Explorer 5 has several hidden features which can be controlled using the Windows Registry. Open your registry and scroll down to the following key:

HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions

Create a new DWORD value named x(See complete list of values of x below) and modify it's value to 1 to enable it and to 0 to disable it.

NoBrowserClose : Disable the option of closing Internet Explorer.

NoBrowserContextMenu : Disable right-click context menu.

NoBrowserOptions : Disable the Tools / Internet Options menu.

NoBrowserSaveAs : Disable the ability to Save As.

NoFavorites : Disable the Favorites.

NoFileNew : Disable the File / New command.

NoFileOpen : Disable the File / Open command.

NoFindFiles : Disable the Find Files command.

NoSelectDownloadDir : Disable the option of selecting a download directory.

NoTheaterMode : Disable the Full Screen view option.

Hacking Secrets

Almost all system administrators make certain changes and make the system restricted. System Administrators can hide the RUN option, the FIND command, the entire Control Panel, drives in My Computer like D: A: etc. They can even restrict activities of a hacker my disabling or hiding, even the tiniest options or tools.

Most commonly these restrictions are imposed locally and are controlled by the Windows Registry. But sometimes the smart system administrators control thea ctivities of the hacker by imposing restrictions remotely through the main server.

Windows Secret - Internet Explorer Tricks and Tips

Resizable Full Screen Toolbar

The Full Screen option increases the viewable area and makes surfing moreenjoyable but sometimes we need the Toolbar but also need to have extra viewingarea. Now this hack teaches you how to change the size of the Internet Explorertoolbar. This registry hack is a bit complicated as it involves Binary values, soto make it simple, I have included the following registry file which will enablethe resizable option of the Internet Explorer toolbar which was present in thebeta version of IE.

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar]

"Theater"=hex:0c,00,00,00,4c,00,00,00,74,00,00,00,18,00,00,00,1b,00,00,00,5c,\

00,00,00,01,00,00,00,e0,00,00,00,a0,0f,00,00,05,00,00,00,22,00,00,00,26,00,\

00,00,02,00,00,00,21,00,00,00,a0,0f,00,00,04,00,00,00,01,00,00,00,a0,0f,00,\

00,03,00,00,00,08,00,00,00,00,00,00,00

*******************

HACKING TRUTH: Internet Explorer 5 displays the friendly version of HTTP errors like NOT FOUND etc . They are aimed at making things easier for newbies. If you would rather prefer to see the proper error pages for the web server you're using,go to Tools, Internet Options and select the Advanced tab. Then scroll down anduncheck the Show friendly http errors box.

*******************

Making the Internet Explorer & the Explorer Toolbars Fancy

The Internet Explorer toolbar looks pretty simple. Want to make it fancy and kewl?Why not add a background image to it. To do this kewl hack launch the WindowsRegistry Editor and go to the following key: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Toolbar\.

Now in the right pane create a new String Value and name it BackBitmap and modify it's value to the path of the Bitmap you want to dress it up with by right clicking on it and choosing Modify. When you reboot the Internet Explorer and the Windows Explorer toolbars will have a new look.

Change Internet Explorer's Caption

Don't like the caption of Internet Explorer caption? Want to change it? Open theregistry editor and go to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main.

In the right pane create a new String Value names Window Title (Note the spacebetween Window and Title). Right click on this newly created String Value andselect Modify. Type in the new caption you want to be displayed.

Restart for thesettings to take place.

Windows Secret - Delete find Option

To delete the Find option, go to the following registry key:

HKEY_CLASSES_ROOT\Directory\Shell\Find

Delete Find. DO NOT delete Open else you will not be able to open any folders inthe Start Menu like Programs, Accessories etc.

BMP Thumbnail As Icon

You can actually change the default BMP icon to a thumbnail version of the actualBMP file. To do this simply go to HKCU\Paint.Picture\Default. In the right pane change the value of default to %1. Please note however that this will slow down the display rate in explorer if there are too many BMP thumbnails to display. You can use other icons too, simply enter the pathname.To restore back to the normal change the vale of default back to: C:\Progra~1\Access~1\MSPAINT.EXE,1.

Customizing The Shortcut Arrow

All shortcuts have a tiny black arrow attached to it's icon to distinguish fromnormal files. This arrow can sometimes be pretty annoying and as a Hacker shouldknow how to change each and everything, here goes another trick. Launch theRegistry Editor and go to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Shell Icons.

Now, on the right pane is a list of icons ( we found out that on some systems,Windows 98 especially, the right pane is blank. Don't worry, just add the value asrequired ). Find the value 29. If it isn't there, just add it. The value of thisstring should be C:\Windows\system\shell32.dll, 29 ( which means the 30th icon inshell32.dll - the first one begins with 0 ). Now, we need blank icon to do this.Just create one with white as the whole icon. Go here to learn how to create anicon. Once done just change the value to C:\xxx.ico, 0 where "xxx" is the fullpath of the icon file and "0" is the icon in it.

Now for some fun. If the blank icon is a bit boring, change it again. You will find that under shell32.dll there is a gear icon, a shared folder ( the hand ) and much more. Experiment for yourself!

Use Perl to Get List or Services Running on your NT box

Use the following Perl Script to get a list of Services running on your NT system

--------------script.pl-----------------

#!c:\per\bin\perl.exe

use Win32::Service;

my ($key, %service, %status, $part);

Win32::Service::GetServices(' ',\%services);

foreach $key (sort keys %services) {

print "Print Name\t: $key, $services{$key}\n";

Win32::Service::GetStatus( ' ',$services{$key};

\%status);

foreach $part (keys %status) {

print "\t$part : $status{$part}\n" if($part eq "CurrentState");

}

}

-------------script.pl-------------------

Windows Secret - Securing NT

Securing NT

By default, NT 4.0 displays the last person who logged onto the system. This canbe considered to be a security threat, especially in the case of those who choose their password to be same as their Username. To disable this bug which actually is a feature, go to the following key in the registry editor:

HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon

Click and select the ReportBookOK item and create a new string value called DontDisplayLastUserName. Modify it and set it's value to 1.

As a system administrator, you can ensure that the passwords chosen by the usersare not too lame or too easy to guess. NT has this lovely utility called the UserManager which allows the administrator to set the age limit of the password whichforces the users to change the password after a certain number of days. You canalso set the minimum length of passwords and prevent users to use passwords whichalready have been used earlier and also enable account lockouts which willdeactivate an account after a specified number of failed login attempts.

When you log on to Win NT, you should disable Password Caching, this ensures Single NT Domain login and also prevents secondary Windows Logon screen.

Simply copy the following lines to a plain text ASCII editor like: Notepad and save it with an extension, .reg

----------------DISABLE.reg-----------------
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Network]

"DisablePwdCaching"=dword:00000001

----------------DISABLE.reg-----------------

To Enable Password Caching use the following .reg file:

--------------Enable.reg-----------------

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Network]

"DisablePwdCaching"=dword:00000000

--------------Enable.reg-----------------

Cleaning Recent Docs Menu and the RUN MRU

The Recent Docs menu can be easily disabled by editing the Registry. To do this goto the following Key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

Now in the right pane, create a new DWORD value by the name: NoRecentDocsMenu and set it's value to 1. Restart Explorer to save the changes.

You can also clear the RUN MRU history. All the listings are stored in the key:

HKEY_USERS\.Default\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU

You can delete individual listings or the entire listing. To delete History ofFind listings go to:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Doc Find SpecMRU

and delete.

Customizing the Right Click Context Menu of the Start Menu

When you right click on the start menu, only 3 options pop up: Open, Explore, and Find. You can add your own programs to this pop up menu( which comes up when weright click on it.) Open Regedit and go to the following registry key:

HKEY_CLASSES_ROOT\Directory\Shell

Right click on the shell and create a new Sub Key (You can create a new SubKey byright clicking on the Shell Key and selecting New > Key.). Type in the name of the application you want to add to the start menu. I want to add Notepad to the StartMenu and hence I name this new sub key, Notepad. Now right click on the newregistry key that you just created and create yet another new key named Command.Enter the full path of the application, in this case Notepad in the default value of Command in the rightpane.

So I Modify the value of the default string value and enter the full path name of Notepad:

c:\wndows\notepad.exe.

Now press F5 to refresh. Now if you right click on the Start Button you will find a new addition to the Pop Up Menu called Notepad.

Clicking on it will launchNotepad.We can not only add but also remove the existing options in this pop up box.

Windows Secret - IV

In the right pane there will be a DWORD value names attributes. Now consider thefollowing options:

To add the Rename option to the menu, change the value of Attributes to50 01 00 20

To add the Delete option to the menu, change the value of Attributes to60 01 00 20

3. To add both the Rename & Delete options to the menu, change the value ofAttributes to 70,01,00,20

4. Add Copy to the menu, change Attributes to 41 01 00 20

5. Add Cut to the menu, change Attributes to 42 01 00 20

6. Add Copy & Cut to the menu, change Attributes to 43 01 00 20

7. Add Paste to the menu, change Attributes to 44 01 00 20

8. Add Copy & Paste to the menu, change Attributes to 45 01 00 20

9. Add Cut & Paste to the menu, change Attributes to 46 01 00 20

10.Add all Cut, Copy & Paste to the menu, change Attributes to 47 01 00 20

We want to add only the Rename option to the right click context menu of theRecycle Bin, so change the value of attributes to: 50 01 00 20. Press F5 torefresh and then after rebooting you will find that when you right click on theRecycle Bin a RENAME option pops up too.

To reset the default Windows options change the value of Attributes back to

40 01 00 20

The Registry File which one can create for the above process would be something like the below:

REGEDIT4

[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\Shell-Folder]

"Attributes"=hex:50,01,00,20

To access say the Modem Properties in the Control Panel Folder, the normalprocedure is: Click on Start, Click on Settings> Control Panel and then wait forthe Control Panel window to pop up and then ultimately click on the Modems icon.

Wouldn't it be lovely if you could shorten the process to: Click on Start> ControlPanel>Modems. Yes you can add the Control Panel and also all other Special SystemFolders directly to the first level Start Menu. Firstly collect the CLSID value ofthe folder you want to add to the start menu. I want to add Control Panel hencethe CLSID value is: 21EC2020-3AEA-1069-A2DD-08002B30309D

Now right click on the Start Button and select Open. Now create a new folder and name it: Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}

NOTE: Do not forget the period after the 'l' in Panel. Similarly all systemfolders can be added to the Start Menu.(accept My Briefcase, I think)

Deleting System Options from the Start menu

You can actually remove the Find and Run options from the start menu by performing a simple registry hack. Again like always Launch the registry editor and scroll down to the below key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

Right-click on the right pane and select New, DWORD Value. Name it NoFind.(To remove the RUN option name it NoRun). Double-click the newly create DWORD to edit it's value and enter 1 as its value. This will disable the FIND option of theStart Menu and will also disable the default Shortcut key(F3 for Find.)

To restore the Run or find command modify the value of the DWORD to 0 or simplyDelete the DWORD value.

Fed Up of the boring Old Yellow Folder Icons?[Drive Icons Included]

NOTE: This trick hasn't been tried on Win98.

You can easily change the boring yellow folder icons to your own personalizedicons. Simply create a text file and copy the following lines into it:

[.ShellClassInfo]

ICONFILE=Drive:\Path\Icon_name.extension

Save this text file by the name, desktop.ini in the folder, whose icon you want to change. Now to prevent this file from getting deleted change it's attributes to Hidden and Read Only by using the ATTRIB command.

To change the icon of a drive, create a text file containing the following lines:

[Autorun]

ICON=Drive:\Path\Icon_name.extension

Save this file in the root of the drive whose icon you want to change and name itautorun.inf For Example, if you want to change the icon of a floppy, SAVE THE iconin a:\icon_name.ico One can also create a kewl icon for the Hard Disk and create atext file [autorun.inf] and store it in "c:\".

Windows Secret - III

CLSID Folders Explained

Don't you just hate those stubborn stupid icons that refuse to leave the desktop,like the Network Neighborhood icon. I am sure you want to know how you can deletethem. You may say, that is really simple, simply right click on the concerned iconand select Delete. Well not exactly, you see when you right click on these specialfolders( see entire list below)neither the rename nor the delete option does notappear. To delete these folders, there are two methods, the first one is using theSystem Policy Editor(Poledit in the Windows installation CD)and the second isusing the Registry.

Before we go on, you need to understand what CLSID values are. These folders, like the Control Panel, Inbox, The Microsoft Network, Dial Up Networking etc are system folders. Each system folder has a unique CLSID key or the Class ID which is a 16-byte value which identifies an individual object that points to a correspondingkey in the registry.

To delete these system Folders from the desktop simply go to the following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\Namespace{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

To delete an icon simply delete the 16 byte CLSID value within "NameSpace". Thefollowing are the CLSID values of the most commonly used icons:

My Briefcase : {85BBD920-42AO-1069-A2E4-08002B30309D}

Desktop : {00021400-0000-0000-C000-0000000000046}

Control Panel : {21EC2020-3AEA-1069-A2DD-08002B30309D}

Dial-Up-Networking : {992CFFA0-F557-101A-88EC-00DD01CCC48}

Fonts : {BD84B380-8CA2-1069-AB1D-08000948534}

Inbox : {00020D76-0000-0000-C000-000000000046}

My Computer : {20D04FE0-3AEA-1069-A2D8-08002B30309D}

Network Neighborhood : {208D2C60-3AEA-1069-A2D7-O8002B30309D}

Printers : {2227A280-3AEA-1069-A2DE-O8002B30309D}

Recycle Bin : {645FF040-5081-101B-9F08-00AA002F954E}

The Microsoft Network : {00028B00-0000-0000-C000-000000000046}

History : {FF393560-C2A7-11CF-BFF4-444553540000}

Winzip : {E0D79300-84BE-11CE-9641-444553540000}

For example, to delete the Recycle Bin, first note down it's CLSID value, which is: 645FF040-5081-101B-9F08-00AA002F954E. Now go to the Namespace key in the registry and delete the corresponding key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}

Similarly to delete the History folder, delete the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Desktop\NameSpace\{FBF23B42-E3F0-101B-8488-00AA003E56F8}

Sometimes, you may need to play a trick on your brother or friend, well this oneteaches you how to hide all icons from the Desktop. Go to the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

In the right pane create a new DWORD value by the name: NoDesktop and set its value to: 1. Reboot and you will find no icons on the desktop.

Till now you simply learnt how to delete the special system folders by deleting aregistry key, but the hack would have been better if there was a way of adding theDELETE and RENAME option to the right click context menus of these specialfolders. You can actually change the right click context menu of any system folderand add any of the following options: RENAME, DELETE, CUT, COPY, PASTE and lotsmore.

This hack too requires you to know the CLSID value of the system folder whose menuyou want to customize. In this section, I have taken up Recycle Bin as the folderwhose context menu I am going to edit.

Firstly launch the registry editor and open the following registry key:

HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder.

In Case you want to edit some other folder like say the FONTS folder, then you will open the following key:

HKEY_CLASSES_ROOT\CLSID\{CLSID VALUE HERE}\ShellFolder.

Windows Secret - II

Take Over the Screen Saver

To activate and deactivate the screen saver whenever you want, goto the followingregistry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ScreenSavers

Now add a new string value and name it Mouse Corners. Edit this new value to -Y-N.Press F5 to refresh the registry. Voila! Now you can activate your screensaver bysimply placing the mouse cursor at the top right corner of the screen and if youtake the mouse to the bottom left corner of the screen, the screensaver will deactivate.

Pop a banner each time Windows Boots

To pop a banner which can contain any message you want to display just before auser is going to log on, go to the key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WinLogon

Now create a new string Value in the right pane named LegalNoticeCaption and enterthe value that you want to see in the Menu Bar. Now create yet another new string value and name it: LegalNoticeText. Modify it and insert the message you want todisplay each time Windows boots. This can be effectively used to display thecompany's private policy each time the user logs on to his NT box. It's .reg filewould be:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Winlogon]

"LegalNoticeCaption"="Caption here."

Delete the Tips of the Day to save 5KB

Windows 95 had these tips of the day which appeared on a system running a newlyinstalled Windows OS. These tips of the day are stored in the Windows Registry andconsume 5K of space. For those of you who are really concerned about how much freespace your hard disk has, I have the perfect trick.

To save 5K go to the following key in Regedit:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Tips

Now simply delete these tricks by selecting and pressing the DEL key.

Change the Default Locations

To change the default drive or path where Windows will look for it's installationfiles, go to the key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\SourcePath

Now you can edit as you wish.

Secure your Desktop Icons and Settings

You can save your desktop settings and secure it from your nerdy friend by playingwith the registry. Simply launch the Registry Editor go to:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

In the right pane create a new DWORD Value named NoSaveSettings and modify it'svalue to 1. Refresh and restart for the settings to get saved.

Windows Secret

Exiting Windows the Cool and Quick Way

Normally it takes a hell lot of time just Shutting down Windows, you have to moveyour mouse to the Start Button, click on it, move it again over Shut Down, click,then move it over the necessary option and click, then move the cursor over the OKbutton and once again (you guessed it) click.This whole process can be shortenedby creating shortcuts on the Desktop which will shut down Windows at the click ofa button. Start by creating a new shortcut( right click and select New> Shortcut).Then in the command line box, type (without the quotes.)

'C:\windows\rundll.exe user.exe,exitwindowsexec'

This Shortcut on clicking will restart Windows immediately without any Warning. Tocreate a Shortcut to Restarting Windows, type the following in the Command Linebox:

'c:\windows\rundll.exe user.exe,exitwindows'

This Shortcut on clicking will shut down Windows immediately without any Warning.

Ban Shutdowns : A trick to Play on Lamers

This is a neat trick you can play on that lamer that has a huge ego, in thissection I teach you, how to disable the Shut Down option in the Shut Down DialogBox. This trick involves editing the registry, so please make backups. Launchregedit.exe and go to :

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

In the right pane look for the NoClose Key. If it is not already there then createit by right clicking in the right pane and selecting New > String Value.(Name itNoCloseKey ) Now once you see the NoCloseKey in the right pane, right click on itand select Modify. Then Type 1 in the Value Data Box.

Doing the above on a Win98 system disables the Shut Down option in the Shut DownDialog Box. But on a Win95 machine if the value of NoCloseKey is set to 1 then

click on the Start > Shut Down button displays the following error message:

This operation has been cancelled due to restrictions in effect on this computer.Please contact your system administrator.

You can enable the shut down option by changing the value of NoCloseKey to 0 orsimply deleting the particular entry i.e. deleting NoCloseKey.

Instead of performing the above difficult to remember process, simply save thefollowing with an extension of .reg and add it's contents to the registry bydouble clicking on it.

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]"

NoClose"="1"

Disabling Display of Drives in My Computer

This is yet another trick you can play on your geek friend. To disable the displayof local or networked drives when you click My Computer go to :

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

Now in the right pane create a new DWORD item and name it NoDrives. Now modifyit's value and set it to 3FFFFFF (Hexadecimal) Now press F5 to refresh. When youclick on My Computer, no drives will be shown. To enable display of drives in MyComputer, simply delete this DWORD item. It's .reg file is as follows:

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

"NoDrives"=dword:03ffffff

Saturday, March 7, 2009

Windows Shortcut File Location Info

File Location Info

This item is always present, but if bit 1 is not set in the flags value, then the length of this structure will be zero. The following table shows the structure of the header ofthis item.

File Location Info

Offset Size Contents
0h 1 dword This is the total length of this structure and all following data
4h 1 dword This is a pointer to first offset after this structure.
1Ch8h 1 dword Flags
Ch 1 dword Offset of local volume info
10h 1 dword Offset of base pathname on local system
14h 1 dword Offset of network volume info
18h 1 dword Offset of remaining pathname

Notes: The first length value includes all the assorted pathnames and other datastructures. All offsets are relative to the start of this structure.

The first long integer indicates the size of the file location info.

The next long integer is the offset at which the basic file info structure ends. Shouldbe 1Ch under normal conditions.

The next long integer is the flags that indicate which types of volumes the file is available on.

Volume flags

Bit Meaning
0 Available on a local volume
1 Available on a network share

The next long integer is the offset to the local volume table. ( Random garbage when bit 0 is clear in volume flags)

The next long integer is the offset to the base path on the local volume.
( Random garbage when bit 0 is clear in volume flags)

The next long integer is the offset to the network volume table. ( Random garbage when bit 1 is clear in volume flags)

The next long integer is the offset to the final part of the pathname.

To find the filename of the file on the local volume, combine the base path string andthe final path string.

To find the filename of the file on the network, combine the share name in thenetwork volume table with the final path string.

Description string

If bit 2 is set in the flags value in the header, then this string is present.

The first unsigned short int value indicates the length of the string. Following thelength value is a string of ASCII characters. It is a description of the item.

Relative path string

If bit 3 is set in the flags value in the header, then this string is present.The first unsigned short int value indicates the length of the string.

Following thelength value is a string of ASCII characters. It is a relative path to the target.

Working directory

If bit 4 is set in the flags value in the header, then this string is present.

The first unsigned short int value indicates the length of the string. Following thelength value is a string of ASCII characters. It is the working directory as specified inthe shortcut properties.

Command line string

If bit 5 is set in the flags value in the header, then this string is present.

The first unsigned short int value indicates the length of the string. Following thelength value is a string of ASCII characters. The command line string includes everything except the program name.

Icon filename string

If bit 6 is set in the flags value in the header, then this string is present.

The first unsigned short int value indicates the length of the string. Following thelength value is a string of ASCII characters. This the name of the file containing theicon.

The Windows Shortcut File Format

Basic File Structure

The file is structured like this:

File header
Shell item ID list
Item 1
Item 2
etc..
File locator info
Local path
Network path
Description string
Relative path string
Working directory string
Command line string
Icon filename string
Extra stuff

The File Header

This is of course at the start of the file.

The first 4 bytes of the file form a long integer that is always set to 4Ch this it theASCII value for the uppercase letter L. This is used to identify a valid shell link file.

The next 16 bytes is the globally unique identifier GUID of the shell links which is:{00021401-0000-0000-00C0-000000000046} in standard GUID notation or {01h,14h, 02h, 00h, 00h, 00h, 00h, 00h, C0h, 00h, 00h, 00h, 00h, 00h, 46h} as it iscomposed of bytes in the file. It appears that in the future, Microsoft may redefinethe file format and this will be used to indicate which version to use.The next item is a long integer which consists of a number of flags. This isimportant, because it indicates which of the optional parts of the file are present.

The next item is a long integer that contains file attributes of the target file. If thetarget is not a file (see flags bit 1), then this is set to zero. The resolver uses thesewhen the link is broken to match the link with the correct target.

The next three items are 64 bit integers that specifiy the various time information for the file.
Creation time
Modification time
Last access time
The next item is a long integer which contains the length of the target file.
If the file has a custom icon (see flags bit 6), then this long integer indicates theindex of the icon to use. Otherwise it is zero.
The next long integer specifies the ShowWnd value to pass to the target application when starting it. For your convenience, the values are reproduced below. It isunlikely, that most of these values are valid. Only values 1, 2 and 3 are permitted inthe shortcut property page.
SW_HIDE 0 Cool...
SW_NORMAL 1
SW_SHOWMINIMIZED 2
SW_SHOWMAXIMIZED 3
SW_SHOWNOACTIVATE 4
SW_SHOW 5
SW_MINIMIZE 6
SW_SHOWMINNOACTIVE 7
SW_SHOWNA 8
SW_RESTORE 9
SW_SHOWDEFAULT 10
The next long integer specifies the hotkey assigned to the shortcut.
The last two long integers are always zero. They are probably reserved for future use.
The Shell Item Id List.
This item is only present if bit 0 is set in the flags word of the header.
An entire book could be written on the contents of this item. Essentially it indicateshow to get from the desktop to the specified item. The actual contents are highlyvariable. The following are the only constant items about the list.
The first unsigned short integer indicates the total length of the list so it can beskipped easily.
Inside the list, each item begins with an unsigned short integer that indicates thelength of the item. The length includes the size of the length value.
The last item is length 0.
Lookup ITEMIDLIST in most any Win32 documentation for more info on this item.

Sunday, March 1, 2009

AVI File Format -Subtitle & Garbage

Subtitles in AVI files

This section explains how to store subtitles in AVI files, so that VSFilter can be used to load and select subtitles.

One subtitle stream is stored in one single chunk. That chunk contains header data, followed by an entire SRT or SSA file. If that file is using UTF-8 encoding, the BOM should be included as well. The header is defined as follows:

char[4]; // 'GAB2'
BYTE 0x00;
WORD 0x02; // unicode
DWORD dwSize_name; // length of stream name in bytes
char name[dwSize_name]; // zero-terminated subtitle stream name encoded in UTF-16
WORD 0x04;DWORD dwSize; // size of SRT/SSA text file
char data[dwSize]; // entire SRT/SSA file

Stream header chunk

typedef struct
{

FOURCC fccType; // "txts"
FOURCC fccHandler; // 00 00 00 00
DWORD dwFlags;
WORD wPriority;
WORD wLanguage;
DWORD dwInitialFrames;
DWORD dwScale;
DWORD dwRate; // dwRate / dwScale == duration in seconds
DWORD dwStart;
DWORD dwLength; // In units above..., should be 1
DWORD dwSuggestedBufferSize;
DWORD dwQuality;
DWORD dwSampleSize; // = 0 -> treated as VBR
RECT rcFrame; // 0, 0, 0, 0

} AVIStreamHeader;

Stream format chunk

This chunk has a size of 0.

Stream name chunk

The strn chunk is ignored by VSlter, so there is no need to read or write it.

Garbage in AVI files

One way to set a delay in AVI files is using the AVIStreamHeader::dwStart value. However, not every player reads this value, so that such files would not properly playon them. Some applications, like VirtualDub and derivates (NanDub, VirtualDubMod) add some data to the beginning of streams to be delayed.

Unfortunately, those applications don't care about the data format, but rather pad with zeros. Those zeros are refered to as 'garbage' in this section. The scope is to explain how to read such files, which requires that the duration of the garbage section be determined.It is of course required that the beginning of the valid data be found, for example in the caseof MP3, AC3 or DTS by looking for frame headers. Formats which don't use frame headers that can be detected easily, like AAC, will result in broken streams if zeros are added to the beginning.

Constant Bitrate

If the bitrate of a stream is constant, the duration of the garbage section is simply garbage_length * data_rate.

Variable Bitrate

In this case, the duration must be retrieved chunk-wise:

The duration of one chunk is roundup (size_of_chunk / strf::nBlockAlign) * duration_per_frame.

Consequently, if the beginning of the valid data is the m-th byte in chunk n, the duration of the garbage section is

sum[i=0..n-1](duration(chunk[i])) + roundup(m/nBlockAlign)

Overhead of AVI files

This section describes how to predict the overhead of an AVI file before muxing. Note: In the case of low overhead AVI files, the wording in this section is not applicable. Basicly, one video/audio frame causes about 8-9 bytes of overhead in low overhead AVI fies.

General

The overhead of AVI files depends on the number of CHUNKs in the file. Other structures has only very little influence on the total overhead. Each CHUNK causes the following amount of overhead:

• 8 Bytes chunk header (all avi types)

• 16 Bytes for entry in Legacy Index (AVI 1.0 and the RIFF-AVI-List of Hybride files)

• 8 Bytes for entry in Standard Index(Open-DML)

That means, each CHUNK causes an amount of overhead of 16, 24 or 32 bytes.

Getting number of CHUNKS

Video

The easier part is the video stream: Each video frame takes one CHUNK.

Audio

The number of chunks for an audio stream depends on its format and packing. For specific formats, where very special packing is required or considered normal, the overhead can be calculated easily from the settings. Otherwise, more precise information on the muxing settings is needed.

Examples

Video: 3 hours, 25 fps ( = 3,600,000 / 40ms = 90,000 frames per hour)

Audio: 2x MP3-VBR (with 1 frame per CHUNK and 24 ms per frame)

Audio: 2x AC3 (with 4 frames per CHUNK and 32ms per frame)

-> Video: 270,000 CHUNKs
-> Audio: 2*150,000 + 2*3*28,125 = 468,750 CHUNKs
-> Sum = 738,750 CHUNKs

AVI File Format - The movi - Lists

The Movi - Lists contain Video, Audio, Subtitle and (secondary) index data. Those can be grouped into rec - Lists. Example:

LIST movi
LIST rec
01wb
01wb
02wb
03wb
03wb
03wb
00dc
00dc
LIST rec
01wb
02wb
LIST rec
...
...
ix01
ix02
ix03
...
...

The following chunk header IDs are defined:

• ..wb: audio chunk

• ..dc: video chunk

• ..tx: subtitle chunk

• ix..: standard index block

Grouping chunks into rec - Lists prevents excessive seeking when using the Microsoft AVI splitter for replay, but does not allow playback on some standalone replay devices.

The maximum size of a chunk of a stream should be smaller than the corresponding dwSuggestedBufferSize value. Otherwise, some players, especially the Microsoft AVI splitter, could malfunction.

Audio types requiring special attention

MP3

wFormatTag = 0x0055

An MP3 audio stream consists of inseparable frames. MP3 decoders should be able to handle partial frames, but it is nevertheless recommended to store entire MP3 frames in the AVI chunks.

The strf chunk is an MPEGLAYER3WAVEFORMAT structure, which is an extention to the WAVEFORMATEX structure:

typedef struct mpeglayer3waveformat_tag
{
WAVEFORMATEX wfx;
WORD wID;DWORD fdwFlags;
WORD nBlockSize;
WORD nFramesPerBlock;
WORD nCodecDelay;
} MPEGLAYER3WAVEFORMAT;

Important:
This is only valid for MP3 ('MPEG Layer 3'), not for MP1 or MP2 ('MPEG Layer 1 / 2').

If the MP3 stream has a variable bitrate, then you need to convince DirectShow to seekproperly.

Unfortunately, whoever came up with the idea didn't think enough about it: It is possible to create MP3 audio frames larger than 1152 bytes if the sample rate is 32 khz or less. After reading and understanding, you'll see why such audio frames render an MP3stream unplayable if nBlockSize is set to 1152, which is usually done for MP3. Using a larger value would resolve this issue. However, some programs read an MP3 stream as VBRif and only if this value is exactly 1152. In other words, low sample rates in combination with high bit rates are a problem for MP3 VBR streams in AVI files.

AC3

wFormatTag = 0x2000

Muxing AC3 into AVI is far more problematic than most other audio formats. The reason is that a lot of decoders (software as well as hardware) are severely b0rked.

An AC3 stream consists, like MP3, of individual, inseparable frames. It is required that any audio chunk of an AVI file contains a few (complete!) AC3 frames. Otherwise, someAC3 decoders will miscalculate the duration of a chunk. As the audio stream is considered the master stream for playback in DirectShow, this miscalculation will lead to jerky video playback.

Theoretically, chunks containing one AC3 frame are valid, but there are hardware decoders which won't work with such streams. If you place more than 6 AC3 frames into one chunk, you might get increased playback speed. Thus, the recommendation is to place be-tween 2 and 5 AC3 frames into one AVI chunk.

DTS

wFormatTag = 0x2001

It seems to work out to place between 2 and 20 DTS frames in one AVI chunk. I have not yet tried higher values on my own. If you have a hardware DTS decoder, please do some testing and report back what values work and which ones don't. Just like with AC3, do not split up any DTS frames.

MPx VBR

• MPEG 1 Layer 3: 1152 samples per frame

• MPEG 2 Layer 3: 576 samples per frame

• MPEG 1/2 Layer 2: Strongly discouraged from being used, because the default MPEG Layer 2 decoder present on Windows systems does not recognise MPEG Layer 2 streams when using VBR headers.

AAC

For AAC, one RAW AAC frame usually spans over 1024 samples. However, depending on the source container (e.g. ADTS), it is theoretically possible that you are not able to extract packets of equal duration from your source file. In this case, it is highly recommended not to mux the AAC stream into AVI, but report a fatal error instead.

AAC and HE-AAC require private data in the corresponding WAVEFORMATEX structures. See the source code of AVI-Mux GUI (FillASI.cpp) for details.

AVI File Format - Open-DML Index

The general structure of an Open-DML-Index-Chunk is the following:

typedef struct _aviindex_chunk
{
FOURCC fcc;
DWORD cb;
WORD wLongsPerEntry;
BYTE bIndexSubType;
BYTE bIndexType;
DWORD nEntriesInUse;
DWORD dwChunkId;
DWORD dwReserved[3];

struct _aviindex_entry
{
DWORD adw[wLongsPerEntry];
} aIndex [ ];

} AVIINDEXCHUNK;

Every subtype of Open-DML index structures is compatible to this one. The elements have the following meaning:

• fcc, cb: Chunk header, same as dwFourCC and dwSize in the CHUNK structure

• wLongsPerEntry: every aIndex[i] has a size of 4*wLongsPerEntry bytes. (the struc-ture of each aIndex[i] depends on the special type of index)

• bIndexType, bIndexSubType: defines the type of the index

• nEntriesInUse: aIndex[0]..aIndex[nEntriesInUse-1] are valid

• dwChunkId: ID of the stream the index points into, for example '00dc'.Consequently, one such index chunk can only point to data of one and the same stream.

Upper Level Index ('Super Index')

The upper level index ('super index') points to other index chunks and has the following structure:

typedef struct _avisuperindex_chunk
{
FOURCC fcc;
DWORD cb;
WORD wLongsPerEntry;
BYTE bIndexSubType;
BYTE bIndexType;
DWORD nEntriesInUse;
DWORD dwChunkId;
DWORD dwReserved[3];

struct _avisuperindex_entry
{
__int64 qwOffset;
DWORD dwSize;
DWORD dwDuration;
} aIndex[ ];

} AVISUPERINDEX;

The following values are now defined more specifically:

• bIndexType = AVI_INDEX_OF_INDEXES

• bIndexSubType = [ AVI_INDEX_2FIELD 0 ]

• wLongsPerEntry = 4

As you can see, the aIndex array now consists of 4 DWORDs per entry. The values have the following meaning:

qwOffset: Position of the index chunk this entry points to in the file

dwSize: The size of the standard or field index chunk the entry is pointing to

dwDuration: The duration, measured in stream ticks as indicated in the AVI stream header. In case of video or VBR audio, that usually refers to the number of frames.
Important: VirtualDub 1.4.10 and earlier versions wrote b0rked values for this member in theaudio stream. Thus, an AVI parser should be able to handle files without using this value!

The Standard Index

This index type contains pointers to video, audio or subtitle chunks. It also is a special form of the general Open-DML Index and looks like this:

typedef struct _avistdindex_chunk
{
FOURCC fcc;
DWORD cb;
WORD wLongsPerEntry;
BYTE bIndexSubType;
BYTE bIndexType;
DWORD nEntriesInUse;
DWORD dwChunkId;
__int64 qwBaseOffset;
DWORD dwReserved3;

struct _avistdindex_entry
{
DWORD dwOffset;
DWORD dwSize;
} aIndex[ ];

} AVISTDINDEX;

wLongsPerEnrty: As you can see easily, each aIndex[i] takes 8 bytes,so wLongsPerEntry = 2

bIndexSubType: = 0

bIndexType:= AVI_INDEX_OF_CHUNKS

qwBaseOffset: This value is added to each dwOffset value of the AVISTDINDEX.

dwOffset, dwSize: These elements define the position (qwBaseOffset + dwOffset) of the data section of the corresponding CHUNK (NOT the chunk header!) and its length. There are nEntriesInUse such pairs, each one describing one video/audio frame. Note that Bit 31 of dwSize indicates the frametype: If this bit is set, this frame is not a keyframe.

Low-overhead mode

The Open-DML specication does not explicitly require that each "data section" the index contains an entry to be preceded by a chunk header. Thus, several frames can be put into one chunk, while having one index entry per frame. This way, only few frames have a chunkheader, reducing the overhead by 50% compared to normal Open-DML files. This means, ofcourse, that the AVIF_MUSTUSEINDEX again the main AVI header must be set, to force any parser to use the index. Files created this way will be called "low overhead AVI files".

This is not an AVI file type on its own. Any parser handling that flag, as well as the Open-DML index correctly, should be compatible to such files. Microsoft's AVI splitter, as well as VirtualDub(Mod) can handle such files without problems, without having been updated todo so.

Using the Open-DML Index

The preceding section described what the Open-DML Index looks like. This section will deal with using it.

Each stream contains an 'indx' chunk in its stream header list ('strl'). This chunk is a Super Index chunk.

As each Standard Index contains one 64 bit offset and then a list of 32 bit offsets relatively to the 64 bit offset, one Standard Index chunk can only point to data within one 4 GB segment.Thus you need one Standard Index per 4 GB file size per stream.

Unfortunately, it seems that Microsoft did not read the specification properly: If a file contains more than 3 audio streams, then the Microsoft AVI Splitter will not recognize files using such large Standard Index chunks. It is required to use smaller pieces. Tests have shown that pieces with 15000 entries each are small enough to be processed correctly byMicrosoft's AVI splitter.

AVI File format - AVI Indexes

The Stream header list - general

There is one strl - List for each stream. If the number of strl - Lists inside the hdrl - Listis different from MainAVIHeader::dwStreams, a fatal error should be reported.

The stream header list element: strh

typedef struct
{
FOURCC fccType;
FOURCC fccHandler;
DWORD dwFlags;
WORD wPriority;
WORD wLanguage;
DWORD dwInitialFrames;
DWORD dwScale;
DWORD dwRate; /* dwRate / dwScale == samples/second */
DWORD dwStart;
DWORD dwLength; /* In units above... */
DWORD dwSuggestedBufferSize;
DWORD dwQuality;
DWORD dwSampleSize;
RECT rcFrame;
} AVIStreamHeader;

Again, the meaning is not always obvious.

• fccType
Can be
- 'vids' - video
- 'auds' - audio
- 'txts' - subtitle

• fccHandler
FourCC of codec to be used.

• dwFlags
The following flags are defined
-AVISF_DISABLED - Stream should not be activated by default
-AVISF_VIDEO_PALCHANGES - Stream is a video stream using palettes where the palette is changing during playback.

• dwInitialFrames
Number of the first block of the stream that is present in the file.

• dwRate / dwScale =
samples / second (audio) or
frames / second (video).
dwScale and dwRate should be mutually prime. Tests have shown that for example 10,000,000 /400,000 instead of 25/1 results in files that don't work on some hardware MPEG4 players.

• dwStart
Start time of stream. In the case of VBR audio, this value indicates the number of silent frames to be played before the stream starts.

• dwLength
size of stream in units as defined in dwRate and dwScale

• dwSuggestedBufferSize
Size of buffer necessary to store blocks of that stream. Can be 0 (in that case the application has to guess), but should not be 0, as Microsoft's AVI splitter does not handle this case properly in some cases (e.g. MP3-CBR in Open-DML files)

• dwQuality
should indicate the quality of the stream. Not important

• dwSample
Size number of bytes of one stream atom (that should not be split any further).

The stream header list element: strf

The structure of the strf chunk depends on the media type. Video streams use the BITMAPINFOHEADER structure, whereas audio streams use the WAVEFORMATEX structure.

The stream header list element: indx

This chunk contains the upper level index for the stream.

The stream header list element: strn

This element contains a name for the stream. That stream name should only use plain ASCII, especially not UTF-8.

AVI Indexes

old style index

The index as described is the index you will find in AVI 1.0 files. It is placed after the movi List in the RIFF AVI List. The data section of the idx1 chunk has the following layout:

AVIINDEXENTRY index_entry[n]

typedef struct
{
DWORD ckid;
DWORD dwFlags;
DWORD dwChunkOffset;
DWORD dwChunkLength;
} AVIINDEXENTRY;

Those values have the following meaning:

• ckid
Specifies a four-character code corresponding to the chunk ID of a data chunk in the file.

• dwFlags
The following flags are defined:

- AVIIF_KEYFRAME: The chunk the entry refers to is a keyframe.
- AVIIF_LIST: The entry points to a list, not to a chunk.
- AVIIF_FIRSTPART: Indicates this chunk needs the frames following it to be used; it cannot stand alone.
- AVIIF_LASTPART: Indicates this chunk needs the frames preceding it to be used; it cannot stand alone.
- AVIIF_NOTIME: The duration which is applied to the corresponding chunk is 0.

If neither AVIIF_FIRSTPART nor AVIIF_LASTPART is set, the chunk can be used alone, in other words, it is at least one packet of the corresponding stream. This is important for storing VBR audio streams in AVI files.

• dwChunk
Offset Contains the position of the header of the corresponding Chunk.
Warning: This can be either the absolute position in the file, or the position relatively to the first byte of the 'movi' identificator. An AVI File parser must be able to handleboth versions.

• dwChunkLength
Contains the size of the corresponding chunk in bytes.