I've written a service and it can't access mapped network drives. Why?
-
I have referred to the FAQ but the answer does not solve the problem actually... Below is my code of creating srevice: -------------------------------------------------------------------------------------------------- SC_HANDLE hService = ::CreateService( handle, // handle to SCM database servicename.c_str(), // name of the service to install servicename.c_str(), // name that is displayed on SCM SERVICE_ALL_ACCESS, // can be accessed only by administrators SERVICE_WIN32_OWN_PROCESS, // service runs its own process SERVICE_AUTO_START, // started by SCM when StartService() is called SERVICE_ERROR_IGNORE, // error logged but service started ss, // pathname of the executable NULL, // service does not belong to any group NULL, // service does not use a tag NULL, // requires NtLmsSp and EventLog service to be running ".\\Administrator", // user name to log on "s" // password ); --------------------------------------------------------------------------------------------------