Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4106
Number of posts: 14016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
CD-ROM under windows Posted by bpajk on 20 Oct 2003 at 8:06 AM
Can anyone tell me how to command the cd-rom under Windows. I have the source how to: open, close, lock, unlock... the cd-rom in DOS, but that is 16bit registery, I nead 32bit registery. How do I do this in Windows? Is it posible? Thank you in advance.
Report
Re: CD-ROM under windows Posted by delljohnb on 21 Oct 2003 at 5:51 AM
: Can anyone tell me how to command the cd-rom under Windows. I have the source how to: open, close, lock, unlock... the cd-rom in DOS, but that is 16bit registery, I nead 32bit registery. How do I do this in Windows? Is it posible? Thank you in advance.
:

I'm not exactly sure what you are looking for, but you will have MAJOR problems writing to a CD, even if it is a "burner." For the 32 bit components, that's an easy one (I even got the answer on this board!!!). Use FreePascal. Here is the link.

http://www.freepascal.org/sdown.html

The good thing about this compiler, is that I run it from a windows based DOS window, and don't have to work in full DOS mode like TurboPascal. If you have problems locating the documentation for running the editor, let me know, and I'll give you specific instructions.


In the constant declaration section of the code you would add the lines :

const
LFNSupport=True;

This will give you the lone file name support that you will need. I'm assuming that would would use the root directory prefix "d:\filename.ext" for your drive. This drive name should be listed in the boot sector of the computer's registry. You might have to run RegEdit and locate a notation there. Remember...you might have problems if you have some NTFS formatted sectors. You will need to extensively run-time debug this program if I was to guess. Good luck.

Delljohnb


Report
Re: CD-ROM under windows Posted by bpajk on 21 Oct 2003 at 12:00 PM
I am already using Free-Pascal. What I am loocking for is a unit or some code to control the CD ROM in windows. I got some Turbo pascal code, but that can't be compiled in Free-Pascal because it uses 16bit registry. I don't even know if I can control all the CD-ROM functions like: lock, unlock... The Turbo pascal code works only when compiled with Turbo pascal. Should I try to port the assembler code from 16bit to 32bit and compile it in Free-Pascal?
Report
Re: CD-ROM under windows Posted by delljohnb on 29 Oct 2003 at 8:19 AM
: I am already using Free-Pascal. What I am loocking for is a unit or some code to control the CD ROM in windows. I got some Turbo pascal code, but that can't be compiled in Free-Pascal because it uses 16bit registry. I don't even know if I can control all the CD-ROM functions like: lock, unlock... The Turbo pascal code works only when compiled with Turbo pascal. Should I try to port the assembler code from 16bit to 32bit and compile it in Free-Pascal?
:
hmmmmm.....have you thought about loading all the files into a ram drive, then accessing them from there? that would make things easier...you could assign a attribute of read-only....that would effectively lock it...
Report
Re: CD-ROM under windows Posted by bpajk on 29 Oct 2003 at 10:19 AM
: : I am already using Free-Pascal. What I am loocking for is a unit or some code to control the CD ROM in windows. I got some Turbo pascal code, but that can't be compiled in Free-Pascal because it uses 16bit registry. I don't even know if I can control all the CD-ROM functions like: lock, unlock... The Turbo pascal code works only when compiled with Turbo pascal. Should I try to port the assembler code from 16bit to 32bit and compile it in Free-Pascal?
: :
: hmmmmm.....have you thought about loading all the files into a ram drive, then accessing them from there? that would make things easier...you could assign a attribute of read-only....that would effectively lock it...
:
With the lock, unlock, open, close... I mean the door of the CD-ROM. All the code I have found on the web is for TP. I don't even know if windows lets this kind of functions. I know that open and close functions can be done, but others...



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.