1. Get CD drive
- Posted by Erik-Jan van Kampen <e_vankampen at hotmail.com> Jun 05, 2002
- 389 views
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
2. Re: Get CD drive
- Posted by euman at bellsouth.net Jun 05, 2002
- 380 views
Yes it is! here is code that does this: http://www.rapideuphoria.com/effm.zip Euman ----- Original Message ----- From: "Erik-Jan van Kampen" <e_vankampen at hotmail.com> > 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
3. 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 > > > >
4. Re: Get CD drive
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jun 05, 2002
- 385 views
At RDS site, Al Getz has "Get Drives" which will do that. It's pretty simple to eliminate the checking for floppy (so it doesn't go "chunka-chunka-chunka"), & then filter the return for the cd code. Dan Moyer ----- Original Message ----- From: "Erik-Jan van Kampen" <e_vankampen at hotmail.com> To: "EUforum" <EUforum at topica.com> 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 > > > >
5. Re: Get CD drive
- Posted by Erik-Jan van Kampen <e_vankampen at hotmail.com> Jun 05, 2002
- 391 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 > > >