Lisp HUG Maillist Archive

FLI and Creating a simple Windows service

Hello everyone,

I'm trying to figure out how to create a simple windows service in Lispworks 5.0.2.  I want to call the Windows APIs like "CreateService" to do this.  I searched the WIN32 package and found nothing resembling create-service.  My next thought is to define the functions with FLI:DEFINE-FOREIGN-FUNCTION.  Rather than type this stuff in manually, I went looking for a C header import tool like swig does for CFFI.  I found this link:

http://www.lispworks.com/documentation/lcl50/aug/aug-102.html

which refers to a TRANSLATE-C-FILE function but I cannot find the package it belongs to. 

Does anyone have any advice for generating FLI code and/or creating windows services with lispworks?

Thanks in advance,

Anthony

Re: FLI and Creating a simple Windows service

On Sun, 6 May 2007 12:55:45 -0700, "Anthony Fairchild" <fairchild.anthony@gmail.com> wrote:

> Does anyone have any advice for generating FLI code and/or creating
> windows services with lispworks?

You can look at Nick Levine's code to do that which can be found in here:

  http://www.nicklevine.org/distrib/fast-index/

And there's some code to do it with AllegroCL which shouldn't be too
hard to port to LW:

  http://opensource.franz.com/ntservice/index.html

Searching the archive of this list will also provide some pointers:

  http://dir.gmane.org/gmane.lisp.lispworks.general

HTH,
Edi.


Re: FLI and Creating a simple Windows service

On 5/6/07, Edi Weitz <edi@agharta.de> wrote:
On Sun, 6 May 2007 12:55:45 -0700, "Anthony Fairchild" <fairchild.anthony@gmail.com> wrote:

> Does anyone have any advice for generating FLI code and/or creating
> windows services with lispworks?

You can look at Nick Levine's code to do that which can be found in here:

  http://www.nicklevine.org/distrib/fast-index/

And there's some code to do it with AllegroCL which shouldn't be too
hard to port to LW:

  http://opensource.franz.com/ntservice/index.html

Searching the archive of this list will also provide some pointers:

  http://dir.gmane.org/gmane.lisp.lispworks.general

HTH,
Edi.


Thanks Edi, I'll take a look at those links.  This link in the archives looks promising:  http://article.gmane.org/gmane.lisp.lispworks.general/4703/match=create+service

It is a port of the allegro CL ntservice code.

Also, I found the documentation for foreign-parser.  I tried to import winsvc.h just for fun and got errors.  Fixing errors led to more errors so I eventually gave up.  It seems that importing header files with all dependencies is a very tedious and problematic process :-(  I think I'll try one of the other solutions.

Thanks again,

Anthony
Updated at: 2020-12-10 08:46 UTC