Commit f1f830ce authored by Petter Reinholdtsen's avatar Petter Reinholdtsen Committed by Alexandre Julliard

New file to test DRIVE_GetLabel.

parent 2abe47bd
......@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = none
RCFLAGS = -w32 -h
PROGRAMS = expand hello hello2 hello3 hello4 hello5 new rolex
PROGRAMS = expand hello hello2 hello3 hello4 hello5 new rolex volinfo
ALL_LIBS = $(WINELIB) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
C_SRCS = \
......@@ -15,7 +15,8 @@ C_SRCS = \
hello4.c \
hello5.c \
new.c \
rolex.c
rolex.c \
volinfo.c
RC_SRCS = \
hello3res.rc
......@@ -52,4 +53,7 @@ new: new.o
rolex: rolex.o
$(CC) -o rolex rolex.o $(LDOPTIONS) $(ALL_LIBS)
volinfo: volinfo.o
$(CC) -o volinfo volinfo.o $(LDOPTIONS) $(ALL_LIBS)
### Dependencies:
/*
* This test program was copied from documentation/cdrom-label
*/
#include <windows.h>
#include <stdio.h>
#include <string.h> /* for strcat() */
int WinMain(int argc,char **argv[])
{
char drive, root[]="C:\\", label[1002], fsname[1002];
DWORD serial, flags, filenamelen, labellen = 1000, fsnamelen = 1000;
printf("Drive Serial Flags Filename-Length "
"Label Fsname\n");
for (drive = 'C'; drive <= 'Z'; drive++)
{
root[0] = drive;
if (GetVolumeInformation(root,label,labellen,&serial,
&filenamelen,&flags,fsname,fsnamelen))
{
strcat(label,"\""); strcat (fsname,"\"");
printf("%c:\\ 0x%08lx 0x%08lx %15ld \"%-20s \"%-20s\n",
drive, (long) serial, (long) flags, (long) filenamelen,
label, fsname);
}
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment