Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Nick Levine <ndl <at> ravenbrook.com>
Subject: Re: Supported Linux Versions
Newsgroups: gmane.lisp.lispworks.general
Date: Tuesday 3rd January 2006 12:43:18 UTC (over 11 years ago)
Oh, I didn't know that.  So, you use SAVE-IMAGE with :DLL-EXPORTS

Yes

  and :RESTART-FUNCTION set to what?  

There's no :restart-function. We do however use a combination of
*initial-processes*, action lists and a foreign callable, to
initialise the application.

    (push '("Environment startup" nil env:start-environment)
      mp:*initial-processes*)

    (define-action-list "On entry to lisp")

    (fli:define-foreign-callable ("StartLisp" :calling-convention :cdecl))
       (execute-actions ("On entry to lisp")))

    (save-image *save-image-name*
		*dll-exports*
		:console :input)

				       And you start the resulting DLL
  with rundll32 and what starts up is the usual LispWorks IDE?

Starting via rundll32 is a little tricky, as you have to ensure that
the start function doesn't return (otherwise rundll32 decides to quit).

Try saving your image thus:

    (in-package "CL-USER")

    (load-all-patches)

    (push '("Environment startup" nil env:start-environment)
	  mp:*initial-processes*)

    (fli:define-foreign-callable ("StartLisp" :calling-convention :cdecl)
	 ()
       (mp:process-wait "forever" 'false))

    (save-image "test.dll" :dll-exports '("StartLisp")
		    :console :input)

    (quit)

and invoke thus:

    rundll32 cnat.dll,StartLisp

- nick
 
CD: 4ms