Re: Get CD drive
- Posted by Erik-Jan van Kampen <e_vankampen at hotmail.com> Jun 05, 2002
- 390 views
Thanks Euman, this is exactly was I was looking for! >Date: Wed, 5 Jun 2002 12:17:33 -0500 >From: euman at bellsouth.net >Subject: Re: Get CD drive >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 > > >