Solved

map network drive via dll

Posted on 2006-10-19
1
324 Views
Last Modified: 2008-02-01
Hi all,

I'm working on a dll and I need to map a network drive.
The problem is that the dll runs under an accout that seems not to have the permissions to map a network disk.

How can I change the dll credentials?
Help pls.
0
Comment
Question by:system_down
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
whatsit2002 earned 500 total points
ID: 17768592
Perhaps this article will help:
http://www.codeproject.com/useritems/User_Impersonation_in_Ne.asp

You need to impersonate another user to create the map. So, if you use his class to do the impersonation, you would do something like:

ImpersonateUser.Impersonate(..);
...
Do the mapping here
...
ImpersonateUser.Undo()

Thanks.

Jason
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question