Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by �ϵ�
Sun, 19 Apr 1998 00:00
How to tell what kind of drive is used
Author: �ϵ�
Date: Sun, 19 Apr 1998 00:00
Date: Sun, 19 Apr 1998 00:00
38 lines
1668 bytes
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
--
[m[1;37m�� ��Դ:���ϴ�С�ٺ���Ϣ����վ bbs.nju.edu.cn��[FROM: a507yjh.nju.edu][m
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