Topic: plugin directory (1 of 5), Read 17 times
Conf: VEDIT Suggestions
From: Paul Breen
Date: Thursday, March 12, 2009 05:33 PM

How about a plugin directory where we could drop a dll that uses functions exposed by vedit? I have seen this done complicated requiring cpp and visual studio (so I don't use it) but I have also seen this done simply by using a powerbasic dll (standard windows dll) and all it does is "run_plugin_func". It does not have to be complicated or expose a graphic interface to be effective. Let's say you could send filename(s), byte offset of blocks and maybe a string to the called dll then load the output of the dll into a register where you can resume normal vedit operation. It is really pretty easy because the dll code is "boiler plate" that you do not mess with and it is just like writing a basic program but it is very fast. Of course you could use a free c compiler to make the dll too.

 


Topic: Re: plugin directory (2 of 5), Read 17 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Friday, March 13, 2009 03:37 PM

At 05:33 PM 3/12/2009, you wrote:
>From: "Paul Breen"
>
>How about a plugin directory where we could drop a dll that uses functions exposed by vedit? I have seen this done complicated requiring cpp and visual studio (so I don't use it) but I have also seen this done simply by using a powerbasic dll (standard windows dll) and all it does is "run_plugin_func". It does not have to be complicated or expose a graphic interface to be effective. Let's say you could send filename(s), byte offset of blocks and maybe a string to the called dll then load the output of the dll into a register where you can resume normal vedit operation. It is really pretty easy because the dll code is "boiler plate" that you do not mess with and it is just like writing a basic program but it is very fast. Of course you could use a free c compiler to make the dll too.

This would be an interesting way to add functionality to VEDIT, but unfortunately I have no knowledge of Dlls, and am currently the only VEDIT programmer. (Tom Burt retired last year.) I do plan on hiring at least one new VEDIT programmer soon, but the priorities will be to create a Linux version and rewrite the asm code into C.

Ted.

 


Topic: plugin directory (3 of 5), Read 14 times
Conf: VEDIT Suggestions
From: Pauli Lindgren
Date: Wednesday, April 15, 2009 10:34 AM

On 3/12/2009 5:33:02 PM, Paul Breen wrote:
> How about a plugin directory
> where we could drop a dll that
> uses functions exposed by
> vedit?
...
> Let's say you
> could send filename(s), byte
> offset of blocks and maybe a
> string to the called dll then
> load the output of the dll
> into a register where you can
> resume normal vedit operation.

I think a plugin is something more than just a dll.
A plugin can modify the user interface of the application and access the internals of the application. A plugin has to be made specially for the application it is called from, in this case for Vedit.

You do not need plugins or dll's to do the operations you described. You can do that simply by saving the text into a tmp file and then call the external application with the system() command. That is how I made the Aspell integration, for example. But that is a slow and clumsy method.

It would be better if Vedit macro language had an option to open named pipes. Then we could use the pipe mode interface of e.g. Aspell directly, without using tmp files. The pipe mode is quite commonly used in Linux applications.

Even better would be if we could indeed call DLLs.
I have suggested this before. For example, it would be nice to be able to call the Windows Color Picker to choose a color when editing HTML document. Aspell integration would also work much better if we could call the Aspell dll directly. This (together with key press event macro) would allow checking spelling while typing.

The DOS version of Vedit had option to call machine language routines, such as the DOS interrupts. Something similar in Windows would be the ability to call DLLs.
It should not be too difficult to implement. Basically, we only need macro language commands to call LoadLibrary and GetProcAddress, and a method to pass parameters when calling the address returned by GetProcAddress. (As in Sys_Call(), the CPU registers are set from specific numeric registers.)

--
Pauli

 


Topic: Re: plugin directory (4 of 5), Read 14 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Thursday, April 16, 2009 05:33 PM

At 10:34 AM 4/15/2009, you wrote:
>From: "Pauli Lindgren"
>It would be better if Vedit macro language had an option to open named pipes. Then we could use the pipe mode interface of e.g. Aspell directly, without using tmp files. The pipe mode is quite commonly used in Linux applications.
>
>Even better would be if we could indeed call DLLs.
>I have suggested this before. For example, it would be nice to be able to call the Windows Color Picker to choose a color when editing HTML document. Aspell integration would also work much better if we could call the Aspell dll directly. This (together with key press event macro) would allow checking spelling while typing.
>
>The DOS version of Vedit had option to call machine language routines, such as the DOS interrupts. Something similar in Windows would be the ability to call DLLs.
>It should not be too difficult to implement. Basically, we only need macro language commands to call LoadLibrary and GetProcAddress, and a method to pass parameters when calling the address returned by GetProcAddress. (As in Sys_Call(), the CPU registers are set from specific numeric registers.)

Thank you for your insight into this. I am reading up on Windows "Interprocess communication" now to better understand the benefits and complexities of implementing named pipes, and/or general DLL support.

Ted.

 


Topic: Re: plugin directory (5 of 5), Read 14 times
Conf: VEDIT Suggestions
From: Pauli Lindgren
Date: Friday, April 17, 2009 09:39 AM

On 4/16/2009 5:33:49 PM, Ted Green wrote:
>
>Thank you for your insight
>into this. I am reading up on
>Windows "Interprocess
>communication" now to better
>understand the benefits and
>complexities of implementing
>named pipes, and/or general
>DLL support.

Of those two, the DLL interface would be more important.
If it can be implemented, there is not much need for pipe interface in Windows. (However, it could me useful in Linux where pipes are often used.)
In fact, I don't know if even Aspell could be used with named pipes in Windows, since Windows does not have option to use named pipes from command line. By default, Aspell outputs to stdout.

Related to this, an option to read and write stdin and stdout would be useful. For example, this would make it possible for a macro to display results directly into DOS window.

Vedit already has option to redirect keyboard input from a file (with Redirect_Input() ). This could be expanded to allow output to file, and then allow using std i/o instead of a file.

--
Pauli