Re: [ADVANCED-DOTNET] Thread with message pump (UI thread)

2004-03-02 Thread J. Merrill
It's often important -- using SendMessage (which directly calls the target's window procedure, and blocks until it returns) would make Invoke calls be processed ahead of other calls made by BeginInvoke, and potentially run _during_ other UI-code event handlers that happened to call DoEvents().

Re: [ADVANCED-DOTNET] Communication with Windows Service

2004-03-02 Thread james
Ali, I would use WMI to interface the Windows Service, and Web Services to extend a Service Interface for your WMI Windows Service Controller. This allows you to use some existing API's on the server and client and perhaps even reduce the number of threads in use. [EMAIL PROTECTED] -Origina

[ADVANCED-DOTNET] Creating a delegate from reflection information

2004-03-02 Thread Ryan Parlee
I am wanting to create a delegate at runtime using reflection but am unable to get this working. Specifically, I would like to something like this: foreach (MethodInfo mi in this.GetType().GetMethods(BindingFlags.Instance)) { myDelegate = new MyDelegate(mi.MethodHandle) myArray.Add(myDelegat

Re: [ADVANCED-DOTNET] Communication with Windows Service

2004-03-02 Thread Henry Stapp
If you're considering using remoting, you may want to investigate genuine channels www.genuinechannels.com, which purportedly helps to work around some of the shortcomings of .NET remoting. HTH, Henry -Original Message- From: Ali Khawaja [mailto:[EMAIL PROTECTED] Sent: Monday, March 01,

[ADVANCED-DOTNET] Programming With Sockets

2004-03-02 Thread Paul Stevens
Does anyone know of a good example/tutorial out there of working with sockets, I need to create/open sockets in my application that will allow native clients to stream data to me. And maybe also allow me to stream data back to the native client

Re: [ADVANCED-DOTNET] Creating a delegate from reflection information

2004-03-02 Thread Griffiths, Ian
You want the static method Delegate.CreateDelegate. Something like this: myDelegate = (MyDelegate) Delegate.CreateDelegate(typeof(MyDelegate), mi); -- Ian Griffiths - DevelopMentor http://www.interact-sw.co.uk/iangblog/ > -Original Message- > From: Ryan Parlee > > I am wanting to c

Re: [ADVANCED-DOTNET] Creating a delegate from reflection information

2004-03-02 Thread Fabian Schmied
Ryan Parlee schrieb: I am wanting to create a delegate at runtime using reflection but am unable to get this working. Specifically, I would like to something like this: foreach (MethodInfo mi in this.GetType().GetMethods(BindingFlags.Instance)) { myDelegate = new MyDelegate(mi.MethodHandle) my

Re: [ADVANCED-DOTNET] Creating a delegate from reflection information

2004-03-02 Thread John Elliot
Since you are looping over instance methods you will need to create a delegate with an invocation target. This means you can't pass the MethodInfo to CreateDelegate, rather you will need to pass the instance the method is to be invoked on and the name of the method. Also, I think that you'll need t

Re: [ADVANCED-DOTNET] Thread with message pump (UI thread)

2004-03-02 Thread Griffiths, Ian
SendMessage only calls the target window's procedure directly if you call it from the UI thread. The Win32 documentation says that if you send a message from some other thread, the message will only be processed when the UI thread executes message retrieval code (i.e. its message pump runs). It w

Re: [ADVANCED-DOTNET] Thread with message pump (UI thread)

2004-03-02 Thread J. Merrill
Inline At 07:22 AM 3/2/2004, Griffiths, Ian wrote (in part) >SendMessage only calls the target window's procedure directly if you >call it from the UI thread. The Win32 documentation says that if you >send a message from some other thread, the message will only be >processed when the UI thread ex