New file to test DRIVE_GetLabel.
This commit is contained in:
parent
2abe47bdcc
commit
f1f830ce38
|
@ -4,7 +4,7 @@ SRCDIR = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
MODULE = none
|
MODULE = none
|
||||||
RCFLAGS = -w32 -h
|
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)
|
ALL_LIBS = $(WINELIB) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
|
@ -15,7 +15,8 @@ C_SRCS = \
|
||||||
hello4.c \
|
hello4.c \
|
||||||
hello5.c \
|
hello5.c \
|
||||||
new.c \
|
new.c \
|
||||||
rolex.c
|
rolex.c \
|
||||||
|
volinfo.c
|
||||||
|
|
||||||
RC_SRCS = \
|
RC_SRCS = \
|
||||||
hello3res.rc
|
hello3res.rc
|
||||||
|
@ -52,4 +53,7 @@ new: new.o
|
||||||
rolex: rolex.o
|
rolex: rolex.o
|
||||||
$(CC) -o rolex rolex.o $(LDOPTIONS) $(ALL_LIBS)
|
$(CC) -o rolex rolex.o $(LDOPTIONS) $(ALL_LIBS)
|
||||||
|
|
||||||
|
volinfo: volinfo.o
|
||||||
|
$(CC) -o volinfo volinfo.o $(LDOPTIONS) $(ALL_LIBS)
|
||||||
|
|
||||||
### Dependencies:
|
### Dependencies:
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
Loading…
Reference in New Issue