<x-html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2919.6307" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear Folks,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I'm writing a Windows NT Service on an AW70 which
is supposed to use the FoxAPI to read Shared Variables. So I've added a
line for the "system" user to my /opt/fox/ais/bin/an_init.tcp file like the
FoxAPI User's Guide recommends in Chapter 4 (Creating an Application, Running
Applications from a Non-Root User):</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>System="System | Open Sets | W Files | W Objects |
Read Only |</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>But alas, the following piece of code executed from
my Service still returns with a reterr of 212 (noaccess).</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>----------8<----------</FONT></DIV>
<DIV><FONT face=Arial size=2>int gw = 0;</FONT></DIV>
<DIV><FONT face=Arial size=2>char name[AN_ONAM_SIZ];</FONT></DIV>
<DIV><FONT face=Arial size=2>char value[AN_SVALUE_NSIZ];</FONT></DIV>
<DIV><FONT face=Arial size=2>int status;</FONT></DIV>
<DIV><FONT face=Arial size=2>int reterr;</FONT></DIV>
<DIV><FONT face=Arial size=2>int ret;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>sprintf(name, "AWNT69ST0");</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>ret = sread(&gw, name, value, &status,
&reterr);</FONT></DIV>
<DIV><FONT face=Arial size=2>---------->8----------</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>After execution ret is 0 which indicates success
according to FoxDoc but reterr is 212 and the returned value contains
junk.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I'd be extremely grateful if anyone knows the
solution.</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Best regards,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Sascha Wildner<BR>erpicon Software Development
GmbH<BR></FONT></DIV></BODY></HTML>
</x-html>