Re: Get CD drive
- Posted by euman at bellsouth.net Jun 05, 2002
- 398 views
Sorry hit send too soon.... Here is what you should look for in that EFFM code. sequence drives integer Dtype_str, Dtype --sequence Drive_ids Drive_ids = {} sequence Drive_type Drive_type = {} atom DLen_Buf integer DLen function GetDriveStrings(integer size, atom buffer) atom result result = c_func(xGetLogicalDriveStrings,{size,buffer}) return result end function procedure getdriveinfo() DLen_Buf = myalloc(256) DLen = GetDriveStrings(256,DLen_Buf) if DLen > 256 then myfree(DLen_Buf) DLen_Buf = myalloc(DLen) DLen = GetDriveStrings(DLen,DLen_Buf) end if drives = peek({DLen_Buf,DLen}) myfree(DLen_Buf) drives = find_all(0, upper_case(drives)) for i = 1 to length(drives) do Dtype_str = allocate_string2(drives[i]) Dtype = c_func(xGetDriveType, {Dtype_str}) Drive_type = append(Drive_type, {Dtype}) myfree(Dtype_str) end for end procedure Hope it helps! Euman ----- Original Message ----- From: "Erik-Jan van Kampen" <e_vankampen at hotmail.com> To: "EUforum" <EUforum at topica.com> Sent: Wednesday, June 05, 2002 10:26 AM Subject: Get CD drive > > > Hi, > > Is it possible to detect which drive is the CD drive? > > I have looked in the archives, but I could only find routines that > check which drives exist and not what kind of drive theye are. > > Thanks, > > Erik-Jan > > > >