I use the api in this way:
error_code = ioctl(HS_USBFS_HANDLE, IO_IOCTL_FIND_FIRST_FILE, (uint_32_ptr) &search);
while (error_code == MFS_NO_ERROR) {
lfn_struct.PATHNAME = search_data.NAME;
error_code = ioctl(HS_USBFS_HANDLE, IO_IOCTL_GET_LFN, (uint_32_ptr) &lfn_struct);
if((search_data.ATTRIBUTE & MFS_ATTR_DIR_NAME) == MFS_ATTR_DIR_NAME) continue;
if(0 != strcmp(".\0", (char *)&search_data.NAME))
if(error_code == MFS_NO_ERROR)
strcpy(ListPtr2[ListPtrNum2], lfn);
else
strcpy(ListPtr2[ListPtrNum2], search_data.NAME);
error_code = ioctl(HS_USBFS_HANDLE, IO_IOCTL_FIND_NEXT_FILE, (uint_32_ptr) &search_data);
}
thanks for answer me!