TMFormat Code Example

long session_handle;
unsigned char state_buffer[15360];
FileEntry fentry;
short result;

/* session_handle set from a call to TMExtendedStartSession */
...

/* get the unique registration number of the device to communicate with using TMFirst,TMNext,TMRom... */
...

/* format the device found */
result = TMFormat(session_handle, state_buffer);

if (result >= 0)
{
   /* device formatted */
   ...
}
else
{
   /* error formatting the device */
   ...
}

/* close the session with a call to TMEndSession */
...