all groups > dotnet clr > november 2005
Serious Threading.Monitor issues in .NET 2.0
Posted by Michael Kennedy at 11/30/2005 1:32:06 PM
Hi,
I have been looking into the claim that the keyword lock is not safe
when exceptions are possible. That lead me to try the following code,
which I think has uncovered a serious error in the .NET 2.0 framework.
Note that this runs better, but not perfectly, on .NET 1.1.
Note: The numbers... more >>
EventHandling problem : Java has solution but what about Microsoft???
Posted by Mahesh Devjibhai Dhola [MVP] at 11/29/2005 9:44:44 PM
Hi,
I have added few of the events in some control, example code is:
btnControl.GotFocus +=3Dnew EventHandler(EventHandlingMethod);
btnControl.Click +=3Dnew EventHandler(EventHandlingMethod);
lblControl.Click +=3Dnew EventHandler(EventHandlingMethod);
private void EventHandlingMethod(object s... more >>
Unicode IsLetter
Posted by ThorstenJ at 11/29/2005 3:38:02 AM
I'm not sure in which discussion this fits in, but I'll try here.
I need to use Unicode in order to use national characters. But I
find a strange behavior that I had not expected. I can't find much from
the documentation about this. I need to know if a character is a letter or
not.
Even if i... more >>
Alternative to AppDomain.GetCurrentThreadId.
Posted by Davinci at 11/28/2005 12:14:55 PM
In .NET 2.0 if you use AppDomain.GetCurrentThreadId then you will get a
warning that the call is obsolete and you should use ManagedThreadId
property of the Thread object.
If you were to look at the AppDomain.GetCurrentThreadId() method and
Thread.ManagedThreadId property documentation ... more >>
CryptoStream.Dispose closes target stream in 2.0
Posted by Harold Howe at 11/22/2005 6:15:37 PM
In .net 2.0, the dispose method of CryptoStream calls the Close method
on the destination stream (verified with .NET reflector). In 1.1, it did
not. In my opinion, the 1.1 behavior was preferable. After all, once I
am done decrypting the data, I may want to look at it. Why should I have
to k... more >>
MSIL size limit
Posted by Etienne Fortin at 11/22/2005 7:28:03 AM
Looking at the output of ildasm, I was wondering if there's a size limit on
msil for any given method. The IL_xxxx index is an hexa number on 16-bits.
Does it mean that for any given method, there's a 64 kb size limit?
I know I shoudn't create methods so big, but let's say I want a 256 kb
m... more >>
Emailing
Posted by Andrew Robinson at 11/21/2005 2:20:28 PM
I am working on a project for my employer that will allow users to opt-in
for a weekly email news letter. This is a company that has a high regard for
their public image and I would consider this to be very legitimate. They are
talking about sending a few thousand to possibly 10,000 emails eve... more >>
Event in interface
Posted by Anthony Yott at 11/18/2005 9:37:16 AM
Anyone have an example of defining a custom event (i.e custom delegate) in an
interface?
--
Anthony Yott... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
debugger runs to end of function
Posted by YuriL at 11/18/2005 8:20:58 AM
Hi,
I am trying to debug an application, so I set a break point, and when I
reach it, I want to exit the application by stopping the debugger. However,
it seems that it runs to the end of the method that I am currently in. Can
someone tell me why this happens and how I keep the applicatio... more >>
Assembly Unification
Posted by Juan Ignacio Gelos at 11/17/2005 2:51:04 PM
(Re: .NET Assemblies versions; I wanted to make this a new poat but OE shows
it in the same thread as the original post, so excuse the repost if you see
both as new threads)
Reading the docs (http://msdn2.microsoft.com/en-us/library/db7849ey ) I
see a note that states: "Version 1.0 .NET ... more >>
Yet another Major JIT Optimizer BUG
Posted by Boaz Sedan at 11/17/2005 1:23:02 AM
Try this in Release mode of .Net 1.1 SP1:
class Bug2
{
class C : IDisposable
{
public C() {}
void IDisposable.Dispose() {}
}
bool A()
{
return true;
}
public Bug2()
{
if (A())
{
Console.WriteLine("A Is True!");
using (new C()) {}
}
else
{
... more >>
"ldelema [mscorlib]System.Byte" failed on some circumstances
Posted by Luc Vaillant at 11/16/2005 2:45:04 AM
First of all, I'm using .Net Framework v1.1 with VS.NET 2003
I have made some tests, and I realized that "ldelema [mscorlib]System.Byte"
doesn't work on my Pocket PC device if my buffer is declared as follow even
if typeof(buffer) is Byte[]:
SetDouble(class [mscorlib]System.Array buffer,..... more >>
.NET Assemblies versions
Posted by Juan Ignacio Gelos at 11/16/2005 12:00:00 AM
What happens when on a .NET 2.0 application you reference a third party
assembly that itself references the 1.0 versions of the .NET CL? (e.g.
mscorlib 1.0, System.dll 1.0, etc.).
Does the CLR automatically rebind those references to point to the 2.0
versions? I've tested this on a machine ... more >>
CIL, CopyMemory and Compact Framework
Posted by Luc Vaillant at 11/15/2005 11:12:02 PM
Hi,
I'm trying to write a method for my PocketPC that will write a Double value
to an Array buffer at the specified offset.
The constraints are :
- Must be safe managed code
- Array buffer can be of any integral type (byte, short, int, long, etc.)
- offset can be unaligned
I already wr... more >>
Major JIT Optimizer BUG
Posted by Boaz Sedan at 11/14/2005 8:01:04 AM
Try running the following code (tested on .Net1.1 SP1) in both debug and
release builds. Notice the different results:
In the release build, Method B (which modifies an instance field) is never
called!!!
------------------------------------------------------
using System;
namespace Maj... more >>
How are CLR events defined?
Posted by asylumn at 11/10/2005 1:58:04 PM
I'm having a srange issue with events in my app. I am trying to embed Lua
scriping using LuaInterface ( http://luaforge.net/projects/luainterface/ ),
which basically allows Lua scripts to access CLR object, including their
events.
The problem I am having is that it will only work with even... more >>
AppDomain.GetAssemblies broken?
Posted by Emmanuel Stapf [ES] at 11/10/2005 10:51:02 AM
Hi,
I have a scenario where AppDomain.CurrentDomain.GetAssemblies () only return
part of the loaded assemblies in that AppDomain. I know it is not complete,
because the code doing this call is located in assembly B, which is called
from assembly A, and in the result of GetAssemblies I do ge... more >>
Strange behaviour with mixed-mode C++ program
Posted by ralphsieminsky NO[at]SPAM hotmail.com at 11/9/2005 4:08:35 PM
I am seeing a strange behavior with a managed/unmanaged C++ program.
The program is a large application made of DLLs, COM components,
and an exe. When I recompile the exe with /clr a problem occurs: at
some point, deep down the stack far from main() and far from the
managed to native transiti... more >>
Threading Issues
Posted by Ashish at 11/8/2005 6:05:08 PM
Hi All,
I am designing a class library that can be used by web and windows
client both, the problem is that i want to initiate certain behavior in
class that is thread specific, yet i want to declare a static methods
for this behavior....
doing some research online i found out that one can... more >>
.NET 2.0 missing mscorsvr.dll?
Posted by Jeff at 11/8/2005 12:46:01 AM
Is this server gc dll now part of the mscorwks.dll or just not installed with
2.0 unless you have a server os?
--
Thanks, Jeff WS... more >>
Word and Excel loads version 1.1 of the CLR instead of 2.0 (Beta 2 -> RTM issue)
Posted by Jim Meyer at 11/7/2005 12:00:00 AM
We are in the process of migrating from Beta 2 to the RTM version of
Visual Studio 2005 and the .NET Framework. After the RTM version has
been installed, Word and Excel no longer load the 2.0 framework for our
C# addin, but instead version 1.1. For some unknown reason PowerPoint
still loads ... more >>
Compatibility relation for "native int"
Posted by George at 11/6/2005 3:59:58 PM
I'm interested in the compatibility relation (used by the bytecode verifier)
which involves the type "native int".
So, is int32 compatible with native int? i.e. is int32 a subtype of native
int?
The few examples I run show that the bytecode verifier accepts an "int32"
where a "native int... more >>
dot net functions
Posted by Wendy Elizabeth at 11/2/2005 7:56:02 PM
I am working with visual basic.net 1.1. I need to parse out data in a string
that is space delimited. The number of spaces between each data item in the
string can change. (I have no control over how many spaces are between each
item in the string since I am getting the data from a mainframe s... more >>
Why doesn't System.Guid have a Parse method?
Posted by PIEBALD at 11/2/2005 12:52:02 PM
Why doesn't System.Guid have a Parse method when SqlGuid does?
It's simple enough to do:
System.Guid g = System.Data.SqlTypes.SqlGuid.Parse ( s ).Value ;
But why should I need to?
... more >>
exception logging - additional data?
Posted by JV at 11/2/2005 9:47:39 AM
I just started getting into this, so I hope this isn't a stupid question,
but I noticed that the logging block has a feature for logging an additional
chunk of contextual data using IDictionary (Hashtable usually).
When I log my exceptions, it works, but I would like to be able to log some
... more >>
can I configure an unmanaged app to use a certain version of the runtime?
Posted by bg at 11/1/2005 12:00:00 AM
hi all,
I have an unmanaged app that uses some dotnet based components we have
written via COM (the components are registered for COM interop). The
components are all written/use v 1.1 of the dotnet runtime.
With the dotnet 2.0 runtime installed, we are finding the app blows up
trying to... more >>
|