<br><br><div class="gmail_quote">2011/4/7 Peter Williams <span dir="ltr"><<a href="mailto:pewilliams2010@live.com">pewilliams2010@live.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
Hi Daniel,<br><br><hr>Date: Thu, 7 Apr 2011 17:20:51 -0300<br>From: <a href="mailto:daniel.franzini@gmail.com" target="_blank">daniel.franzini@gmail.com</a><br>To: <a href="mailto:lazarus@lists.lazarus.freepascal.org" target="_blank">lazarus@lists.lazarus.freepascal.org</a><br>
Subject: Re: [Lazarus] Lazarus errors -- DVD procedure identifiers.<div class="im"><br><br>>It seems that these functions and constants you are using are from Windows unit.<div><br></div><div>>Did you tried to include it in your uses clause?<br>
<br></div></div><div>I need to get this working for Linux and cross-platform compiling. Is there a Linux equivalent of these procedures?</div></div></blockquote><div><br>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.<br>
<br>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.<br>
<br>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.<br> </div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div><br></div><div>I think that maybe I can replace "ZeroMemory" with "FillChar"... what is the syntax?</div>
<div><br></div><div>What about GetDriveType, DRIVE_CDROM and DeviceIoControl ? Also what is the syntax for the Linux versions (cross platform) of these?</div><div><br></div><div>Best Regards,</div><div>Peter / pew</div><div>
<div></div><br clear="all"></div></div></blockquote></div><br>-- <br>Daniel<br><br>"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)<br>
<br>"Yes, technogeeks can be funny, even if only to each other." (<a href="http://www.boogieonline.com/revolution/science/humor/">http://www.boogieonline.com/revolution/science/humor/</a>)"<br><br>"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'')<br>