🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.program
Article #1173

How to tell what kind of drive is used

#1173
From: �ϵ�
Date: Sun, 19 Apr 1998 00:00
38 lines
1668 bytes
������: njhe (heҪ�Ʋ�), ����: RAD
��  ��:  How to tell what kind of drive is used.
����վ: '3m�Ͻ�ɺ�m' (Mon Mar  9 18:08:48 1998) , վ���ż�

     Product: Delphi
     Version: All
     Platform: Windows/Win32



When dealing with multiple drives, it is helpful to know
whether a drive is associated with a  is attached to a letter
(A, B, C, etc), and what its type is.  This code uses the API
GetDriveType function to do that.

function ShowDriveType(DriveLetter: char): string;
var
  i: word;
begin
  if DriveLetter in ['A'..'Z'] then {Make it lower case.}
    DriveLetter := chr(ord(DriveLetter) + $20);
  i := GetDriveType(ord(DriveLetter) - ord('a'));
  case i of
    DRIVE_REMOVABLE: result := 'floppy';
    DRIVE_FIXED: result := 'hard disk';
    DRIVE_REMOTE: result := 'network drive';
    else result := 'does not exist';
  end;
end;
--
��ϧһ�д�ۣ��ﵽ���������塣
��������߱����������߱��

m;31m�� ��Դ:���Ͻ�ɺ� bbs.njupt.edu.cn��[FROM: 202.119.236.104]m

--
�� ��Դ:���ϴ�С�ٺ���Ϣ����վ bbs.nju.edu.cn��[FROM: a507yjh.nju.edu]
Technical Details
Message-ID: <3OAbS7$t1C@bbs.nju.edu.cn>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: fc86e,f127dbcba9c1d80,start
X-Google-Attributes: gidfc86e,public
From: mendy.bbs@bbs.nju.edu.cn (�ϵ�)
Subject: How to tell what kind of drive is used
Date: 1998/04/19
Message-ID: <3OAbS7$t1C@bbs.nju.edu.cn>
X-Deja-AN: 345876719
X-Filename: Programming/M.893006407.A
Organization: nju_bbs
Newsgroups: cn.bbs.comp.program