stat() of the file located in the shared folder in a windows service program returned error -1 and errno turned out to be 2 (ENOENT).
system where the shared folder exists and system where the service is run are in the same domain. Logged in to service using a valid username/paswd for an account in that domain.
when the same program is run as a EXE stat() returns successfully (0).
Why is the difference in behavior? How to solve this?