Google Groups Home
Help | Sign in
Message from discussion Best way to write plug-ins?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Peter Mattis  
View profile
 More options Jul 16 1995, 3:00 am
Newsgroups: comp.os.linux.development.apps
From: p...@soda.CSUA.Berkeley.EDU (Peter Mattis)
Date: 1995/07/16
Subject: Re: Best way to write plug-ins?
In article <3u7amh$...@felix.cc.gatech.edu>,

Jeff Garzik <jgar...@cc.gatech.edu> wrote:
>I am writing an application for a my company, and I am interested in
>making it very easy to hook into internal program data (like a
>PhotoShop Plug-In, if you know what one of those is).  What would be
>the best way to do this?

>I can only think of two ways to do it right offhand, but I would like
>to avoid the second (call me a purist):

>* Allocate shared memory to a child process, which is either an
>  a.out or ELF binary.
>* Write the data out to a temporary file, or pipe, which the child
>  executable then reads.

>Is there a better way?

Well, I'm currently writing an application that uses plug-in modules. The
technique I use is to use pipes to handle communication and to use shared
memory to pass large data structures back and forth. (Well, I guess they
aren't really "passed" when using shared memory, now are they. :)

It is, however, not very easy to hook into internal program data. I set up
a fairly simple message passing system to handle requests for data. It works
fine for my purposes, but it wouldn't easily expand to allow access to
arbitrary data structures in the main application.

Mail me if you want more specifics.

Peter Mattis
p...@soda.csua.berkeley.edu


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google