<div dir="ltr"><div>Hi Clement,</div><div><br></div><div>thanks for answering.<br></div><div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_-3377001400262691365WordSection1"><p class="MsoNormal">
You are correct, the pvApiCtx global define available in Scilab 5 no more exists in Scilab 6 as described in [1] or [2]. The call_scilab might need to be updated to cover this change, could you please post a bug on that ?</p></div></div></blockquote><div> 
<div dir="ltr">Ah, yes I will, but at the moment I still don't know where the bug is except it seems some documentation is missing (or it's a combination with something I have misunderstood).</div><div dir="ltr"><br></div>

</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_-3377001400262691365WordSection1"><p class="MsoNormal">In a sentence, you should add a variable `void* pvApiCtx` on each gateway declaration. This variable will be passed through the Scilab APIs as a context of execution.<u></u><u></u></p></div></div></blockquote><div> </div><div>This I found in the documentation, so if I were doing a gateway, then I don't think anything is really missing in the documentation. The problem is I'm running Scilab from my C++ exe file (Scilab Engine instead of Gateway if I understood the naming correctly). In short I did this from my program (using Scilab 5.5.2):</div><div>
<div dir="ltr"><ol><li>Start up the scilab instance: StartScilab()</li><li>Call my script: SendScilabJob()</li><li>Read back some variables after the script is done: readNamedMatrixOfDouble(
pvApiCtx, ...)</li><li>TerminateScilab()</li></ol></div>

</div><div>But up until number 3 above, "pvApiCtx" wasn't needed. And I've read some other discussion on this mailing list that you shouldn't mix the old 5.2 stack-style with the new 6.X C++ API style, but that feels exactly what I'm doing!? So I'm guessing I'm actually reading back my variables wrong, but I didn't find any documentation of another way to do it? Sending NULL on 
pvApiCtx makes the program work (which I found in an example), but is it really the right 6.X way to do it in?<br></div><div><br></div><div>Thanks for any hints</div></div></div></div>