Solved

map network drive via dll

Posted on 2006-10-19
1
285 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
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Pass through dll 2 38
Data Saving 5 40
Check my code out(2) 1 35
IO.FileSystemWatcher dies when used in Powershell 1 28
Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now