How can I convert ActiveX app to NPAPI app?
All I found a way is implementing Entry Points and mapping functions for NPAPI. (NPP_GetEntryPoints...)
Is this only way except for re-writing app using Framework?
any help will be appreciated.
Thanks.
You have to write a layer that translates between NPAPI and the ActiveX control (for both directions). While it should be possible to solve this mostly generically, i'm not aware of any drop-in-code you could just use.
If you consider using FireBreath, this ActiveX wrapper example should help you. Note that if you can afford to port your plugin to FireBreath, it already generates NPAPI and ActiveX plugins from one source base for you.
Related
I was wanting to learn OpenGL using Delphi But never added an library to Delphi or even sure if this is what you need to do? Anyone give some steps on how i would add openGL to delphi so i could call it in the uses section?
You need a wrapper for the OpenGL dlls that declare the types and functions needed, and then you call those functions from your Delphi code. The VCL includes a somewhat limited (and generic) wrapper in OpenGL.pas, but there are better ones available.
One of the popular wrappers for Delphi is the Open Source GLScene, which includes demos and wrapper units. It also includes visual components that you drop on your form just like any other Delphi components. The link above is for the SourceForge project; the GLScene web site has more information, including documentation and FAQs.
Has anyone used the ICU ( see http://site.icu-project.org/ ) DLLs from Delphi?
Specifically I'm interested in the Code Page Conversion and Collation functions.
Looking at the header files it would appear that they are mostly in C++ using classes, so without having done much research yet, I would assume that it's necessary to create a simple wrapper around this that exports simple functions which can easily be imported in Delphi.
Has anyone done any work for that yet?
Or can anyone recommend a different solution for Delphi that has similar extensive coverage for codepages and collation orders?
I don't use it, but there's a very complete translation called ICU4PAS that wraps the DLLs and provides a nice Delphi-based interface.
i want my own pascal code to be executed it also have some uses files and other complex functions just like a Delphi code can i do this
Yes:
http://www.remobjects.com/ps.aspx
This component is used in the highly popular Inno Setup installer software.
Delphi Web Script is now under active development again.
Previously it was good; now it is becoming great.
You can download it on Google Code.
--jeroen
Another option, which is useful if you want to support more than just Pascal syntax, would be Fast-Script by the makers of Fast-Report.
There's also paxCompiler
Depends how much pascal you want to interpret. Pascal Script will interpret most stuff but you can't declare classes in a script (You can however import them using script functions). You can't use "uses" clauses either.
If you want to do full on pascal support you're going to have to compile it. You could probably use the FreePascal one providing your app's licensing is compatible (GPL).
TMS has both a scripting engine and a scripting IDE product.
I want to design Delphi plugin framework. There are three options:
1. DLL
2. BPL
3. COM interface
Every option has some disadvantage.
DLL - Promblem with MDI apllication, forms from plugin cannot be embeded to the host exe - mdi application.
BPL - Every *.bpl plugin and *.exe host application must be compiled with the same version of Delphi.
COM - Interfaces {xxx-xx-xxx-xx} must be registered in system, (regsvr) So plugin framework cannot be portable!
Is everything true what I wrote above? If not, please correct me, or is there some other possibility?
thanks
Yes, what you wrote is correct. All of these have advantages and disadvantages, the question is what is important for you, you didn't say what you want to do, so we can't tell you how to do it.
In general, I would pick BPL by default, use DLL if you need to use it from non Delphi apps, and pick COM only if you really have to.
The alternative is to not build your own, since there are several Delphi plugin frameworks available.
Also, this topic has been discussed here before, check out:
how-best-to-add-plugin-capability-to-a-delphi-program
plugins-system-for-delphi-application-bpl-vs-dll
Another possibility is having a scripting interface, such as with Python or Pascalscript. There are many advantages to this approach, not least of which is that the plugin source is also the executable, making it easy to debug and share.
I would look at Hydra from Remobjects.
Another candidate would be a combination of PaxCompiler (scripting) and EControl Form Designer (form designer).
We use DLLs, even when using only with a Delphi application.
Dll forms are embedded in the main form and use Tabs instead of MDI.
For DLL to work properly we also use a shared memory manager and built with runtime packages: vcl, rtl and our own package.
Have you taken a look at http://www.tmssoftware.com/site/tpf.asp
I'm using delphi6, and it lacks the following abilities:
a library object,
a list object(looks like TList,TStringList is good enough?)
a algorithm library(like sort,)
template library like STL
dynamic language feature or GC.
and so on.
how can I find this things?
Try Jedi Code Library. There are good replacements for container classes and sorting algorithms. I don't think there is GC or STL-like library for Delphi 6.
Delphi 6 is behind the times, check Delphi 2009 or at least Turbo Delphi
There is DeCAL, which claims to be similar to the STL. I've never really tested it, however.
There are many third party delphi libraries, components and source code examples on the net.
Just a couple off the top of my head
JEDI http://www.delphi-jedi.org/
and
a Delphi super page http://delphi.icm.edu.pl/
As an alternative to DeCAL (Which is a very good alternative to TList without generics), I will propose EZSDL by Julian M Bucknall.
List of main third party components compatible with Delphi 2007 for Win32 and RAD Studio 2007 by Andreano Lanusse at http://edn.embarcadero.com/article/37455
The first three are in the VCL, take a look in the help and the sources. Delphi 6 has no generics, so cannot be used with a template library. And no garbage collection.
If you want to program in Delphi, forget about them. If not, find another language.