🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4846

Re: detecting removable media

#4846
From: Remy Lebeau (TeamB)
Date: Thu, 17 Nov 2005 07:36
19 lines
1459 bytes
"Mike Collins" <its@thebottomofthe.post> wrote in message
news:437be584@newsgroups.borland.com...

> Is there any defined or specify way of detecting / determining
> a removable media device.

GetLogicalDeviceStrings() and GetDeviceType().

> if I use a save dialog, is there any way to test if the
> returned path relates to such a removable device.

When the dialog is being closed, your code can be notified via the WM_NOTIFY
message, at which point you can query the dialog to see if the drive letter
for the specified filename is a removable drive, and if not then cancel the
dialog from closing and prompt the user.


Gambit
Technical Details
Message-ID: <437c343d@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <437be584@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6e2054a8eafb2f43
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <437be584@newsgroups.borland.com>
Subject: Re: detecting removable media
Date: Wed, 16 Nov 2005 23:36:01 -0800
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <437c343d@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1132213309 68.69.17.41 (16 Nov 2005 23:41:49 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail