This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Calculator Programming subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. General Coding and Design => Calculator Programming
Author Message
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 28 Aug 2003 08:55:49 am    Post subject:

Im still bored, so Im just making random things. This will find every drive on your computer (hopefully), and display whatever info is available about them. This didnt take me too long to make, so it's not optimized yet, its not the final version, just the beta. I gotta sleep sometime!

It should work as is, without any .lib includeds. Runs on win32 system.

[EDIT] ummm seems to have locked up on win XP, does this happen to anyone else or is it just on my side?
[/EDIT]


Code:
#include <windows.h>
#include <iostream.h>
#include <stdio.h>

char DriveList[] = "ABCDEFGHIJKLMNPQRSTUVWXYZ";
char FullDrive[] = " :\\";
char blah[10];
char VolName[128];
char FileSystem[128];
unsigned long VolSerNum, MaxComLength, SystemFlags;
unsigned int result;
void DisplayInfo();

void main()
{
   cout << "IcePeek v1.0 - Made By Joe Impellizzieri"
     << "\nGroups: UnitedTI, HDC, Prokul Interactive"
     << "\nContact At: Iceman2oo0@hotmail.com"
     << "\nCoder Not At Fault For Illegal Usage"
     << "\n\nUsed For Finding All The Drives On The System\n\n";
   cout.flush();
   system("pause");
   for (int i = 0; i < 25; i++)
   {
  FullDrive[0] = DriveList[i];
  result = GetDriveType(FullDrive);
  switch (result)
  {
     case 5:
    cout << "\n\nDrive " << FullDrive << " - CD-ROM Drive";
    DisplayInfo();
     break;
     case 3:
    cout << "\n\nDrive " << FullDrive << " - Hard Drive";
    DisplayInfo();
     break;
     case 6:
    cout << "\n\nDrive " << FullDrive << " - Ram Disk";
    DisplayInfo();
     break;
     case 4:
    cout << "\n\nDrive " << FullDrive << " - Network Drive";
    DisplayInfo();
     break;
     case 2:
    cout << "\n\nDrive " << FullDrive << " - Removable Drive";
    DisplayInfo();
     break;
  }
   }
   cout << "\n\n<<<All Drives Scanned>>>\n\n";
   cout.flush();
   cin >> blah;
}
void DisplayInfo()
{
   GetVolumeInformation(FullDrive, VolName, 128, &VolSerNum, &MaxComLength, &SystemFlags, FileSystem, 128);
   cout << "\n|Volume Name|: " << VolName << "  |Volume Serial Number|: " << VolSerNum;
   cout << "\n|Max Components Length|: " << MaxComLength << "  |System Flags|: " << SystemFlags;
   cout << "\nFileSystem: " << FileSystem;
}



cheers,

JoeImp

(btw, peace to 62_52_53_53 and Arcane Confused )


Last edited by Guest on 28 Aug 2003 08:59:04 am; edited 1 time in total
Back to top
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 29 Aug 2003 04:23:33 pm    Post subject:

Could people tell me if the program just stops on their comps? It seems to work on win 95, but not win XP, at least on my comp. Thanks

JoeImp
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement