Click here to Skip to main content
15,885,954 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Checkbox Pin
namaskaaram14-Nov-04 18:43
namaskaaram14-Nov-04 18:43 
GeneralRe: Checkbox Pin
pubududilena14-Nov-04 18:45
pubududilena14-Nov-04 18:45 
GeneralRe: Checkbox Pin
ThatsAlok14-Nov-04 18:45
ThatsAlok14-Nov-04 18:45 
QuestionHow to get Driver Names of the hardisk using C++ ? Pin
pubududilena14-Nov-04 17:51
pubududilena14-Nov-04 17:51 
AnswerRe: How to get Driver Names of the hardisk using C++ ? Pin
ThatsAlok14-Nov-04 18:25
ThatsAlok14-Nov-04 18:25 
GeneralRe: How to get Driver Names of the hardisk using C++ ? Pin
pubududilena14-Nov-04 18:32
pubududilena14-Nov-04 18:32 
GeneralRe: How to get Driver Names of the hardisk using C++ ? Pin
ThatsAlok14-Nov-04 18:41
ThatsAlok14-Nov-04 18:41 
GeneralRe: How to get Driver Names of the hardisk using C++ ? Pin
Eyal Kaplan15-Nov-04 7:04
Eyal Kaplan15-Nov-04 7:04 
Hi
I tried to do it for getting name of the current driver that the program is running and to show how much free_space in Bytes left
Check this code I think it will help you ..(_getdrive)
You can delete what ever you don't need Wink | ;)





/*---------Function Current_Disk_Freespace---------------*/
/*The Function print the free space of the current disk */
/*Input- none. */
/*Output-Don't return a value
/* just print the Value in Mega-Bytes */

/*need to be included*/
#include <windows.h>
#include <direct.h>
#include <stdio.h>
#include <tchar.h>
#include <iostream>
using std::cout;
#include<iomanip>
using std::setprecision;
/**********************/

void free_space_message()
{
struct _diskfree_t df = {0};
unsigned uErr,uDrive,current_drive;
double result=0;
char Letter=0;

for (uDrive=1; uDrive<=26; ++uDrive)
{
current_drive = _getdrive();
//check for the current disk that is working
if (current_drive==uDrive)
{
uErr = _getdiskfree(uDrive, &df);
Letter = uDrive + 'A' - 1;
//Calculate the value to Mega-Bytes
result=double(df.avail_clusters)/(1024*1024)*double(df.sectors_per_cluster*df.bytes_per_sector);
printf("%c:",Letter);
cout.precision(0);
cout<
GeneralError: _CrtIsValidHeapPointer(pUserData) Pin
suninwater14-Nov-04 17:45
suninwater14-Nov-04 17:45 
GeneralLAN Pin
don7cry14-Nov-04 16:01
don7cry14-Nov-04 16:01 
GeneralRe: LAN Pin
Ryan Binns14-Nov-04 17:27
Ryan Binns14-Nov-04 17:27 
GeneralRe: LAN Pin
don7cry14-Nov-04 20:37
don7cry14-Nov-04 20:37 
GeneralRe: LAN Pin
Antony M Kancidrowski15-Nov-04 0:17
Antony M Kancidrowski15-Nov-04 0:17 
GeneralRe: LAN Pin
Anonymous15-Nov-04 1:03
Anonymous15-Nov-04 1:03 
GeneralRe: LAN Pin
Anonymous15-Nov-04 1:10
Anonymous15-Nov-04 1:10 
QuestionHow to detect the audio device is recoding? Pin
ErisonWu14-Nov-04 14:04
ErisonWu14-Nov-04 14:04 
AnswerRe: How to detect the audio device is recoding? Pin
pubududilena14-Nov-04 18:01
pubududilena14-Nov-04 18:01 
GeneralRe: How to detect the audio device is recoding? Pin
ErisonWu14-Nov-04 22:40
ErisonWu14-Nov-04 22:40 
GeneralIcons in C++ Pin
bjcee14-Nov-04 12:16
bjcee14-Nov-04 12:16 
GeneralRe: Icons in C++ Pin
bryce14-Nov-04 14:53
bryce14-Nov-04 14:53 
GeneralI'm trying to create a calculator Pin
14-Nov-04 11:23
suss14-Nov-04 11:23 
GeneralRe: I'm trying to create a calculator Pin
John R. Shaw14-Nov-04 11:41
John R. Shaw14-Nov-04 11:41 
GeneralC++ Serial I/O Comm Library Pin
CNewbie14-Nov-04 10:03
CNewbie14-Nov-04 10:03 
GeneralRe: C++ Serial I/O Comm Library Pin
John R. Shaw14-Nov-04 12:12
John R. Shaw14-Nov-04 12:12 
GeneralSimple Intro to mySQL with VS 2002 Pin
porto9914-Nov-04 8:47
porto9914-Nov-04 8:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.