<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>Ted and Alex,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>thank you so much for your answers. I
removed the system line from an_init.tcp and made my service log in as fox and
it worked. Thanks to the time difference between US and Germany I am now
able to finish my program in time (this week). This mailing list is great
stuff, folks.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>All the best,</FONT></DIV>
<DIV><FONT face=Arial size=2>Sascha</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px;
PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A href="mailto:[EMAIL PROTECTED]" [EMAIL PROTECTED]>Ted
Jirik</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
href="mailto:[EMAIL PROTECTED]"
[EMAIL PROTECTED]>Foxboro DCS Mail List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, October 12, 2000 11:49
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: FoxAPI access on AW70 from a
Windows NT Service?</DIV>
<DIV><BR></DIV><FONT face=arial size=2>Sascha</FONT><FONT face=arial
size=3>,<BR><BR></FONT>An application using the system account logs in with
NULL credentials and <BR>does not allow network resource access by default.
<BR><BR>See Microsoft Knowledge Base articles Q124184 and Q132679 for more
details.<BR><BR>This might be causing your problem.<BR><BR>Ted Jirik<BR><BR>At
05:49 PM 10/12/00 +0200, you wrote:<BR>
<BLOCKQUOTE class=cite cite type="cite"><FONT face=arial size=2>Dear
Folks,</FONT><FONT size=3><BR> <BR></FONT><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><FONT size=3><BR> <BR></FONT><FONT face=arial
size=2>System="System | Open Sets | W Files | W Objects | Read Only
|</FONT><FONT size=3><BR> <BR></FONT><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><FONT size=3><BR> <BR></FONT><FONT
face=arial size=2>----------8<----------</FONT><FONT
size=3><BR></FONT><FONT face=arial size=2>int gw = 0;</FONT><FONT
size=3><BR></FONT><FONT face=arial size=2>char
name[AN_ONAM_SIZ];</FONT><FONT size=3><BR></FONT><FONT face=arial
size=2>char value[AN_SVALUE_NSIZ];</FONT><FONT size=3><BR></FONT><FONT
face=arial size=2>int status;</FONT><FONT size=3><BR></FONT><FONT face=arial
size=2>int reterr;</FONT><FONT size=3><BR></FONT><FONT face=arial size=2>int
ret;</FONT><FONT size=3><BR> <BR></FONT><FONT face=arial
size=2>sprintf(name, "AWNT69ST0");</FONT><FONT
size=3><BR> <BR></FONT><FONT face=arial size=2>ret = sread(&gw,
name, value, &status, &reterr);</FONT><FONT size=3><BR></FONT><FONT
face=arial size=2>---------->8----------</FONT><FONT
size=3><BR> <BR></FONT><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><FONT size=3><BR> <BR></FONT><FONT
face=arial size=2>I'd be extremely grateful if anyone knows the
solution.</FONT><FONT size=3><BR> <BR> <BR></FONT><FONT face=arial
size=2>Best regards,</FONT><FONT size=3><BR> <BR></FONT><FONT
face=arial size=2>Sascha Wildner<BR>erpicon Software Development
GmbH</FONT></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
</x-html>