drive | Extension socket number |
fname | File name |
BUD_ERR_OK | Normal end | |
BUD_ERR_FILE_NOT_FOUND | Executable file not found | |
BUD_ERR_UNFORMAT | Disk is not formatted | |
BUD_ERR_NO_DISK | Memory card not found | |
BUD_ERR_BUSY | A TYPE_B function was being processed |
The following values can be designated for the argument drive that specifies extension sockets.
BUD_DRIVE_A1 | Extension socket 1 on board A |
BUD_DRIVE_A2 | Extension socket 2 on board A |
BUD_DRIVE_B1 | Extension socket 1 on board B |
BUD_DRIVE_B2 | Extension socket 2 on board B |
BUD_DRIVE_C1 | Extension socket 1 on board C |
BUD_DRIVE_C2 | Extension socket 2 on board C |
BUD_DRIVE_D1 | Extension socket 1 on board D |
BUD_DRIVE_D2 | Extension socket 2 on board D |
A minimum of 13 bytes is required for the area where the file name is to be stored. If the file does not exist, then fname[0] = '\0' results. This function is completely independent of the buFindFirstFile() and buFindNextFile() functions, and can be used without affecting the operation of either of those functions. Sint32 ret; char fname[16]; /* Get name of executable file */ ret = buFindExecFile(BUD_DRIVE_A1, fname); switch (ret) { case BUD_ERR_OK: /* Executable file found. The file name is stored in fname. */ printf("Executable file: %s\n", fname); break; case BUD_ERR_FILE_NOT_FOUND: printf("Executable file not found. \n"); break; default: printf("Error \n"); break; }