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

C#

 
AnswerRe: ComboBox.Items.Clear() not working -- Totally Revised Question Pin
Xpnctoc20-Jan-10 4:20
Xpnctoc20-Jan-10 4:20 
AnswerRe: ComboBox.Items.Clear() not working -- Totally Revised Question Pin
Dan Mos20-Jan-10 4:53
Dan Mos20-Jan-10 4:53 
AnswerRe: ComboBox.Items.Clear() not working -- Totally Revised Question Pin
Covean20-Jan-10 5:02
Covean20-Jan-10 5:02 
GeneralRe: ComboBox.Items.Clear() not working -- Totally Revised Question Pin
Xpnctoc20-Jan-10 5:19
Xpnctoc20-Jan-10 5:19 
GeneralRe: ComboBox.Items.Clear() not working -- Totally Revised Question Pin
Covean20-Jan-10 5:27
Covean20-Jan-10 5:27 
GeneralRe: ComboBox.Items.Clear() not working -- Totally Revised Question Pin
DaveyM6920-Jan-10 7:55
professionalDaveyM6920-Jan-10 7:55 
GeneralRe: ComboBox.Items.Clear() not working -- Totally Revised Question Pin
Covean20-Jan-10 21:56
Covean20-Jan-10 21:56 
Questionhow to import a video in C # .net? and what is its api?? Pin
rabia javeed20-Jan-10 3:07
rabia javeed20-Jan-10 3:07 
AnswerRe: how to import a video in C # .net? and what is its api?? Pin
Pete O'Hanlon20-Jan-10 3:25
mvePete O'Hanlon20-Jan-10 3:25 
GeneralRe: how to import a video in C # .net? and what is its api?? Pin
rabia javeed23-Jan-10 7:06
rabia javeed23-Jan-10 7:06 
Questionprevent form resizing Pin
Jassim Rahma20-Jan-10 2:51
Jassim Rahma20-Jan-10 2:51 
AnswerRe: prevent form resizing Pin
Keith Barrow20-Jan-10 2:57
professionalKeith Barrow20-Jan-10 2:57 
GeneralRe: prevent form resizing Pin
Jassim Rahma20-Jan-10 3:00
Jassim Rahma20-Jan-10 3:00 
AnswerRe: prevent form resizing Pin
PIEBALDconsult20-Jan-10 3:19
mvePIEBALDconsult20-Jan-10 3:19 
AnswerRe: prevent form resizing Pin
Nuri Ismail20-Jan-10 3:24
Nuri Ismail20-Jan-10 3:24 
AnswerRe: prevent form resizing Pin
Rob Philpott20-Jan-10 5:12
Rob Philpott20-Jan-10 5:12 
Questiontwo titles on title bar Pin
Jassim Rahma20-Jan-10 2:46
Jassim Rahma20-Jan-10 2:46 
AnswerRe: two titles on title bar Pin
Harvey Saayman20-Jan-10 19:45
Harvey Saayman20-Jan-10 19:45 
GeneralRe: two titles on title bar Pin
Jassim Rahma21-Jan-10 12:10
Jassim Rahma21-Jan-10 12:10 
QuestionConvert string to nullable int Pin
John_1020-Jan-10 2:35
John_1020-Jan-10 2:35 
AnswerRe: Convert string to nullable int Pin
EliottA20-Jan-10 2:43
EliottA20-Jan-10 2:43 
AnswerRe: Convert string to nullable int [modified] Pin
Keith Barrow20-Jan-10 2:51
professionalKeith Barrow20-Jan-10 2:51 
AnswerRe: Convert string to nullable int PinPopular
Nuri Ismail20-Jan-10 2:52
Nuri Ismail20-Jan-10 2:52 
QuestionWeb service to receive a pdf file as MIME attachment Pin
Gktony20-Jan-10 2:12
Gktony20-Jan-10 2:12 
QuestionConnections options in C# Pin
vinothkumar_Dhakshinamoorthy20-Jan-10 2:04
vinothkumar_Dhakshinamoorthy20-Jan-10 2:04 
Hi,
In my program i'm trying to access a server drives details from my machine with different username and password, for this i'm using the connections options class in C#,
here is the code i'm using

try
{
ConnectionOptions opt = new ConnectionOptions("MS_409", "USERNAME", "PASSWORD", "ntdlmdomain:DOMAIN", ImpersonationLevel.Impersonate, AuthenticationLevel.Default,false, null, TimeSpan.MaxValue);
ObjectQuery query = new ObjectQuery("SELECT FreeSpace, Name FROM Win32_LogicalDisk WHERE DriveType = 3");
ManagementScope scope = new ManagementScope("\\\\" + "16.106.64.108" + "\\root\\cimv2", opt);
ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);
ManagementObjectCollection coll = searcher.Get();

foreach (ManagementObject ms in coll)
{
Console.WriteLine(ms["Name"]);
Console.WriteLine(Convert.ToDecimal(ms["FreeSpace"]) / 1024 / 1024 / 1024);
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}

whenever i reach line "ManagementObjectCollection coll = searcher.Get();" i'm getting the "Invalid Parameter" error, i could not find a slution for this, please help.

Thanks,
D.Vinoth Frown | :(

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.