Click to See Complete Forum and Search --> : Network drive mapping


muthuis
April 14th, 2003, 12:44 AM
I want to know the ways to achieve the following objectives:
1. map a network drive using c#.
2. Open a remote service handle to start/stop/restart

Can any one help?

Andy Tacker
April 17th, 2003, 03:38 AM
look at this article for remote hanling of services...
http://www.codeguru.com/system/Simple_Service_Example.html

you can map drive by calling createfile function of Winapi...

muthuis
April 17th, 2003, 03:53 AM
I need the code in c#. I was trying to use LogonUser API with DLLImport in c#. But that is also giving some error.

For OpenService in a remote machine, you need to have admin privilege in that machine. That is why I was trying to call LogonUser API (The otherway was to map a drive)