>I have a VFP app running as a service on a NT machine. The problem I have is that the app needs to have a drive mapped to a different computer to run. Can I use the "WNetAddConnection" API to map a drive when no one is logged into the machine so the app will run right?
No, but WNetAddConnection2() or WNetAddConnection3() will work, as long as a valid userid and password are specified in the optional members of the structure. You might want to look at my NETRESOURCE class (downloadable from here on UT; you'll also need CLSHEAP from here to make it work) which includes a working implementation of WNetAddConnection3() in the sample code.
I'd recommend using UNC referencing rather than drive letter mapping IAC running as a service. WNetAddConnection3() is capable of making a null connection to a UNC.