Subject: Re: foreign code chicken/egg scenario

From: Jan Wielemaker <[email-masked]>
Date: Wed, 8 Nov 2000 15:15:50 +0100

On Wed, 08 Nov 2000, Paul Singleton wrote:
>I have built a MYLIB.DLL (compiled from C) which:
>
> * refers to LIBPL.DLL
>
> * exports some foreign functions and an install() to register them
>
> * calls  PL_initialise()
>
> * then asks Prolog to call  load_foreign_library('MYLIB.DLL')
>
>Would it be OK, and better, for MYLIB.DLL to call install() directly?
>
>My approach seems to work, except it resets MYLIB's variables to zero,
>as if it were actually being reloaded (or at least reinitialised).

Sounds like dangerous practice.  If your dll embeds Prolog simply call
the install() function after PL_initialise().

	--- Jan