Click here to Skip to main content
15,902,492 members
Home / Discussions / C#
   

C#

 
GeneralRe: Countries and towns database Pin
Colin Angus Mackay10-Jul-04 16:20
Colin Angus Mackay10-Jul-04 16:20 
GeneralWindows Services Pin
RFickling10-Jul-04 7:07
RFickling10-Jul-04 7:07 
GeneralRe: Windows Services Pin
Mike Dimmick10-Jul-04 8:35
Mike Dimmick10-Jul-04 8:35 
GeneralProblems converting my C++ code to C# Pin
DieFuSiON10-Jul-04 6:39
DieFuSiON10-Jul-04 6:39 
GeneralRe: Problems converting my C++ code to C# Pin
DieFuSiON10-Jul-04 6:40
DieFuSiON10-Jul-04 6:40 
GeneralRe: Problems converting my C++ code to C# Pin
Werdna10-Jul-04 11:12
Werdna10-Jul-04 11:12 
GeneralRe: Problems converting my C++ code to C# Pin
Nick Parker10-Jul-04 18:40
protectorNick Parker10-Jul-04 18:40 
GeneralRe: Problems converting my C++ code to C# Pin
DieFuSiON11-Jul-04 0:46
DieFuSiON11-Jul-04 0:46 
GeneralSerial Communication Problems... Pin
Randy2410-Jul-04 5:17
Randy2410-Jul-04 5:17 
GeneralRe: Serial Communication Problems... Pin
Mike Dimmick10-Jul-04 8:39
Mike Dimmick10-Jul-04 8:39 
GeneralRe: Serial Communication Problems... Pin
Randy2412-Jul-04 7:53
Randy2412-Jul-04 7:53 
Generalpinvoke and winmm.dll Pin
Oldmate10-Jul-04 4:35
Oldmate10-Jul-04 4:35 
Generallogin code Pin
Member 12278839-Jul-04 23:57
Member 12278839-Jul-04 23:57 
GeneralRe: login code Pin
Michael P Butler10-Jul-04 0:24
Michael P Butler10-Jul-04 0:24 
GeneralRe: login code Pin
Member 122788310-Jul-04 0:26
Member 122788310-Jul-04 0:26 
GeneralRe: login code Pin
Michael P Butler10-Jul-04 0:33
Michael P Butler10-Jul-04 0:33 
GeneralWMI Access - Help Pin
wakkerjack9-Jul-04 23:28
wakkerjack9-Jul-04 23:28 
Ive been battling with this prob for a LONG time now..
Using Threads and remote retrieval: i get a rpc error or COm exception sometimes? Like it's retrieving the values, and then it says rpc server unavailable and then if u carry on it will retrieve the next value.. happens with different values..

maybe deadlock occurs?

Basically- i use: private ManagementObjectSearcher m_MOSearcher;
private ManagementScope m_ManScope;
private ConnectionOptions m_ConnectOptions;

m_ConnectOptions = new ConnectionOptions ();
m_ConnectOptions.Username = "user";
m_ConnectOptions.Password = "pass";
m_ConnectOptions.Authentication = AuthenticationLevel.Call;
m_ConnectOptions.Impersonation = ImpersonationLevel.Impersonate;
m_ConnectOptions.EnablePrivileges = true;
m_ConnectOptions.Locale = "MS_409";
m_ConnectOptions.Timeout = new TimeSpan (0,0,0,0,5);

string strConnection = "\\\\"+ "192.168.0.88" + "\\root\\cimv2";

m_ManScope = new ManagementScope(strConnection, m_ConnectOptions);


ObjectQuery Temp = new ObjectQuery("SELECT " + "Size" + " FROM Win32_" + "DiskDrive");
m_MOSearcher = new ManagementObjectSearcher (m_ManScope, Temp);

foreach(ManagementObject mo in m_MOSearcher.Get())
{
Console.WriteLine("Size: " +mo["Size"].ToString ());
}

Temp = new ObjectQuery("SELECT " + "Model" + " FROM Win32_" + "DiskDrive");
m_MOSearcher = new ManagementObjectSearcher (m_ManScope, Temp);

foreach(ManagementObject mo in m_MOSearcher.Get())
{
Console.WriteLine("Model: " +mo["Model"].ToString ());
}


And thread it with:
for (int i=0; i< 250; i++)
{
Thread a = new Thread(new ThreadStart(Function));
a.Start();
}
QuestionIn StringBuilder copied from richTextBox fast way to findout end of line ? Pin
evdoxos9-Jul-04 23:23
evdoxos9-Jul-04 23:23 
AnswerRe: In StringBuilder copied from richTextBox fast way to findout end of line ? Pin
mav.northwind9-Jul-04 23:42
mav.northwind9-Jul-04 23:42 
GeneralRe: In StringBuilder copied from richTextBox fast way to findout end of line ? Pin
evdoxos10-Jul-04 0:34
evdoxos10-Jul-04 0:34 
GeneralRe: In StringBuilder copied from richTextBox fast way to findout end of line ? Pin
mav.northwind10-Jul-04 5:22
mav.northwind10-Jul-04 5:22 
AnswerRe: In StringBuilder copied from richTextBox fast way to findout end of line ? Pin
leppie10-Jul-04 1:05
leppie10-Jul-04 1:05 
AnswerRe: In StringBuilder copied from richTextBox fast way to findout end of line ? Pin
partyganger10-Jul-04 4:09
partyganger10-Jul-04 4:09 
GeneralRe: In StringBuilder copied from richTextBox fast way to findout end of line ? Pin
evdoxos10-Jul-04 7:23
evdoxos10-Jul-04 7:23 
Questionhow to make Date function Pin
Anonymous9-Jul-04 20:26
Anonymous9-Jul-04 20:26 

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.