Tuesday, July 16, 2013

create disk space

#include "Ifx.h"
 prototype Get_disk_Space();
function Get_disk_Space()
    STRING   szDrive,svResultPath;
    long freespace,i;
    NUMBER   nvResult;
    ///LIST     listInfo;
begin 
   freespace=0;
AskPath ("Select drive:", "C:\\", svResultPath);
   i=0;
   freespace= GetDiskSpace(szDrive);  
  
   if(freespace<i) then
  
   // MessageBox ("not enough space", SEVERE);
    //  Disable (NEXTBUTTON);
 
       endif;
       
         if(freespace>i) then
        Enable (NEXTBUTTON);
        // MessageBox ("enough space,go ahead", INFORMATION);
   
       
       endif;
        ///Enable (FINISHBUTTON);
   
      end;
  
  
  
    // Create a list for system information.
  //  listInfo = ListCreate (STRINGLIST);
    // Get the amount of extended memory.
   // if (GetSystemInfo (EXTENDEDMEMORY, nvResult, svResult) < 0) then
       // szInfo = "Couldn't get EXTENDEDMEMORY info.";
   // else
     //   Sprintf(szInfo, "Extended memory: %d K", nvResult);
 //   endif;
    // Add the information to the list.
  //  ListAddString(listInfo, szInfo, AFTER);
    // Get the boot drive.
   // if (GetSystemInfo (BOOTUPDRIVE, nvResult, svResult) < 0) then
       // szInfo = "Couldn't get BOOTUPDRIVE info.";
   // else
       // Sprintf(szInfo, "Boot drive: %s", svResult);
    //endif;
    // Add the information to the list.
  //  ListAddString(listInfo, szInfo, AFTER);
    // Get info about the CD-ROM.
   // if (GetSystemInfo (CDROM, nvResult, svResult) < 0) then
       // szInfo = "Couldn't get CD-ROM info.";
   // else
       // if (nvResult = 0) then
          //  svResult = "No";
       // else
          //  svResult = "Yes";
      //  endif;
       
       // Sprintf(szInfo, "CDROM: %s", svResult);
    //endif;
    // Add the information to the list.
   // ListAddString(listInfo, szInfo, AFTER);
    // Get the video adapter.
  //  if (GetSystemInfo (VIDEO, nvResult, svResult) < 0) then
       // szInfo = "Couldn't get VIDEO info.";
   // else
       // switch (nvResult)
          //  case IS_UNKNOWN:
            //    szInfo = "VIDEO: UNKNOWN";
          //  case IS_SVGA:
           //     szInfo = "VIDEO: SVGA";
           // case IS_XVGA:
               // szInfo = "VIDEO: XVGA";
           //// case IS_UVGA:
            //    szInfo = "VIDEO: UVGA";
       // endswitch;
   // endif;
    // Add the information to the list.
    //ListAddString(listInfo, szInfo, AFTER);
    // Get number of available colors.
    //if (GetSystemInfo (COLORS, nvResult, svResult) < 0) then
        //szInfo = "Couldn't get COLORS info.";
   // else
       // Sprintf(szInfo, "Number of colors: %d", nvResult);
    //endif;
    // Add the information to the list.
 //   ListAddString(listInfo, szInfo, AFTER);
    // Get the current date.
  //  if (GetSystemInfo (DATE, nvResult, svResult) < 0) then
  //      szInfo = "Couldn't get DATE info.";
   // else
     //   Sprintf(szInfo, "DATE: %s", svResult);
    //endif;
    // Add the information to the list.
    //ListAddString(listInfo, szInfo, AFTER);
    // Get the current time.
  //  if (GetSystemInfo (TIME, nvResult, svResult) < 0) then
      //  szInfo = "Couldn't get TIME info.";
   // else
      //  Sprintf(szInfo, "TIME: %s", svResult);
    //endif;
  //
  //  // Add the information to the list.
   // ListAddString(listInfo, szInfo, AFTER);
   // // Get the operating system.
  //  if (GetSystemInfo (OS, nvResult, svResult) < 0) then
       // szInfo = "Couldn't get Operating System info.";
    //else
        //switch (nvResult)
           // case IS_WINDOWSNT:
             //   szInfo = "OS: Windows NT";
          //  case IS_WINDOWS9X:
               // GetSystemInfo (WINMINOR, nvResult, svResult);
               
              //  if (nvResult < 10) then
                   //  szInfo = "OS: Windows 95";
              //  else
                  //   szInfo = "OS: Windows 98";
             //   endif;
      //  endswitch;
   // endif;
 //   // Add the information to the list.
//    ListAddString(listInfo, szInfo, AFTER);
//    // Display the information.
//    szTitle   = "System Information";
//    szMsg     = "The following is some information related to your system:\n";
   
  //  SdShowInfoList (szTitle, szMsg, listInfo);
 //   ListDestroy(listInfo);
//end;

No comments:

Post a Comment