From Lesta@t-online.de  Mon Sep  6 11:02:27 1999
Received: from mailout05.btx.dtag.de (mailout05.btx.dtag.de [194.25.2.153])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id LAA11189
	for <prolog@swi.psy.uva.nl>; Mon, 6 Sep 1999 11:02:26 +0200 (MET DST)
Received: from fwd10.btx.dtag.de ([194.25.2.170])
	by mailout05.btx.dtag.de with smtp 
	id 11Nuez-0000fJ-00; Mon, 6 Sep 1999 11:01:57 +0200
Received: from t-online.de (05121269112-0001(btxid)@[62.158.100.249]) 
	by fwd10.btx.dtag.de with smtp
	id <m11Nueh-0004nUC>; Mon, 6 Sep 1999 11:01:39 +0200
Message-ID: <37D3825F.DA5F104@t-online.de>
Date: Mon, 06 Sep 1999 10:59:11 +0200
X-Mailer: Mozilla 4.05 [de]C-DT  (Win95; I)
MIME-Version: 1.0
To: Petr Kocmid <pkocmid@praha.czcom.cz>
CC: "Prolog, list" <prolog@swi.psy.uva.nl>
Subject: Re: SWI-P Win32 port embedding problem
References: <000a01bef7fe$96dbe5a0$576492c3@raxas>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Sender: 05121269112-0001@t-dialin.net
From: Lesta@t-online.de (Uwe Lesta)

Petr Kocmid schrieb:

> I recompiled 3.2.9 source on win32 with Visual C++ 6/Service Pack3 and it works almost fine. That means prolog works perfectly, but plwin console has some font metrics problem on Windows98: cursor is misplaced by one or several pixels back on every character printed in line, so it is not usable for editing at all. But it does not matter for me since I do not need using it.

I work with the same environment an have no problem.
perhaps you have changed your windows default font.
Try to change the font of the swi toplevel window.
There is a menue point setting-font on the top left icon.

> Another problem I have is with static embedded system. Here is the description:
> PL_halt() calls Halt() which performs engine cleanup and exit(). This is not acceptable, since it prevents application to do something meaningfull after prolog engine has been shut. atexit() is not a solution for me, because 1. I need to embed prolog in Win32 GUI app, which opens and closes prolog session by user interaction (AI solver) and 2. want make C++ class wrapper around the engine, where constructor does PL_initialize() and destructor PL_halt() housekeeping.

I initialize prolog in the InitInstance funktion
and get some memory leaks on ExitInstance.
It is ugly but works. A better solution is welcome.

> I thing either this exit() call should be moved out of the Halt() to C stub code such as pl-ntcon.c and similars on other platforms or some more portable solution retaining backward compatibility will be perhaps PL_terminate() for embedded system doing only housekeeping or Prolog_exit() with callback setting.

Perhaps can Jan answer.

> I shall investigate sources more for similar glitches because it prevents multithreading and other things (ANSI C++ exception unwinding for example).
 
> Perhaps I can help with swi multithreading features on win32. I plan to build COM object around the engine with dual interfaces and type library so it could be used from C++, Java, VBasic, MSOffice apps and so on.

I am interested too.
 
-- 


Regards

Uwe
Lesta@t-online.de

