Bfile GetMediaFree OS

From WikiPrizm
Revision as of 08:58, 30 July 2014 by Gbl08ma (talk | contribs) (Created page with "{{syscall | name = Bfile_GetMediaFree_OS | header = fxcg/file.h | signature = int Bfile_GetMediaFree_OS(unsigned short* media_id, int* freespace) | index = 0x1DA5 | parameters...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Synopsis

Header: fxcg/file.h
Syscall index: 0x1DA5
Function signature: int Bfile_GetMediaFree_OS(unsigned short* media_id, int* freespace)

Gets the amount of free space on a device (the storage memory).

Parameters

  • unsigned short* media_id - Pointer to a 16 bit string with the device identifier (\\fls0).
  • int* freespace - Pointer to int that will hold the amount of free bytes on the device.

Returns

0 on success or a negative error code on failure.

Example

Here's how to get the amount of free bytes on the storage memory:

int smemfree;
unsigned short smemMedia[10]={'\\','\\','f','l','s','0',0};
Bfile_GetMediaFree_OS( smemMedia, &smemfree );
// the free space in bytes on the storage memory is now on smemfree.