# FS_AttachOverlayTable

## C Specification

  `#include <nitro/fs.h>`
  `void* FS_AttachOverlayTable(MIProcessor target, const void *ptr, u32 len);`

## Description

This function sets the access table that is internally used by the file system for overlay operations. After this function is called, all APIs that use the overlay table will access the specified memory.

If the pointer to the table is specified as NULL, the original table in the CARD ROM is used. This is the default. This function is used so that an application started by wireless download can run an overlay process.

The size and content of the overlay table specified in this function must precisely match the original overlay table included in the application started by wireless download. If it does not match, the `OS_Terminate` function forcibly halts the program.

Programs that call this function must be built with the `NITRO_DIGEST` option set.

## Arguments

target | Load target (ARM9/ARM7)
ptr | Pointer to the memory that holds the overlay table. From the time that the function is called, until another pointer is set by calling the function again, this memory will be referenced by the library. If you specify NULL, the default table in the CARD ROM will be used.
len | Memory size in bytes

## Return Values

Returns the previously set pointer.

## See Also

`FS_LoadOverlayInfo`, `FS_LoadOverlay`, `FS_UnloadOverlay`

## Revision History

11/08/2004 Added a description of the overlay requirements.
09/24/2004 Initial version.