Solved

map network drive via dll

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 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