Click here to Skip to main content
15,909,822 members
Home / Discussions / C#
   

C#

 
AnswerRe: VS2013 ASP.NET MVC, context menu for Model defaults to Add Controller? Pin
Afzaal Ahmad Zeeshan13-Jan-15 10:15
professionalAfzaal Ahmad Zeeshan13-Jan-15 10:15 
GeneralRe: VS2013 ASP.NET MVC, context menu for Model defaults to Add Controller? Pin
Agent__00713-Jan-15 17:36
professionalAgent__00713-Jan-15 17:36 
GeneralRe: VS2013 ASP.NET MVC, context menu for Model defaults to Add Controller? Pin
Member 1131412813-Jan-15 20:29
Member 1131412813-Jan-15 20:29 
GeneralRe: VS2013 ASP.NET MVC, context menu for Model defaults to Add Controller? Pin
Member 1131412813-Jan-15 20:30
Member 1131412813-Jan-15 20:30 
QuestionGetting audio waveform out of video Pin
mtst9913-Jan-15 7:56
mtst9913-Jan-15 7:56 
Answerhow to retrive a data from database sql to c#....using search button Pin
Member 1137235413-Jan-15 4:51
Member 1137235413-Jan-15 4:51 
GeneralRe: how to retrive a data from database sql to c#....using search button Pin
OriginalGriff13-Jan-15 5:05
mveOriginalGriff13-Jan-15 5:05 
QuestionConvert VB.Net Project to C# Pin
WrightSfiso13-Jan-15 1:41
WrightSfiso13-Jan-15 1:41 
AnswerRe: Convert VB.Net Project to C# Pin
OriginalGriff13-Jan-15 1:49
mveOriginalGriff13-Jan-15 1:49 
GeneralRe: Convert VB.Net Project to C# Pin
WrightSfiso13-Jan-15 2:41
WrightSfiso13-Jan-15 2:41 
GeneralRe: Convert VB.Net Project to C# Pin
OriginalGriff13-Jan-15 2:48
mveOriginalGriff13-Jan-15 2:48 
GeneralRe: Convert VB.Net Project to C# Pin
WrightSfiso13-Jan-15 3:17
WrightSfiso13-Jan-15 3:17 
AnswerRe: Convert VB.Net Project to C# Pin
DamithSL13-Jan-15 1:58
professionalDamithSL13-Jan-15 1:58 
GeneralRe: Convert VB.Net Project to C# Pin
WrightSfiso13-Jan-15 2:43
WrightSfiso13-Jan-15 2:43 
GeneralRe: Convert VB.Net Project to C# Pin
Dave Kreskowiak13-Jan-15 3:22
mveDave Kreskowiak13-Jan-15 3:22 
QuestionHow to get Time Tracking Application in c#.net? Pin
2498313-Jan-15 0:33
2498313-Jan-15 0:33 
AnswerRe: How to get Time Tracking Application in c#.net? Pin
OriginalGriff13-Jan-15 0:53
mveOriginalGriff13-Jan-15 0:53 
AnswerRe: How to get Time Tracking Application in c#.net? Pin
CHill6013-Jan-15 2:24
mveCHill6013-Jan-15 2:24 
QuestionNeed Some suggection on E-Mail Marketing Software Pin
Er. Pradeep Kumar Rai12-Jan-15 22:36
Er. Pradeep Kumar Rai12-Jan-15 22:36 
AnswerRe: Need Some suggection on E-Mail Marketing Software Pin
OriginalGriff12-Jan-15 23:38
mveOriginalGriff12-Jan-15 23:38 
GeneralRe: Need Some suggection on E-Mail Marketing Software Pin
Er. Pradeep Kumar Rai13-Jan-15 1:34
Er. Pradeep Kumar Rai13-Jan-15 1:34 
GeneralRe: Need Some suggection on E-Mail Marketing Software Pin
OriginalGriff13-Jan-15 1:42
mveOriginalGriff13-Jan-15 1:42 
AnswerRe: Need Some suggection on E-Mail Marketing Software Pin
Chris Quinn13-Jan-15 2:30
Chris Quinn13-Jan-15 2:30 
QuestionPassing Array of custom objects as an attribute to a custom object in ODP.Net Pin
Member 960130912-Jan-15 19:55
Member 960130912-Jan-15 19:55 
QuestionHow to get a list of all drive letters including mapped network drives Pin
robwm112-Jan-15 9:28
robwm112-Jan-15 9:28 
Hi,

I have been searching for several hours about how to get a list of all drive letters in use. All of the code examples I have tried were able to list all drive letters in use but did not include mapped network drives.

I have tried DriveInfo, Directory.GetLogicalDrives and attempted to use WMI through the ManagementObjectSearcher. Win32_DiskDrive and Win32_LogicalDisk lists all drives except mapped network drives. If I use Win32_NetworkConnection or Win32_MappedLogicalDrive using Scriptomatic, only the network drive is listed but when those WMI classes are in my C# code, nothing seems to happen with my application. No output is ever produced.

There is some conversation around the Win32 API but 100+ lines of code seems a bit overkill to map a single drive unless that is the only way it can be done.

A few others mentioned not to use 'NET USE' so I have avoided that in favor of using a native C# code. I want to follow C# best practices as closely as possible.

Ultimately I would like to use the next available drive letter to map to a network share but I need some way to be certain that the next available drive letter is not in use by a network share that the methods I have been using cannot see. I haven't found any complete code in one place (or even across many places) that can accomplish this.

Thanks,
Rob

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.