Subject: Re: SWI-P Win32 port embedding problem

From: [email-masked] (Uwe Lesta)
Date: Mon, 06 Sep 1999 10:59:11 +0200

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
[email-masked]