Re: [ADVANCED-DOTNET] Discover when a socket is closed by the remote host

2005-08-03 Thread Peter Ritchie
Socket.EndRead() is documented as throwing a IOException should the underlying socket be closed when/during EndRead() is called. If the NetworkStream object is closed, an ObjectDisposedExceptin will be thrown. You could test the socket's Connected property to validate whether the remote host is s

Re: [ADVANCED-DOTNET] windows services in .net 2.0

2005-08-03 Thread Francesco Sanfilippo
Yep, it did clue me in. However I am new to the product and asked because maybe there was something I had missed or another way to do it. Thanks though. Francesco On 8/3/05, Adam Sills <[EMAIL PROTECTED]> wrote: > Got me. I would just think that "Visual Web Developer" would have clued you > i

Re: [ADVANCED-DOTNET] windows services in .net 2.0

2005-08-03 Thread Adam Sills
Got me. I would just think that "Visual Web Developer" would have clued you into the fact that it's made for web development. I bet if you want to do it all, you have to get the full tool. Adam.. > -Original Message- > From: Unmoderated discussion of advanced .NET topics. > [mailto:[EMAIL

Re: [ADVANCED-DOTNET] windows services in .net 2.0

2005-08-03 Thread Francesco Sanfilippo
Does C# Express for 2.0 do webforms and windowsforms? On 8/3/05, Adam Sills <[EMAIL PROTECTED]> wrote: > You use something that's not only created for web development. Try C# > express or VS.NET. > > Adam.. === This list is hosted by DevelopMentorĀ® http://www.de

Re: [ADVANCED-DOTNET] windows services in .net 2.0

2005-08-03 Thread Adam Sills
You use something that's not only created for web development. Try C# express or VS.NET. Adam.. > -Original Message- > From: Unmoderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of > Francesco Sanfilippo > Sent: Wednesday, August 03, 2005 4:03 PM > To: ADV

[ADVANCED-DOTNET] windows services in .net 2.0

2005-08-03 Thread Francesco Sanfilippo
I can't see how to create a non-web site project in Visual Web Developer 2005? I am trying to write a Windows Service in .NET 2.0. How do I do this? Francesco === This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscrip

Re: [ADVANCED-DOTNET] Interop & binary compatibility

2005-08-03 Thread Turner, Jeff
I found a blog entry* that describes the problem pretty well and gives a few ideas about how to fix it. I could create the entire interface in C# but the many of the method signatures contain optional parameters with default values and I couldn't find a way to specify those default values. I guess

Re: [ADVANCED-DOTNET] CodeDOM and OpCodes in Implementing Dynamic Code

2005-08-03 Thread Curt Hagenlocher
From: "Jonathan Ross" <[EMAIL PROTECTED]> Or, this being JIT and all, maybe method A was never compiled until I called method B, but I have no idea how any direct calls could be made if you had to check all the .net code to see if it was compiled yet before calling it. Yes. Any function refer

Re: [ADVANCED-DOTNET] CodeDOM and OpCodes in Implementing Dynamic Code

2005-08-03 Thread Jonathan Ross
Correction, that should read "I can afterwards insert the IL code for A, and then call *B*, which calls *A*." - Original Message - From: "Jonathan Ross" <[EMAIL PROTECTED]> To: Sent: Wednesday, August 03, 2005 12:31 PM Subject: Re: [ADVANCED-DOTNET] CodeDOM and OpCodes in Implementing Dy

Re: [ADVANCED-DOTNET] CodeDOM and OpCodes in Implementing Dynamic Code

2005-08-03 Thread Jonathan Ross
The thing with it's being a direct call, if I define DynamicMethod A, and then I go ahead and define and insert the IL code for B, I can afterwards insert the IL code for A, and then call A, which calls B. IOW, if it's a direct call, how does it know where A is, when A hasn't even been created yet

Re: [ADVANCED-DOTNET] CodeDOM and OpCodes in Implementing Dynamic Code

2005-08-03 Thread Curt Hagenlocher
From: "Jonathan Ross" <[EMAIL PROTECTED]> By any chance, do you know for sure if the call I'm making from Method B to Method A is a direct call instruction or if it's a dynamic method delegate? I'm betting it's a straight up instruction call, which has me frothing with anticipation. Well, you'

Re: [ADVANCED-DOTNET] CodeDOM and OpCodes in Implementing Dynamic Code

2005-08-03 Thread Jonathan Ross
*smacks forehead firmly against wall* Thanks. I forgot that Method A returned a value. By any chance, do you know for sure if the call I'm making from Method B to Method A is a direct call instruction or if it's a dynamic method delegate? I'm betting it's a straight up instruction call, which has

Re: [ADVANCED-DOTNET] CodeDOM and OpCodes in Implementing Dynamic Code

2005-08-03 Thread Curt Hagenlocher
From: "Jonathan Ross" <[EMAIL PROTECTED]> Okay, for the last 4 hours I've been stuck on calling a dynamic method from another dynamic method. Following is my code, which errors out for some reason unknown to me. The error message "Common Language Runtime detected an invalid program." almost ce

Re: [ADVANCED-DOTNET] Sorting an XmlNodeList

2005-08-03 Thread Eduard Lascu
Great stuff!!! Thanks, William. -Original Message- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] Behalf Of William Bartholomew Sent: Tuesday, August 02, 2005 6:27 PM To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: Re: [ADVANCED-DOTNET] Sorting an XmlNode

[ADVANCED-DOTNET] Discover when a socket is closed by the remote host

2005-08-03 Thread Ragnvald Barth
I have two applications communicating through a socket. In the receiving application I use the NetworkStream class to read data from the socket. I call myNetworkStream.BeginRead(buffer, 0, size, new AsyncCallback (MyCallbackMethod), state); MyCallbackMethod is then called when data is coming in, or