Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-07

FPC and CD-ROMs

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Pianoman

Hi everyone. I have one simple question : How can i eject/close certain CD-ROM drive? I write Certain because I ave more than one so I have to specify which.
Is there some API call to do this? I searched the help files but I didn't found very much about it.
Thanx for response
Pianoman----- Original Message -----
From:
To:
Sent: Monday, July 25, 2005 12:00 PM
Subject: fpc-pascal Digest, Vol 11, Issue 28

Send fpc-pascal mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit http://lists.freepascal.org/mailman/listinfo/fpc-pascal or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific than "Re: Contents of fpc-pascal digest..."

Today's Topics:

1. [OT] Mime attachments (Angelo Bertolli)
2. Re: [OT] Mime attachments (Elio Cuevas G?mez)
3. Re: [OT] Mime attachments (Bernhard Steffen)
4. Exporting pointers to classes or objects (L505)
5. Re: Exporting pointers to classes or objects (Marc Santhoff)
6. Re: Exporting pointers to classes or objects (L505)
7. Re: String to Unicode? (Thomas Zastrow)

----------------------------------------------------------------------

Message: 1
Date: Sun, 24 Jul 2005 12:59:05 -0400
From: Angelo Bertolli
Subject: [fpc-pascal] [OT] Mime attachments
To:
Message-ID:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Does anyone else here use thunderbird? Everytime I get a digest all of the attachments in thunderbird crowd out the main window so I can't read anything. Is there any way I can make it stop doing that?

Angelo

------------------------------

Message: 2
Date: Sun, 24 Jul 2005 12:19:19 -0500
From: Elio Cuevas G?mez
Subject: Re: [fpc-pascal] [OT] Mime attachments
To: FPC-Pascal users discussions
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"

Use KMAIL. :)

Angelo Bertolli wrote 10 lines
Does anyone else here use thunderbird? Everytime I get a digest all of the attachments in thunderbird crowd out the main window so I can't read anything. Is there any way I can make it stop doing that? Angelo _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

------------------------------

Message: 3
Date: Sun, 24 Jul 2005 21:47:02 +0200
From: Bernhard Steffen
Subject: Re: [fpc-pascal] [OT] Mime attachments
To: FPC-Pascal users discussions
Message-ID:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I'm using Thunderbird as well, but not the digest form of free pascal mailing list. Works pretty good for me. Try using to receive each posting separately instead of a "blob" of digest - thus giving you the advantage of using the tree structure view of a subject thread. (each subject with every reply gets shown as a separate tree by Thunderbird, if you choose so.) For changing digest form see the link below.

HTH
Bernhard

Angelo Bertolli wrote 10 lines
Does anyone else here use thunderbird? Everytime I get a digest all of the attachments in thunderbird crowd out the main window so I can't read anything. Is there any way I can make it stop doing that? Angelo _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
------------------------------ Message: 4 Date: Sun, 24 Jul 2005 14:32:13 -0700 From: "L505" Subject: [fpc-pascal] Exporting pointers to classes or objects To: "FPC-Pascal users discussions" Message-ID: Content-Type: text/plain; charset="iso-8859-1" Questions on returning a pointer to a class with regards to DLL/SO's (exporting pointers) (I realize you can't export a class yet for FPC) Would returning a pointer to a class (either through a function result, or a function Var (by reference) parameter) allow you to use classes across module boundaries (library/executable). I am going to experiment with this, but even if it works in some odd way, I of course want to know if it would be reliable or just hit and miss. Would a pointer be more efficient or roughly the same in comparison to exporting class? Also, are classes from FPC different binary constructs than the classes from Delphi?.. so you wouldn't be able to use a exported pointer or exported class in a Delphi program from an FPC library? Regards, Lars ------------------------------ Message: 5 Date: Sun, 24 Jul 2005 23:14:43 +0200 From: Marc Santhoff Subject: Re: [fpc-pascal] Exporting pointers to classes or objects To: Message-ID: Content-Type: text/plain Am Sonntag, den 24.07.2005, 14:32 -0700 schrieb L505: > Questions on returning a pointer to a class with regards to DLL/SO's (exporting > pointers) [...] I've found an old local copy of the article I mentioned in the thread about using dialogs from dlls. Since it's not online at Borlands website any more (from somewhen in 1998), I would send you a copy if you like. On the other hand I'd really appreciate a validation on the techniques mentioned in that article with respect to fpc and lazarus from the pros, so if anybody else wants to read it ... Title and table of contents: <snip> Sharing Code and Objects Between Delphi and C++ Conrad Herrmann, Staff Engineer, Borland International Sharing Functions Packaging Sharing Objects Between Borland C++ and Delphi Using A Delphi Form As A Modeless Window In A C++ MFC Or Owl Program Conclusion </snip> HTH, Marc ------------------------------ Message: 6 Date: Sun, 24 Jul 2005 15:36:49 -0700 From: "L505" Subject: Re: [fpc-pascal] Exporting pointers to classes or objects To: "FPC-Pascal users discussions" Message-ID: Content-Type: text/plain; charset="iso-8859-1" | I've found an old local copy of the article I mentioned in the thread | about using dialogs from dlls. Since it's not online at Borlands website | any more (from somewhen in 1998), I would send you a copy if you like. | Thanks will read that one if I can find it. One other thing I should have considered, is that the object/class pointers being exported, if even possible, would of course have to use manual memory managed strings. So any object/class that used an ansistring would have to be modified to use pchars, shortstrings, or a combination pchar/pascal string. I guess the real problem is tedious memory management of each string within the class (if the class uses strings), even if you can export a pointer to an object. ------------------------------ Message: 7 Date: Mon, 25 Jul 2005 10:52:26 +0200 From: Thomas Zastrow Subject: Re: [fpc-pascal] String to Unicode? To: FPC-Pascal users discussions Message-ID: Content-Type: text/plain; charset=ISO-8859-1; format=flowed John Coppens wrote: >On Sat, 23 Jul 2005 17:00:15 +0200 >Thomas Zastrow wrote: > > > >>Hi there, >> >>I'm producing some XML-Output with a FPC-program. The problem is that >>there are special charakters like < and > in the content of some tags, >>also some german special charakters which has to be encoded into &gt; >>and so on. >> >>Are there any functions like "String to unicode" or so for doing this >>automatically?? >> >> > >Hi Tom... > >Is there some confusion? I believe you mean html entities ( &gt; is an >html entity, not unicode). Did you check the libxml2 library? This library >has the necessary escaping routines to hide those special routines. > >On the other hand, character set coding can also be done with the library. > >John > Hello John, sorry, certainly you arre right, I need something to transform special charakters to HTML-Entities. If there is nothing already I'l write a function whith a lot of StringReplace-Calls ;-) Greetings, Tom ------------------------------

Reply by email

Alexey Pavluchenko
to Pianoman

Hello Pianoman,

Monday, July 25, 2005, 1:35:21 PM, you wrote:

P> Hi everyone. I have one simple question : How can i eject/close certain P> CD-ROM drive? I write Certain because I ave more than one so I have to P> specify which.
P> Is there some API call to do this? I searched the help files but I didn't P> found very much about it.

Under Win32 you should use DeviceIOControl function. The device should be opened first with CreateFile. Refer to the WinAPI reference (MSDN) for details.

Under unices the approach is similar, the respective functions are open() and ioctl(). Again, see specific system docs for details.

Best regards, Alexey

Reply by email

John Coppens
to Alexey Pavluchenko
Show quoted text 16 lines
Hello Pianoman, Monday, July 25, 2005, 1:35:21 PM, you wrote: P> Hi everyone. I have one simple question : How can i eject/close P> certain CD-ROM drive? I write Certain because I ave more than one so P> I have to specify which. P> Is there some API call to do this? I searched the help files but I P> didn't found very much about it. Under Win32 you should use DeviceIOControl function. The device should be opened first with CreateFile. Refer to the WinAPI reference (MSDN) for details. Under unices the approach is similar, the respective functions are open() and ioctl(). Again, see specific system docs for details.

You could also simply call the 'eject /dev/hdc' and 'mount /dev/hdc' system commands under Un*x.

John

Reply by email