2011/4/7 Peter Williams <pewilliams2...@live.com> > Hi Daniel, > > ------------------------------ > Date: Thu, 7 Apr 2011 17:20:51 -0300 > From: daniel.franz...@gmail.com > To: lazarus@lists.lazarus.freepascal.org > Subject: Re: [Lazarus] Lazarus errors -- DVD procedure identifiers. > > > >It seems that these functions and constants you are using are from Windows > unit. > > >Did you tried to include it in your uses clause? > > I need to get this working for Linux and cross-platform compiling. Is there > a Linux equivalent of these procedures? >
Actually these seems to be very Windows specific. DeviceIOControl is the Windows mechanism to talk to devices at a lower level. I don't think one should have multiplataform versions of these. Linux in fact has its own way of dealing with hardware in a low level fashion. For CD-ROM, specifically you have to search for SCSI commands. IIRC, Linux emulates a SCSI device for CDROMs. You may also search for ATAPI commands, which seems to be the commands that the OS sends and reads from the CDROM. ZeroMemory is Windows-API. If you prefer, FillChar should be enough given proper syntax. And please, if this code is for production environments, get yourself concerned about security issues on using such APIs. > > I think that maybe I can replace "ZeroMemory" with "FillChar"... what is > the syntax? > > What about GetDriveType, DRIVE_CDROM and DeviceIoControl ? Also what is the > syntax for the Linux versions (cross platform) of these? > > Best Regards, > Peter / pew > > -- Daniel "Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do." (Donald Knuth) "Yes, technogeeks can be funny, even if only to each other." ( http://www.boogieonline.com/revolution/science/humor/)" "Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software." (Yukihiro Matsumoto, a.k.a. ``Matz'')
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus