Re: [ADVANCED-DOTNET] Debugging Deadlock

2004-03-17 Thread Griffiths, Ian
Since monitors can be reacquired reentrantly, it won't be any of the threads that are blocked on the Monitor.Enter call. So it must be one of the other threads. If there are no other threads, then that's a little strange. Are you running on v1.0 or v1.1 of the .NET framework? On v1.0 there was a

Re: [ADVANCED-DOTNET] Debugging Deadlock

2004-03-17 Thread Griffiths, Ian
Matt Davey wrote: Wouldn't ntsdexts.dll and !locks help ? That shows you Win32 critical sections, not .NET Monitors. However, I can't believe I forgot about Son of Strike - the solution Rick Byers points out. D'Oh! -- Ian Griffiths - DevelopMentor http://www.interact-sw.co.uk/iangblog/

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

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

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

2004-02-26 Thread Griffiths, Ian
Jade Burton wrote: wouldn't it be great if the UI thread wasn't tagged as STA, but rather that it was just like any old thread? This would mean you still have a single thread dispatching events to event handers, but your window objects would instead be written to be 100% threadsafe and, for

Re: [ADVANCED-DOTNET] Web Services, Remoting and Coupling

2004-02-13 Thread Griffiths, Ian
(I'm not going to respond to the SQL stuff - I think you know I already broadly agree, and you know I was just playing devil's advocate in order to draw the analogy.) Frans Bouma wrote: I see where you're heading to, that advising webservices as bad is wrong. :) Not quite. I'm saying that

Re: [ADVANCED-DOTNET] Web Services, Remoting and Coupling

2004-02-13 Thread Griffiths, Ian
Andrew Hopper wrote: we are working with an external developer who is using Axis to consume some of our Web services. It's really a shining example of interoperability. But guess what he does on his side? Yep, he turns the XML into objects using Axis' type-mapping features. But his types

Re: [ADVANCED-DOTNET] Web Services, Remoting and Coupling

2004-02-13 Thread Griffiths, Ian
Ian Griffiths wrote: Evolving public APIs is hard. But web services certainly make it a lot easier, because there isn't that hard dependence on a specific assembly being available at both ends. Frans Bouma replied: Erm... if the developer has written his webservice referencing client

Re: [ADVANCED-DOTNET] Web Services, Remoting and Coupling (was: Microsoft's future plans for Component Services and ORM)

2004-02-11 Thread Griffiths, Ian
Ian Griffiths wrote: .NET remoting requires both ends to share type information. This entails a degree of coupling between your systems that is likely to be highly undesirable. Frans Bouma replied: Everybody who has written a remoting setup knows that this is easily circumvented by

Re: [ADVANCED-DOTNET] Web Services, Remoting and Coupling

2004-02-11 Thread Griffiths, Ian
An analogy with web services vs. remoting just occurred to me that I though might be close to your heart, Frans. For many applications, the database is the bottleneck. There is no doubt that if you want the absolute best possible performance you can get out of most databases (and certainly out

Re: [ADVANCED-DOTNET] Microsoft's future plans for Component Services and ORM

2004-02-10 Thread Griffiths, Ian
Frans Bouma wrote: Consider an object which is serializable to XML using the SOAP formatter. the XmlSerializer is first serializing the object to XML. This is done using an utterly slow, FILE based approach. Where does this persistent myth spring from? I suspect it is because someone who

Re: [ADVANCED-DOTNET] Managed C++ wrapper interacting with a c# c lass

2004-01-29 Thread Griffiths, Ian
Actually the C++ example just happens to be using the syntax that is also used for pointers. This doesn't make it a pointer. In this declaration: Foo * f = new Foo(); because Foo is a managed type, then that's implicitly a __gc * type. That means that it's a reference to a managed object.

Re: [ADVANCED-DOTNET] Remoting an object that inherits from class

2004-01-29 Thread Griffiths, Ian
If the base class doesn't derive from MarshalByRefObject then it's never going to be directly remoteable. If that's the case you'll have to write a remoting facade for it. But you probably want to do that anyway, even if the base class does derive from MarshalByRefObject. It's almost invariable

Re: [ADVANCED-DOTNET] Best way to share an interface definition amoung components tier

2004-01-21 Thread Griffiths, Ian
To be fair, quite a lot of your original statement was true. As you said, namespaces do not necessarily correspond to the assembly name, and a namespace can indeed span multiple assemblies. It's just that the conclusion you drew from this was, as Stefan pointed out, incorrect. You can define

Re: [ADVANCED-DOTNET] How to use this attribute for DLLs [LoaderOptimization(LoaderOptimization.MultiDomain)]

2003-11-23 Thread Griffiths, Ian
Wow - running NUnit tests on the client? I usually put those in the build process... Anyway... To be honest, I'm not completely sure: it might be a bad thing to do in most situations, but there's one scenario in which it might help: I would expect to see an improvement in startup time after a

Re: [ADVANCED-DOTNET] How to use this attribute for DLLs [LoaderOptimization(LoaderOptimization.MultiDomain)]

2003-11-19 Thread Griffiths, Ian
I think you've misunderstood the purpose of the attribute. All that this attribute does is shares JITed code across appdomains. It does *not* share state. In particular, each appdomain will get its own set of static member variables. It's only code that gets shared. This is pretty similar to

Re: [ADVANCED-DOTNET] How to create an enumeration that exposes formats

2003-10-20 Thread Griffiths, Ian
If the goal is simply to get the text of your choosing to appear in IntelliSense, wouldn't it make more sense to use the XML documentation to do this? E.g. public enum DateTimeFormats { /// summaryMM/dd/ HH:mm:ss/summary MonthDayYearTime, ... etc. } Visual Studio .NET will display

Re: [ADVANCED-DOTNET] Async Data Commands with ADO.Net

2003-10-08 Thread Griffiths, Ian
Jade Burton wrote: But what's wrong with creating a thread? If you use the threadpool it's almost a one-liner! Although if you use the threadpool you almost certainly won't be creating a thread - you'll just be using a thread that was already in the thread pool most of the time. And that's

Re: [ADVANCED-DOTNET] repost:Passing a MarshalByRefObject as an i nput parameter causes error -

2003-09-17 Thread Griffiths, Ian
Lohr, Rebecca wrote: I'm far from a network expert, but if networking were the problem, shouldn't all calls to the component fail, rather than only the calls that pass MBRO as input parameters? Actually this is exactly what can happen. This happens for the same reason that in many network

Re: [ADVANCED-DOTNET] .NET P2P Network Programming

2003-09-04 Thread Griffiths, Ian
One thing that's also worth pointing out is that there are many firms which consider the fact their IPv4 firewalls don't allow incoming connections to be a feature, not a limitation. NAT serves more than one purpose. It seems that you are focusing on the fact that it provides a short terms

Re: [ADVANCED-DOTNET] .NET Type's .ToString() reports C# syntaxis.

2003-08-29 Thread Griffiths, Ian
Bearing in mind that Type objects look the same regardless of what language you are using, why would you expect it to give you a VB-specific name? How's it supposed to know what language you're calling from. In fact it doesn't use C# syntax either - it can come up with type names that won't

Re: [ADVANCED-DOTNET] .NET Type's .ToString() reports C# syntaxis.

2003-08-29 Thread Griffiths, Ian
Frans Bouma wrote: it does come up with a string that works in C# but doesn't in VB.NET :) Well, sometimes. Sometimes not. And it also sometimes comes up with strings that work in VB.NET and sometimes it doesn't... Because the types were set in a piece of code that is written in C# I

[ADVANCED-DOTNET] Initialization of Arrays of Pointers

2003-08-25 Thread Griffiths, Ian
I'm trying to find an answer to a seemingly straightforward question, but it is proving more difficult than I thought it would. The question is: if I create an array of pointers, using unsafe code in C#, will the elements of the array all be initialized to null? The documentation in the C# spec

Re: [ADVANCED-DOTNET] Asynch sockets and IO completion ports

2003-08-21 Thread Griffiths, Ian
, threading or IO completion ports... -- Ian Griffiths DevelopMentor -Original Message- From: John Davis [mailto:[EMAIL PROTECTED] So who do we write to tell them to correct the documentation? - Original Message - From: Griffiths, Ian [EMAIL PROTECTED] To: [EMAIL PROTECTED

Re: [ADVANCED-DOTNET] Asynch sockets and IO completion ports

2003-08-20 Thread Griffiths, Ian
Assuming you only call EndReceive after you've got the callback, yes, nothing should need to block on EndReceive. Your code won't block because the callback only happens once there is data to retrieve. And there won't be any thread blocked inside the CLR just to service your particular receive

Re: [ADVANCED-DOTNET] Setting access permissions for assemblies compiled at runtime

2003-08-17 Thread Griffiths, Ian
It is possible to do this using code access security. How are you doing the compilation? If you are using the Code DOM, you can control this kind of thing with the CompilerParameters you pass to ICodeCompiler.CompleAssemblyFrom[Dom/Source/File]. The Evidence property is the way to do this. The

Re: [ADVANCED-DOTNET] TP/RP stub...

2003-08-17 Thread Griffiths, Ian
the stub point to an array of IL code generated using Reflection.Emit() or is it a pointer to JIT'ed machine code? Thanks, Ramkishore - Original Message - From: Griffiths, Ian [EMAIL PROTECTED] I'm assuming here that you're using stub in the Java sense, to mean the thing

Re: [ADVANCED-DOTNET] TP/RP stub...

2003-08-14 Thread Griffiths, Ian
I'm assuming here that you're using stub in the Java sense, to mean the thing on the client side that looks like the object. (Microsoft have always used stub to mean the other end. They use the term proxy for the client-side part. But the only way I can make sense of your post is if you mean

Re: [ADVANCED-DOTNET] Result of performance comparison between Socket, Remoting and .NET Messaging Queue

2003-08-02 Thread Griffiths, Ian
Did you send those messages concurrently, or one after the other? If you care about scalability, simple sequential tests aren't going to tell you much. You'll want to construct a test where you measure how the response time varies as you increase the load, preferably from a number of clients.

Re: [ADVANCED-DOTNET] windows service memory footprint

2003-08-01 Thread Griffiths, Ian
thoughts on this? Paulo Sacramento On Wed, 30 Jul 2003, Griffiths, Ian wrote: .NET processes will tend to grow to what looks like an alarmingly large size unless there is a reason for them to shrink. The CLR does actually keep track of the amount of memory being used system-wide, and if other

Re: [ADVANCED-DOTNET] windows service memory footprint

2003-08-01 Thread Griffiths, Ian
a very rare periodical check. I guess the O.S. together with the GC take care of releasing all unneeded resources. This also suggests that .Net services have an heavy start-up penalty. Any thoughts on this? Paulo Sacramento On Wed, 30 Jul 2003, Griffiths, Ian wrote: .NET processes will tend

Re: [ADVANCED-DOTNET] windows service memory footprint

2003-07-30 Thread Griffiths, Ian
.NET processes will tend to grow to what looks like an alarmingly large size unless there is a reason for them to shrink. The CLR does actually keep track of the amount of memory being used system-wide, and if other processes start to demand more memory, the CLR will trigger a garbage collect in

Re: [ADVANCED-DOTNET] Runtime Control Discovery

2003-07-09 Thread Griffiths, Ian
It looks like a feature of the ControlCollection. In fact the docs say that this class enables ASP.NET server controls to maintain a list of their child controls. This is a rather specific description, and doesn't necessarily imply that you can use the collection as an arbitrary container of

Re: [ADVANCED-DOTNET] The performance of .Net with Win2000

2003-06-17 Thread Griffiths, Ian
It's impossible to tell what you mean by this message. It's possible that you're saying that Java is 10 times slower than VC, or possibly that it's 10 times faster. (I'm guessing though that you mean C# is in the middle.) Where does the TCP echo server come into this? What are your tests