wine/libtest/volinfo.c
Pavel Roskin 734247b529 Casts to (SEGPTR) removed. They did nothing anyway.
Includes added or removed where necessary.
Win16 functions replaced with their Win32 counterparts. Comments added
where it was impossible.
CALLBACK added where necessary. Some declarations fixed.
Constructs like "#if WINDOWS" corrected. Using "#ifdef __unix__" instead.
DlgProc in hello3 uses EndDialog() instead of DestroyWindow().
Listbox enabled in hello3.
1999-04-03 13:52:04 +00:00

29 lines
993 B
C

/*
* This test program was copied from documentation/cdrom-label
*/
#include <windows.h>
#include <stdio.h>
#include <string.h> /* for strcat() */
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow)
{
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;
}