Subject: Re: Embedding troubles

From: Luis Iraola Moreno <[email-masked]>
Date: Wed, 02 Jun 1999 11:52:59 +0100 (WET DST)

Hi again,

Jan, thanks a lot for your quick answer.

I am afraid I am still in trouble, but I think the solution is closely
connected with the following point:

> How do you relate the state?  Basically, there are two options.  One is
> to append the state to the main .exe file and the other is to pass 
> -x <path-to-state> to PL_initialise().  Both are supposed to work.

Well, up to now, I related my saved state just naming it as my main
application. So, if my C++ app. is called "myapp.exe", I just name the
saved state "myapp.qlf".

Regarding the arguments of PL_initialise(), I just passed in the argv[0]
the address of the string "myapp.exe".

Given that this way of relating the saved state is not one of the two
options Jan mentioned, I have first tried to change to one of the standard
options, hoping this will solve my major problem or at lest I will learn
something new in the way. 

The -x way is the one I would prefer, but I have not succeeded in my first
attempts. So my question is: 

How should I pass the "-x path-to-state" to PL_initialise()? 

I have tried first to concatenate it in argv[0], something like:

argv[0]="myapp.exe -x mystate.qlf"

Then I have tried to put the -x option in a second argv[]:

argv[0]="myapp.exe";
argv[1]="-x mystate.qlf";

But in both cases libpl.dll (version 2.9.7) exits the app. with code 1.

Thanks in advance for your help,

Luis Iraola.