New topic in Windows: 

DRIVE ERROR

sinner - Mon Jun 09, 2008 1:53 am

<http://forums.realsoftware.com/viewtopic.php?t=22812>
                                                                                
                                                                                
Hi i had ran my program on another users computer i got an error i have a 
picture of the error below on my computer i do not get this error



this is the code i am useing is there something wrong here or mabey its the 
users pc ?

Code:
#If TargetWin32
  Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (nDrive 
As cString) As integer
  
  Const DRIVE_TYPE_UNDTERMINED = 0
  Const DRIVE_ROOT_NOT_EXIST = 1
  Const DRIVE_REMOVABLE = 2
  Const DRIVE_FIXED = 3
  Const DRIVE_REMOTE = 4
  Const DRIVE_CDROM = 5
  Const DRIVE_RAMDISK = 6
  
  For i As Integer = 0 To VolumeCount - 1
    Select Case GetDriveType( Volume( i ).Name )
    Case DRIVE_ROOT_NOT_EXIST
      If Volume( i ).IsWriteable And Volume( i ).IsReadable Then 
PopupMenu1.Addrow Volume( i ).Name
    Case DRIVE_REMOVABLE
      If Volume( i ).IsWriteable And Volume( i ).IsReadable Then 
PopupMenu1.Addrow Volume( i ).Name
    Case DRIVE_FIXED
      If Volume( i ).IsWriteable And Volume( i ).IsReadable Then 
PopupMenu1.Addrow Volume( i ).Name
    Case DRIVE_REMOTE
      If Volume( i ).IsWriteable And Volume( i ).IsReadable Then 
PopupMenu1.Addrow Volume( i ).Name
    Case DRIVE_CDROM
      If Volume( i ).IsWriteable And Volume( i ).IsReadable Then 
PopupMenu1.Addrow Volume( i ).Name
    Case DRIVE_RAMDISK
      If Volume( i ).IsWriteable And Volume( i ).IsReadable Then 
PopupMenu1.Addrow Volume( i ).Name
    Case DRIVE_TYPE_UNDTERMINED
    End Select
  Next
#EndIf

                                        
                                                                                
                                                                                
                                                                                
                                                                                
                                        



-- 
Over 900 classes with 18000 functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v8.1. 

&lt;http://www.monkeybreadsoftware.de/realbasic/plugins.shtml&gt;

[email protected]

Reply via email to