POV-Ray : Newsgroups : moray.win : Feature/plugin Request .... : Re: Feature/plugin Request .... Server Time
29 Jul 2024 10:19:33 EDT (-0400)
  Re: Feature/plugin Request ....  
From: Rudy Velthuis
Date: 11 Feb 1999 07:21:30
Message: <36c2cb4a.0@news.povray.org>
Lutz Kretzschmar schrieb in Nachricht <36c### [at] newsstmuccom>...
>> I've had a look at the C++ code for Moray plugins, but I'm lost with the
>> VC/MFC objects. If I'd only have the definition of the MFC class CObject,
>> I'd be able to translate the MFC C++ headers to Delphi32 (yes, this is
>> possible) and create any kind of plugin desired.
>You don't need to use MFC stuff to make a plugin. The Plugin SDK has a
>pure C Win32 API version that uses no MFC stuff.


I know. This is the easy part (for the converter).

But I think it is also possible to convert the MFC classes used (CInterface
etc.) to Object Pascal. I've already converted COM-interfaces to Pascal,
when Object Pascal didn't support interfaces directly and converting CObject
should be possible too. MS C++ classes and Object Pascal classes have the
same binary structure nowadays (Borland takes great care of compatibility,
because of Delphi and C++Builder). But I need to know the definition
(methods, etc.) of the base class, to make it as compatible as needed.

Using classes would greatly ease the creation of Delphi components, I think.
Creating a plugin like requested in this thread would propably be a matter
of hours, not days. Using the normal API would be like programming Windows
using the generic API (yuk) instead of components and classes.

BTW, why don't you implement real COM interfaces (as a new layer, not
replacing the existing one)? Couldn't be too hard to achieve, and would make
Moray open to any kind of language that can handle COM (i.e. implement COM
interfaces).

--
Rudy Velthuis


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.