[Lazarus] Lazarus errors -- DVD procedure identifiers.
daniel.franzini at gmail.com
Fri Apr 8 01:17:21 CEST 2011
2011/4/7 Peter Williams <pewilliams2010 at live.com>
> Hi Daniel,
> Date: Thu, 7 Apr 2011 17:20:51 -0300
> From: daniel.franzini at gmail.com
> To: lazarus at 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
> >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
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
"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." (
"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'')
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus