2 * This test program was copied from the former file documentation/cdrom-label
4 * Copyright 1998 Petter Reinholdtsen
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include <string.h> /* for strcat() */
25 int PASCAL
WinMain(HINSTANCE hInstance
, HINSTANCE hPrevInstance
,
26 LPSTR lpszCmdLine
, int nCmdShow
)
28 char drive
, root
[]="C:\\", label
[1002], fsname
[1002];
29 DWORD serial
, flags
, filenamelen
, labellen
= 1000, fsnamelen
= 1000;
31 printf("Drive Serial Flags Filename-Length "
33 for (drive
= 'A'; drive
<= 'Z'; drive
++)
36 if (GetVolumeInformation(root
,label
,labellen
,&serial
,
37 &filenamelen
,&flags
,fsname
,fsnamelen
))
39 strcat(label
,"\""); strcat (fsname
,"\"");
40 printf("%c:\\ 0x%08lx 0x%08lx %15ld \"%-20s \"%-20s\n",
41 drive
, (long) serial
, (long) flags
, (long) filenamelen
,