Click here to Skip to main content
15,922,427 members
Home / Discussions / C#
   

C#

 
GeneralRe: IAsynResult problem - hit a brick wall Pin
pbraun14-Aug-07 19:36
pbraun14-Aug-07 19:36 
GeneralRe: IAsynResult problem - hit a brick wall Pin
Glen Harvy14-Aug-07 23:20
Glen Harvy14-Aug-07 23:20 
GeneralRe: IAsynResult problem - hit a brick wall Pin
pbraun15-Aug-07 5:09
pbraun15-Aug-07 5:09 
GeneralRe: IAsynResult problem - hit a brick wall Pin
Glen Harvy15-Aug-07 10:50
Glen Harvy15-Aug-07 10:50 
GeneralRe: IAsynResult problem - hit a brick wall Pin
pbraun15-Aug-07 11:43
pbraun15-Aug-07 11:43 
GeneralRe: IAsynResult problem - hit a brick wall [modified] Pin
Glen Harvy14-Aug-07 23:09
Glen Harvy14-Aug-07 23:09 
GeneralRe: IAsynResult problem - hit a brick wall Pin
Leslie Sanford15-Aug-07 5:15
Leslie Sanford15-Aug-07 5:15 
GeneralRe: IAsynResult problem - hit a brick wall Pin
Glen Harvy15-Aug-07 11:00
Glen Harvy15-Aug-07 11:00 
Thanks for your input - it has helped me glean a lot from using the async features.

I decided to go with using the following as it suits my purposes well (I think):

IAsyncResult[] results = new IAsyncResult[hostList.Count];
 if (results.Length > 19)
 {
   // need to limit the following to blocks of 20....
 }

 for (int x = 0; x < hostList.Count; x++)
 {
   results[x] = getIP.BeginInvoke(hostList[x], null, null);
 }

 for (int i = 0; i < results.Length; i++)
 {
   // wait 20 seconds for each lookup to complete - otherwise it closes it due to a timeout
   if (results[i].AsyncWaitHandle.WaitOne(20000, true))
   {
     string r = getIP.EndInvoke(results[i]).ToString();
     string[] n = r.Split(new char[1] { '|' });
     DataRow nr = this.myWebLoggerDataSet.Tables["dnscache"].NewRow();
     nr["IP"] = n[1].ToString();
     nr["Name"] = n[0].ToString();
     nr["Date"] = DateTime.Now;
     this.myWebLoggerDataSet.Tables["dnscache"].Rows.Add(nr);
   }
 }
 this.dnscacheTableAdapter.Update(this.myWebLoggerDataSet.dnscache);
 myWebLoggerDataSet.AcceptChanges();



I think I'll be OK now Smile | :) but of course any comments will most definitely be appreciated.



Glen Harvy

QuestionHow to comunicate with CD printer Pin
Richard Blythe14-Aug-07 16:03
Richard Blythe14-Aug-07 16:03 
AnswerRe: How to comunicate with CD printer Pin
Christian Graus14-Aug-07 17:03
protectorChristian Graus14-Aug-07 17:03 
QuestionSourcegrid Installation Pin
Papi83dm14-Aug-07 12:57
Papi83dm14-Aug-07 12:57 
AnswerRe: Sourcegrid Installation Pin
Ed.Poore14-Aug-07 15:09
Ed.Poore14-Aug-07 15:09 
AnswerRe: Sourcegrid Installation Pin
Christian Graus14-Aug-07 17:03
protectorChristian Graus14-Aug-07 17:03 
AnswerRe: Sourcegrid Installation Pin
Papi83dm15-Aug-07 2:52
Papi83dm15-Aug-07 2:52 
QuestionReplace umlauts Pin
SilverV14-Aug-07 12:32
SilverV14-Aug-07 12:32 
AnswerRe: Replace umlauts Pin
bit_cmdr14-Aug-07 12:57
bit_cmdr14-Aug-07 12:57 
GeneralRe: Replace umlauts Pin
SilverV14-Aug-07 13:25
SilverV14-Aug-07 13:25 
GeneralRe: Replace umlauts Pin
Luc Pattyn14-Aug-07 13:47
sitebuilderLuc Pattyn14-Aug-07 13:47 
QuestionDVD menu navigation Pin
deede14-Aug-07 11:51
deede14-Aug-07 11:51 
QuestionHow to get an a class without it's base class Pin
eggie514-Aug-07 11:50
eggie514-Aug-07 11:50 
AnswerRe: How to get an a class without it's base class Pin
pmarfleet14-Aug-07 11:59
pmarfleet14-Aug-07 11:59 
AnswerRe: How to get an a class without it's base class Pin
Christian Graus14-Aug-07 12:05
protectorChristian Graus14-Aug-07 12:05 
GeneralRe: How to get an a class without it's base class [modified] Pin
eggie514-Aug-07 12:19
eggie514-Aug-07 12:19 
GeneralRe: How to get an a class without it's base class Pin
Luc Pattyn14-Aug-07 13:57
sitebuilderLuc Pattyn14-Aug-07 13:57 
QuestionCaret and scroll positioning Pin
artem_coder14-Aug-07 11:37
artem_coder14-Aug-07 11:37 

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.