From p.singleton@keele.ac.uk  Wed Nov  8 14:06:44 2000
Received: from mail12.svr.pol.co.uk (mail12.svr.pol.co.uk [195.92.193.215])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id OAA13915
	for <prolog@swi.psy.uva.nl>; Wed, 8 Nov 2000 14:06:44 +0100 (MET)
Received: from modem4294967173.people.dialup.pol.co.uk ([195.92.3.123] helo=keele.ac.uk)
	by mail12.svr.pol.co.uk with esmtp (Exim 3.13 #0)
	id 13tUwA-0007D2-00
	for prolog@swi.psy.uva.nl; Wed, 08 Nov 2000 13:06:47 +0000
Message-ID: <3A094EE8.C7581051@keele.ac.uk>
Date: Wed, 08 Nov 2000 13:02:32 +0000
From: Paul Singleton <p.singleton@keele.ac.uk>
Organization: SmartArts Computing Consultancy
X-Mailer: Mozilla 4.74 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: SWI Prolog <prolog@swi.psy.uva.nl>
Subject: foreign code chicken/egg scenario
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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).

Paul Singleton

