Lisp HUG Maillist Archive

OLE/COM(?) for dummies?

Hi,
does anyone have a pointer to a OLE/COM for dummies?
All I want to do is really to stuff files into a database (as blobs),
let the user edit the blobs by launching excel/word/whatever
and when the edit is done, store the edited copy back in the
database.

So I guess the task is down to
1) figure out which program to launch(?) (Is filename extension the only way?)
2) launch program with filename as an argument.

Should be simple, no?
-- 
  -asbjxrn


Re: OLE/COM(?) for dummies?

On Tuesday 14 November 2006 8:57 am, Asbjørn Bjørnstad wrote:
> Hi,
> does anyone have a pointer to a OLE/COM for dummies?
> All I want to do is really to stuff files into a database (as blobs),
> let the user edit the blobs by launching excel/word/whatever
> and when the edit is done, store the edited copy back in the
> database.

If you really want COM, look in the examples/com/automation directory.  Using 
COM, you don't need to launch the program, but you do need to know its 
automation api.

>
> So I guess the task is down to
> 1) figure out which program to launch(?) (Is filename extension the only
> way?) 2) launch program with filename as an argument.

This description makes me think that you don't want COM, but you simply want 
to launch a program, using, say, system:call-system.

http://www.lispworks.com/documentation/lw50/LWRM/html/lwref-612.htm#pgfId-886156

Yes, afaik, the only way to differentiate files under Windows is to look at 
the extension.  If you want to make it more complicated, you can access the 
Windows registry to look up file associations (which are done via extensions, 
as far as I can tell).

pt


Re: OLE/COM(?) for dummies?

On 11/15/06, Paul Tarvydas <tarvydas@visualframeworksinc.com> wrote:
> On Tuesday 14 November 2006 8:57 am, Asbjørn Bjørnstad wrote:
> > Hi,
> > does anyone have a pointer to a OLE/COM for dummies?
> > All I want to do is really to stuff files into a database (as blobs),
> > let the user edit the blobs by launching excel/word/whatever
> > and when the edit is done, store the edited copy back in the
> > database.
>
> If you really want COM, look in the examples/com/automation directory.  Using
> COM, you don't need to launch the program, but you do need to know its
> automation api.

Yes, I think I need to read a bunch of those COM/OLE introductory articles.
>From my understanding so far automation would be used to programmatically
interact with other programs. I don't want to interfer with the users editing
of the document, just launch the program and pick up the results.

> > So I guess the task is down to
> > 1) figure out which program to launch(?) (Is filename extension the only
> > way?) 2) launch program with filename as an argument.
>
> This description makes me think that you don't want COM, but you simply want
> to launch a program, using, say, system:call-system.
>
> http://www.lispworks.com/documentation/lw50/LWRM/html/lwref-612.htm#pgfId-886156

I think this is close to what I want, but I would want to know whenever
the user saves changes to the file so that I can update the database with the
new version. I guess I could use :wait t, but that won't handle the user
keeping eg. word open once he's done editing, would it? Is this where
COM/automation comes into the picture? Would be nice to have a
"file saved"-callback.
-- 
  -asbjxrn


Re: OLE/COM(?) for dummies?

On 11/15/06, John Pallister <john@synchromesh.com> wrote:
>
> Asbjørn, I looked through my Win32 SDK docs and found a page called "Monitoring
> Changes in a Directory or Directory Tree" that included the following paragraph:

Excellent. Thanks guys.
-- 
  -asbjxrn


Updated at: 2020-12-10 08:47 UTC