CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2002
    Location
    TamilNadu, India
    Posts
    158

    Network drive mapping

    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?
    Muthu

  2. #2
    Andy Tacker is offline More than "Just Another Member"
    Join Date
    Jun 2001
    Location
    55°50' N 37°39' E
    Posts
    1,503
    look at this article for remote hanling of services...
    http://www.codeguru.com/system/Simpl...e_Example.html

    you can map drive by calling createfile function of Winapi...
    If you think you CAN, you can, If you think you CAN'T, you are probably right.

    Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.

  3. #3
    Join Date
    Jan 2002
    Location
    TamilNadu, India
    Posts
    158
    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)
    Muthu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured