Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #197

Re: Need help with writing drive property - Final Approach

From GS <gs@somewhere.net>
Newsgroups comp.lang.basic.visual.misc, microsoft.public.vb.general.discussion
Subject Re: Need help with writing drive property - Final Approach
Date 2011-05-23 13:20 -0400
Organization A noiseless patient Spider
Message-ID <ire4p3$fi7$1@dont-email.me> (permalink)
References <ir98hg$5dq$1@dont-email.me>

Cross-posted to 2 groups.

Show all headers | View raw


It looks like I'm stuck with using WMI for now. I've been able to 
reduce the calls to 1x for 2 classes: DiskDrive & 
LogicalDiskToPartition.

I make the first call to LogicalDiskToPartition, loading the results 
(Index,DriveLetter) into an array (saLDTP()).

I then pass the array to my proc that lists all drives with 
InterfaceType "USB" via DiskDrive. For each drive found it loops saLDTP 
to match the drive's Index so it can grab the DriveLetter. This is not 
necessarily going to be the index of the array element since there'll 
be one element for each partition on each drive. I can exit the loop at 
the first match found and move to the next drive (if there's more).

The DriveLetter and Caption are then put into a 3 column listbox, of 
which only 2 columns are visible. (The 3rd column holds the other data 
I need for processing my license key)

Once the user selects a drive, all its info is grabbed from the list 
and processed:

  - I have the target drive
  - I have the Caption for the progress bar form
  - I have the hardware *seat* portion of the license string

That appears to be as simple as it gets since there doesn't appear to 
be an API solution at present. If anyone sees any pitfalls in this 
approach I'd appreciate hearing from you.

Large thanks to MikeD and Mayayana for your contributions!

-- 
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Find similar


Thread

Need help with writing drive property GS <gs@somewhere.net> - 2011-05-21 16:54 -0400
  Re: Need help with writing drive property "Mayayana" <mayayana@invalid.nospam> - 2011-05-21 19:10 -0400
    Re: Need help with writing drive property GS <gs@somewhere.net> - 2011-05-21 19:35 -0400
      Re: Need help with writing drive property "Mayayana" <mayayana@invalid.nospam> - 2011-05-21 23:27 -0400
        Re: Need help with writing drive property GS <gs@somewhere.net> - 2011-05-22 00:49 -0400
          Re: Need help with writing drive property GS <gs@somewhere.net> - 2011-05-22 00:58 -0400
        Re: Need help with writing drive property: Possible solution GS <gs@somewhere.net> - 2011-05-22 02:07 -0400
          Re: Need help with writing drive property: Possible solution "MikeD" <nobody@nowhere.edu> - 2011-05-22 09:02 -0400
            Re: Need help with writing drive property: Possible solution GS <gs@somewhere.net> - 2011-05-22 14:29 -0400
              Re: Need help with writing drive property: Possible solution "MikeD" <nobody@nowhere.edu> - 2011-05-22 17:01 -0400
                Re: Need help with writing drive property: Possible solution GS <gs@somewhere.net> - 2011-05-22 18:28 -0400
                Re: Need help with writing drive property: Possible solution GS <gs@somewhere.net> - 2011-05-22 18:29 -0400
                Re: [OT] Bolding text. Dee Earley <dee.earley@icode.co.uk> - 2011-05-23 10:54 +0100
                Re: [OT] Bolding text. "Jim Mack" <no-uce-ube@mdxi.com> - 2011-05-23 09:33 -0400
                Re: [OT] Bolding text. Helmut_Meukel <Helmut_Meukel@bn-hof.invalid> - 2011-05-23 17:48 +0200
                Re: [OT] Bolding text. Helmut_Meukel <Helmut_Meukel@bn-hof.invalid> - 2011-05-23 18:00 +0200
                Re: [OT] Bolding text. Dee Earley <dee.earley@icode.co.uk> - 2011-05-24 10:44 +0100
                Re: Need help with writing drive property: Possible solution "MikeD" <nobody@nowhere.edu> - 2011-05-23 08:51 -0400
                Re: Need help with writing drive property: Possible solution GS <gs@somewhere.net> - 2011-05-23 10:48 -0400
          Re: Need help with writing drive property: Possible solution "Mayayana" <mayayana@invalid.nospam> - 2011-05-22 09:23 -0400
            Re: Need help with writing drive property: Possible solution GS <gs@somewhere.net> - 2011-05-22 14:36 -0400
            Re: Need help with writing drive property: Possible solution GS <gs@somewhere.net> - 2011-05-22 14:49 -0400
            Re: Need help with writing drive property: Possible solution GS <gs@somewhere.net> - 2011-05-22 16:26 -0400
              Re: Need help with writing drive property: Possible solution "Mayayana" <mayayana@invalid.nospam> - 2011-05-22 18:29 -0400
                Re: Need help with writing drive property: Possible solution GS <gs@somewhere.net> - 2011-05-22 18:33 -0400
              Re: Need help with writing drive property: Possible solution "Mayayana" <mayayana@invalid.nospam> - 2011-05-22 18:36 -0400
                Re: Need help with writing drive property: Possible solution GS <gs@somewhere.net> - 2011-05-22 18:49 -0400
                Re: Need help with writing drive property: Possible solution "Mayayana" <mayayana@invalid.nospam> - 2011-05-22 20:48 -0400
                Re: Need help with writing drive property: Possible solution GS <gs@somewhere.net> - 2011-05-22 21:30 -0400
  Re: Need help with writing drive property "MikeD" <nobody@nowhere.edu> - 2011-05-21 19:42 -0400
    Re: Need help with writing drive property GS <gs@somewhere.net> - 2011-05-21 20:14 -0400
  Re: Need help with writing drive property - Final Approach GS <gs@somewhere.net> - 2011-05-23 13:20 -0400

csiph-web