Click here to Skip to main content
16,010,553 members
Home / Discussions / C#
   

C#

 
GeneralRe: Infinite Recursion and other odd errors with Network API wrapper Pin
Heath Stewart7-Dec-03 4:24
protectorHeath Stewart7-Dec-03 4:24 
GeneralRe: Infinite Recursion and other odd errors with Network API wrapper Pin
bri189a7-Dec-03 10:33
bri189a7-Dec-03 10:33 
GeneralRe: Infinite Recursion and other odd errors with Network API wrapper Pin
Heath Stewart7-Dec-03 10:41
protectorHeath Stewart7-Dec-03 10:41 
GeneralRe: Infinite Recursion and other odd errors with Network API wrapper Pin
bri189a7-Dec-03 11:08
bri189a7-Dec-03 11:08 
GeneralRe: Infinite Recursion and other odd errors with Network API wrapper Pin
Heath Stewart7-Dec-03 11:12
protectorHeath Stewart7-Dec-03 11:12 
GeneralRe: Infinite Recursion and other odd errors with Network API wrapper Pin
bri189a7-Dec-03 11:46
bri189a7-Dec-03 11:46 
GeneralRe: Infinite Recursion and other odd errors with Network API wrapper Pin
bri189a7-Dec-03 13:10
bri189a7-Dec-03 13:10 
GeneralRe: Infinite Recursion and other odd errors with Network API wrapper Pin
bri189a7-Dec-03 18:30
bri189a7-Dec-03 18:30 
Heath -

So I took out all of the additions we made and put it back to square one and at the bottom of the function I added GC.Collect():

<br />
                        string domain="Domain1";<br />
			this.lstViewNetwork.Items.Clear();<br />
			Server [] myServers;<br />
			myServers = Network.GetServers(domain);<br />
			this.lstViewNetwork.BeginUpdate();<br />
			if(myServers!=null)<br />
			{<br />
				foreach(Server s in myServers)<br />
				{<br />
					if(s.Name!=null)<br />
					{<br />
						this.lstViewNetwork.Items.Add(s.Name, 0);<br />
					}<br />
				}<br />
			}<br />
			count++;<br />
			this.lstViewNetwork.EndUpdate();<br />
			this.lblRefresh.Text = count.ToString();<br />
			GC.Collect();<br />
		}<br />


Now I know longer get errors, and everything is working perfectly (... some weird things still happen, when the screen saver started the form became the screen saver... weird... and once I got an error on closing the form, but after several attempts to get it to happen I haven't been able to, and something similiar when losing and regain focus to the form, it can now go throughs several thousand iterations before either of these errors happen whereas before we couldn't go more than 150. I'm not sure why GC.Collect() has made the error go away, but I know a 'fix to the problem' and 'fixing the problem' are two seperate worlds, and I was hoping maybe with this information and the other information I've given since your last reply will set some bells off in your head... any ideas?

Thanks again for all your help with this.
Brian

If you ever meet somebody who says they know it all, they are obviously ignorant and probably write terrible code.
GeneralRe: Infinite Recursion and other odd errors with Network API wrapper Pin
Heath Stewart8-Dec-03 2:13
protectorHeath Stewart8-Dec-03 2:13 
GeneralRe: Infinite Recursion and other odd errors with Network API wrapper Pin
bri189a8-Dec-03 10:58
bri189a8-Dec-03 10:58 
GeneralDeployment problem with the MS Web Browser Control Pin
Furty6-Dec-03 14:42
Furty6-Dec-03 14:42 
GeneralRe: Deployment problem with the MS Web Browser Control Pin
Heath Stewart7-Dec-03 4:18
protectorHeath Stewart7-Dec-03 4:18 
GeneralRe: Deployment problem with the MS Web Browser Control Pin
Furty8-Dec-03 19:49
Furty8-Dec-03 19:49 
GeneralRe: Deployment problem with the MS Web Browser Control Pin
Heath Stewart9-Dec-03 2:37
protectorHeath Stewart9-Dec-03 2:37 
GeneralRe: Deployment problem with the MS Web Browser Control Pin
Furty9-Dec-03 11:43
Furty9-Dec-03 11:43 
GeneralException in File explore Pin
naxos6-Dec-03 13:24
naxos6-Dec-03 13:24 
GeneralRe: Exception in File explore Pin
leppie6-Dec-03 22:15
leppie6-Dec-03 22:15 
GeneralApplication in Batch Mode with user interface Pin
Patrick Luijpers6-Dec-03 12:26
Patrick Luijpers6-Dec-03 12:26 
GeneralRe: Application in Batch Mode with user interface Pin
leppie6-Dec-03 22:16
leppie6-Dec-03 22:16 
GeneralRe: Application in Batch Mode with user interface Pin
Patrick Luijpers7-Dec-03 5:17
Patrick Luijpers7-Dec-03 5:17 
GeneralRe: Application in Batch Mode with user interface Pin
leppie7-Dec-03 5:25
leppie7-Dec-03 5:25 
QuestionSome nodes in TreeView with checkboxes and some others without. Is it possible? Pin
TomaHawKPT6-Dec-03 12:18
TomaHawKPT6-Dec-03 12:18 
AnswerRe: Some nodes in TreeView with checkboxes and some others without. Is it possible? Pin
Heath Stewart7-Dec-03 4:13
protectorHeath Stewart7-Dec-03 4:13 
QuestionWhat causes the close button to stop working? Pin
vektuz5-Dec-03 23:04
vektuz5-Dec-03 23:04 
AnswerRe: What causes the close button to stop working? Pin
vektuz5-Dec-03 23:25
vektuz5-Dec-03 23:25 

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.