Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Graphics.MeasureString accuracy Pin
tasoss13-Jul-09 10:47
tasoss13-Jul-09 10:47 
GeneralRe: Graphics.MeasureString accuracy Pin
Christian Graus13-Jul-09 10:58
protectorChristian Graus13-Jul-09 10:58 
GeneralRe: Graphics.MeasureString accuracy Pin
tasoss13-Jul-09 11:58
tasoss13-Jul-09 11:58 
AnswerRe: Graphics.MeasureString accuracy Pin
Luc Pattyn13-Jul-09 10:46
sitebuilderLuc Pattyn13-Jul-09 10:46 
QuestionAccessing a mapped drive in windows service Pin
mark_me13-Jul-09 9:48
mark_me13-Jul-09 9:48 
AnswerRe: Accessing a mapped drive in windows service [modified] Pin
Paladin200013-Jul-09 10:22
Paladin200013-Jul-09 10:22 
GeneralRe: Accessing a mapped drive in windows service Pin
mark_me13-Jul-09 11:18
mark_me13-Jul-09 11:18 
GeneralRe: Accessing a mapped drive in windows service [modified] Pin
Paladin200014-Jul-09 9:10
Paladin200014-Jul-09 9:10 
Also, note that you may need to involve these namespaces:

using System.IO;
using Shell32;
using System.Runtime.InteropServices;


mpr.dll should be located in your Windows directory at the following location: C:\WINDOWS\system32. It's part of the OS. (I don't think that they changed it in Vista; I use XP.)

RESOURCETYPE_DISK is a constant hex value; you can use that line as-is.

destinationUser = "Domain\Username", e.g. @"MSHOME\Jane.Doe" or "MSHOME\\Jane.Doe"

destinationPass = The password for the user above.

destinationFolder = The path to the remote folder the user account has rights to. e.g., @"\\SERVER\ShareFolder" or "\\\\SERVER\\ShareFolder"


Note that the purpose of the code snippet given was to move a file from the local machine to a remote share. You would need to modify it slightly to open files instead. (Change the last line, right before the Catch block.) You don't need to provide a drive letter to use this code; I leave mine as string.Empty.

modified on Wednesday, July 15, 2009 12:16 PM

AnswerRe: Accessing a mapped drive in windows service Pin
darkelv13-Jul-09 19:24
darkelv13-Jul-09 19:24 
GeneralRe: Accessing a mapped drive in windows service Pin
mark_me14-Jul-09 7:21
mark_me14-Jul-09 7:21 
QuestionOpenCV Project ? Pin
Mohammad Dayyan13-Jul-09 8:42
Mohammad Dayyan13-Jul-09 8:42 
AnswerRe: OpenCV Project ? Pin
Henry Minute13-Jul-09 8:46
Henry Minute13-Jul-09 8:46 
GeneralRe: OpenCV Project ? Pin
Mohammad Dayyan13-Jul-09 8:51
Mohammad Dayyan13-Jul-09 8:51 
GeneralRe: OpenCV Project ? Pin
Henry Minute13-Jul-09 9:01
Henry Minute13-Jul-09 9:01 
GeneralRe: OpenCV Project ? Pin
0x3c013-Jul-09 9:10
0x3c013-Jul-09 9:10 
AnswerRe: OpenCV Project ? Pin
Henry Minute13-Jul-09 9:20
Henry Minute13-Jul-09 9:20 
QuestionReading pdf file as text from the URL. Pin
aakar13-Jul-09 8:08
aakar13-Jul-09 8:08 
AnswerRe: Reading pdf file as text from the URL. Pin
Christian Graus13-Jul-09 8:25
protectorChristian Graus13-Jul-09 8:25 
Questiondecimal value being truncated when exporting data to excel from asp.net c# Pin
vijju0413-Jul-09 8:04
vijju0413-Jul-09 8:04 
AnswerRe: decimal value being truncated when exporting data to excel from asp.net c# Pin
Christian Graus13-Jul-09 8:26
protectorChristian Graus13-Jul-09 8:26 
AnswerRe: decimal value being truncated when exporting data to excel from asp.net c# Pin
paas13-Jul-09 8:33
paas13-Jul-09 8:33 
GeneralRe: decimal value being truncated when exporting data to excel from asp.net c# Pin
vijju0415-Jul-09 8:28
vijju0415-Jul-09 8:28 
AnswerRe: decimal value being truncated when exporting data to excel from asp.net c# Pin
PIEBALDconsult13-Jul-09 8:41
mvePIEBALDconsult13-Jul-09 8:41 
GeneralRe: decimal value being truncated when exporting data to excel from asp.net c# Pin
vijju0415-Jul-09 8:31
vijju0415-Jul-09 8:31 
QuestionSearching in XML Pin
zeeShan anSari13-Jul-09 7:56
zeeShan anSari13-Jul-09 7:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.