| 1095 | |
| 1096 | #if defined(_WIN32) |
| 1097 | gchar* |
| 1098 | FindFirstCDROM(void) |
| 1099 | { |
| 1100 | gint ii, drives; |
| 1101 | gchar drive[5]; |
| 1102 | |
| 1103 | strcpy(drive, "A:" G_DIR_SEPARATOR_S); |
| 1104 | drives = GetLogicalDrives(); |
| 1105 | for (ii = 0; ii < 26; ii++) |
| 1106 | { |
| 1107 | if (drives & 0x01) |
| 1108 | { |
| 1109 | guint dtype; |
| 1110 | |
| 1111 | drive[0] = 'A' + ii; |
| 1112 | dtype = GetDriveType(drive); |
| 1113 | if (dtype == DRIVE_CDROM) |
| 1114 | { |
| 1115 | return g_strdup(drive); |
| 1116 | } |
| 1117 | } |
| 1118 | drives >>= 1; |
| 1119 | } |
| 1120 | return NULL; |
| 1121 | } |
| 1122 | #endif |
| 1123 | |
| 1124 | void |