🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.pascal.delphi.components.misc
3 messages
3 total messages Started by Jim Macleod Sat, 09 May 1998 00:00
How to find a disk volume label?
#3
Author: Jim Macleod
Date: Sat, 09 May 1998 00:00
6 lines
835 bytes
Can anyone tell me how to find the label of a disk(ette) under Delphi
and/or C++ Builder?
TIA
-- 
Jim Macleod
Re: How to find a disk volume label?
#4
Author: Jason Wallace
Date: Sun, 10 May 1998 00:00
17 lines
1078 bytes
  Take a look at the API function 'GetVolumeInformation'

-- 
Jason Wallace
SL Software
DarkElf@SLSoftware.reno.nv.us
--
"We are Microsoft.  Resistance is Futile.  You will be Assimiliated."


Jim Macleod wrote in message ...
>Can anyone tell me how to find the label of a disk(ette) under Delphi
>and/or C++ Builder?
>TIA
>-- 
>Jim Macleod
Re: How to find a disk volume label?
#5
Author: Roman P. Shcherbina
Date: Tue, 12 May 1998 00:00
102 lines
4004 bytes

--------------4663C4EE9855AD00B75F0F20
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit



>Jim Macleod wrote:

> >Can anyone tell me how to find the label of a disk(ette) under Delphi
> >and/or C++ Builder?
> >TIA
> >--
> >Jim Macleod

Hi Jim !!!

    Try to do something like this :

Var
 VolumeName : PChar  ;
  VolumeNameSize : DWORD  ;
  VolumeSerialNumber : PDWORD ;
  MaximumComponentLength, FileSystemFlags: DWORD;
  FileSystemNameBuffer : PChar;
  FileSystemNameSize : DWORD;
Begin
 GetMem(VolumeName,100) ;
 VolumeNameSize := 100 ;
 New(VolumeSerialNumber);
 GetMem(FileSystemNameBuffer,100) ;
 FileSystemNameSize := 100 ;
 Try
   If Not
GetVolumeInformation('c:\',VolumeName,VolumeNameSize,VolumeSerialNumber,

MaximumComponentLength,FileSystemFlags,

FileSystemNameBuffer,FileSystemNameSize)  Then ShowMessage('Error') ;
 Finally
    FreeMem(VolumeName,100) ;
    Dispose(VolumeSerialNumber);
    FreeMem(FileSystemNameBuffer,100) ;
 End ;

--
With the best wishes
                                    Roman


--------------4663C4EE9855AD00B75F0F20
Content-Type: text/html; charset=koi8-r
Content-Transfer-Encoding: 7bit

<HTML>
&nbsp;

<P>>Jim Macleod wrote:
<BLOCKQUOTE TYPE=CITE>>Can anyone tell me how to find the label of a disk(ette)
under Delphi
<BR>>and/or C++ Builder?
<BR>>TIA
<BR>>--
<BR>>Jim Macleod</BLOCKQUOTE>
Hi Jim !!!

<P>&nbsp;&nbsp;&nbsp; Try to do something like this :

<P>Var
<BR><B>&nbsp;VolumeName</B> : PChar&nbsp; ;
<BR>&nbsp; VolumeNameSize : DWORD&nbsp; ;
<BR>&nbsp; VolumeSerialNumber : PDWORD ;
<BR>&nbsp; MaximumComponentLength, FileSystemFlags: DWORD;
<BR>&nbsp; FileSystemNameBuffer : PChar;
<BR>&nbsp; FileSystemNameSize : DWORD;
<BR>Begin
<BR>&nbsp;GetMem(VolumeName,100) ;
<BR>&nbsp;VolumeNameSize := 100 ;
<BR>&nbsp;New(VolumeSerialNumber);
<BR>&nbsp;GetMem(FileSystemNameBuffer,100) ;
<BR>&nbsp;FileSystemNameSize := 100 ;
<BR>&nbsp;Try
<BR>&nbsp;&nbsp; If Not GetVolumeInformation('c:\',<B>VolumeName</B>,VolumeNameSize,VolumeSerialNumber,
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
MaximumComponentLength,FileSystemFlags,
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
FileSystemNameBuffer,FileSystemNameSize)&nbsp; Then ShowMessage('Error')
;
<BR>&nbsp;Finally
<BR>&nbsp;&nbsp;&nbsp; FreeMem(VolumeName,100) ;
<BR>&nbsp;&nbsp;&nbsp; Dispose(VolumeSerialNumber);
<BR>&nbsp;&nbsp;&nbsp; FreeMem(FileSystemNameBuffer,100) ;
<BR>&nbsp;End ;

<P>--
<BR>With the best wishes
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Roman
<BR>&nbsp;</HTML>

--------------4663C4EE9855AD00B75F0F20--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads