Release 980726
[wine/multimedia.git] / documentation / cdrom-labels
blob36297c5c81f0b644c5112d9467280cc52a5a6dac
1 If a program depends on the correct label and/or serial number for the
2 CD-Rom, you can use the following command to extract that information:
4       dd if=<your cdrom device> bs=1 skip=32808 count=32
6 You need read access to the device, so perhaps you have to do it as root.
7 Put the resulting string (without trailing blanks) into your
8 wine.ini/.winerc file like:
9 Label=<the label>
11 [FIXME: if someone knows how to get the serial number in Linux, please
12         put this information here].
14 If you have access to a Win32 system and C-compiler, you can compile the
15 following program to extract this information:
17 ------------------------- begin volinfo.c ---------------------------
18 #include <windows.h>
19 #include <stdio.h>
21 int main(int argc,char **argv[])
23     char  drive, root[]="C:\\", label[1002], fsname[1002];
24     DWORD serial, flags, filenamelen, labellen = 1000, fsnamelen = 1000;
26     printf("Drive Serial     Flags      Filename-Length "
27            "Label                 Fsname\n");
28     for (drive = 'C'; drive <= 'Z'; drive++)
29     {
30         root[0] = drive;
31         if (GetVolumeInformationA(root,label,labellen,&serial,
32                                   &filenamelen,&flags,fsname,fsnamelen))
33         {
34             strcat(label,"\""); strcat (fsname,"\"");
35             printf("%c:\\   0x%08lx 0x%08lx %15ld \"%-20s \"%-20s\n",
36                    drive, (long) serial, (long) flags, (long) filenamelen,
37                    label, fsname);
38         }
39     }
40     return 0;
42 ------------------------- end volinfo.c -----------------------------