Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > dotnet clr > july 2004

Filter by week: 1 2 3 4 5

Loading the whole DLL?
Posted by Lei Jiang at 7/31/2004 12:22:43 PM
There are several questions : When the program start, does it load all the assembly it referenced? When the assembly is loaded, does CLR only load the menifest of the assembly, or load the whole dll? If it does not load the whole dll, when I use a type in that assembly, does the CLR load the...more >>


Can't find a way to get the ICeeGen interface
Posted by Nadav at 7/31/2004 5:07:01 AM
Hi, 1. I am writing some kind of a CLI Linker 2. I am using the unmanaged meta-data API. I wonder browsing "cor.h" I have encountered the 'ICeeGen' this interface is retrieved by the 'ICorModule' interface, I didn't find any API that provide me the means to get an 'ICorModule' interface, how sh...more >>

What is class[] in CLR Profiler?
Posted by Lei Jiang at 7/30/2004 1:28:52 PM
I download the CLR profiler and run it. It's great and the documentation is very good. But I don't know what is class[] in graphs. It appears frequently but the document doesn't mention it. Is it the metadata? Thanks! ...more >>

bool - thread safety
Posted by rhashemian NO[at]SPAM hotmail.com at 7/30/2004 1:17:13 PM
hi all, this is what the clr docs say about boolean: This type is safe for multithreaded operations does this mean i can access a bool object from any thread without worrying about sync issues? pretty sure that's it, but just wanna make 100% sure. thanks, rh...more >>

shared Domain and Assembly loading
Posted by Clément_ESCOFFIER at 7/30/2004 10:23:52 AM
Hello, I have a little questions about Assemblies who are loaded in the shared Domain. When an AppDomain ( perhaps the Default Domain create for the executable ) want use a Shared Assembly ( who is in the shard domain ), how the assembly resolver find it ? And when appdomain find the ass...more >>

System.Drawing.Image.FromFile leaves file open longer than necessary: bug?
Posted by Lucvdv at 7/30/2004 10:12:29 AM
I just found out that BMP files loaded with Image.FromFile remain open until my application terminates. Is this a bug, or do I have to do something to make sure the file is closed? For example if this VB code (in a button click handler) is executed twice, the delete fails on the second pass...more >>

generating an EXE with an assembly with the unmanaged API
Posted by Michael Dulaney at 7/29/2004 8:05:34 AM
Hi, I'm trying to read a managed executable, modify the code in the executable's methods, and then write it to a new executable. I use IMetaDataImport to gather the metadata and IMetaDataEmit to generate the new metadata. I then write the information from IMetaDataEmit to a file via ...more >>

When to use Synchronized method and When to use lock?
Posted by Lei Jiang at 7/28/2004 1:07:08 PM
To prevent concurrent access to a data structure, one way is to use its Synchronized method, another way is to use unlock keyword in C#. I'd like to know how to choose from them. For example : class MyClass { ArrayList list = new ArrayList(); void Method(object newObj) { ...more >>



disappearing process when launched from web service
Posted by Tim Mackey at 7/28/2004 11:15:46 AM
Hi,=20 I have a question about the scope of a process, when launched from a web = service (using Process.Start). it may sound silly but there is an = unusual side effect, the process disappears as soon as it starts. i'm = building a very simple web service to control a server dial-up = connec...more >>

Dynamic assembly not persisting correctly.
Posted by google NO[at]SPAM xemaps.com at 7/27/2004 11:21:44 PM
I am emitting a dynamic assembly (marked with the RunAndSave flag). I can successfully instantiate the "dynamic" class in my dynamic assembly. I can successfully call a method on that dynamic class. When I call the assembly builder's Save() method, an assembly dll (e.g., MyDynamicAssembly.dl...more >>

Do I trust the implementation ?
Posted by hugo batista at 7/27/2004 8:10:28 PM
Hi I have a factory pattern that gives me an instance of an implementation that is not a well known. All I know is the interface, and I read the final implementation somewhere from my configuration. This is great for plug-ins, where you can have your code completely independent of the final imp...more >>

binary compatibility support for .NET assembly
Posted by someone at 7/27/2004 6:16:38 PM
Suppose that I have a class in an assembly that is delivered to the user, what can I do to change the class so that it doesn't break the binary compatibility? That is, user application can run with recompiling and relinking. I know that if I define an interface, and only expose the interface ...more >>

CPU Racing w/ Idle App
Posted by JD at 7/27/2004 3:58:29 PM
(longish message, but I appreciate ANY insight) We have a .NET 1.1 Winforms application that recently started to exhibit some odd behavior. Specifically, after sitting idle for a while (> 30 minutes), the user's CPU starts getting hammered. Here's some background info: First, it's a desktop...more >>

EnC in VB Whidbey
Posted by Sriram Krishnan at 7/27/2004 12:35:05 AM
Can someone tell me how Edit and Continue works internally in VB Whidbey? I mean - what happens behind-the-scenes in the CLR when you change the code in the debugger and run the application again Thanks! -- Sriram Krishnan Microsoft Student Ambassador http://www.dotnetjunkies.com/weblog/...more >>

GC SuppressFinalize and ReRegisterForFinalize
Posted by Priyesh at 7/25/2004 12:11:35 PM
I am having trouble understanding the code below. (From http://msdn.microsoft.com/msdnmag/issues/1100/GCI/ Figure 9) I am looking for an explanation about how the SuppressFinalize calls work. From reading the documentation, i get the idea that SuppressFinalize would remove the obj from the fi...more >>

Br vs Br_s while Emiting a Switch Statment
Posted by SapphireHawk at 7/24/2004 11:27:45 AM
I am dynamically Emitting a switch statement using System.Reflection.Emit. I have used the ILDASM and copied a switch statement’s syntax as a reference. I run my code to build the function and I got an Illegal One-Byte branch exception. I figured out that the first couple of (break;) jumps use...more >>

Why the Microsoft.VisualBasic in Manifest
Posted by Michael Liu at 7/24/2004 10:58:13 AM
Hello, I wrote two assemblies by VB.NET and C# to implement the same function to sayHelloWorld. After compilation, I used ILDASM to inspect the assembly DLLs. Just found there are two more system assemblies(Microsoft.VisualBasic & System) referenced by VB.NET than C# Can anyone tell m...more >>

Determine calling method from within called method?
Posted by Ben Fidge at 7/23/2004 7:24:46 AM
From within a method of a class, how do you determine the name of the class.method that called it, programmatically? I have a log file class, and it would be very beneficial to be able store the name of the class and method that called my LogFile.Write method. Kind regards Ben ...more >>

ICorProfilerInfo::GetModuleInfo doesn't have argument for assembly
Posted by Adam Preble at 7/22/2004 4:55:03 PM
According to the profiling documentation I have, ICorProfilerInfo::GetModuleInfo has the following prototype: HRESULT GetModuleInfo( ModuleID moduleId, LPCBYTE **ppBaseLoadAddress, SIZE_T cchName, SIZE_T *pcchName, WCHAR szName[], mdModule *pModuleToken, AssemblyID *pAssemblyId ) How...more >>

How do I locate custom attributes on private fields?
Posted by Ken Varn at 7/22/2004 11:53:06 AM
I have a custom attribute that I would like to locate on fields within a class object. I can only find the attribute if it is placed on a public field. Private fields cannot be found. I have tried the following code, but not sure why it is not finding the attribute when the field is marked pr...more >>

how to define this?
Posted by ZhangZQ at 7/21/2004 3:53:04 PM
if there is a C function in a DLL(My.dll) has this declaration, struct MyStruct { int a; int b; }; int MyFunc(int param1, MyStruct** param2); how to define this in C# ? if there is another C function like this int MyFunc1(int param1, char** szRtn);, I can define it as [D...more >>

Reflection to get objects that implement interface / or in namespa
Posted by Dinesh at 7/21/2004 10:18:01 AM
Hello, I wanted to know if it is possible to use reflection to get a list of all classes that implement a given interface. If not, is it possible to get a list of all classes that exist in a given namespace? Thanks, Dinesh...more >>

How to specify the initial memory size for a application?
Posted by Lei Jiang at 7/21/2004 9:58:30 AM
I have a program that cost a lot of memory. During the load of the program, more and more memory is being allocated. I'd like to know if I specify a large initial memory size for the application, would its load speed be increased? If so, how can I specify that? Thanks! ...more >>

assembler code
Posted by menkaur at 7/20/2004 9:26:02 PM
how to write .net code using masm?...more >>

clr vs pe
Posted by menkaur at 7/20/2004 9:25:01 PM
what is the difference between clr code and pe-code ( i mean, low level - file format, memory placement etc)?...more >>

Code size effects on application performance
Posted by Josh Buedel at 7/20/2004 4:17:26 PM
Hello, I am searching for information on the performance impact/implications of using large assemblies (>1MG). Is an assembly loaded fully into memory? Or are the classes loaded as they are needed? As far as execution time, you take a one time hit at application load, correct? And even s...more >>

Logical threads vs. physical threads
Posted by bjoseluisb NO[at]SPAM hotmail.com at 7/20/2004 3:40:12 AM
Hi all, I'm using ThreadPool.QueueUserWorkItem to handle work requests from a Windows Service. I've been using the performance monitor to trace the number of physical threads and the number of logical threads in the LocksAndThreads counters. I'm seeing 28 physical threads, but only 1 thread a...more >>

Will 2.0 of the clr have support for covariant returns?
Posted by Hasani (remove nospam from address) at 7/19/2004 9:38:31 PM
Will 2.0 or some other future version of the clr have support for covariant returns? ...more >>

native assemblies
Posted by Xavi Sam at 7/19/2004 12:04:41 PM
Hi When a managed application is executed by the CLR, the managed assemblies are translated to native assemblies. This native assemblies are storaged in some subdirectory in my pc or simple lives in memory? Can I set the time of life to native assemblies? Thanks in adavence Javier ...more >>

String testing
Posted by Stephen Walch at 7/19/2004 7:03:44 AM
I have always been curious. Which is faster? if (m_string.Length==0) foo(); if (m_string.Equals(string.Empty)) foo(); Thanks, -Steve ...more >>

assembly loading question
Posted by David zhu at 7/17/2004 10:26:08 AM
I'm confused that only the strong name assembly can't load successfully for different AssemblyVersion, or it works on every assembly?...more >>

ANN: .NET 2.0 Beta - CODE COVERAGE EDITION
Posted by Thomas Scheidegger [MVP] at 7/17/2004 9:44:38 AM
NET Framework Version 2.0 Redistributable Package Beta 1 (x86) CODE COVERAGE EDITION The .NET Framework Code Coverage Edition is a new mechanism that enables you to give Microsoft direct feedback on what portions of the .NET Framework and Win32 you're most reliant on. http://www.microsof...more >>

Genericity support in IL
Posted by ianm at 7/16/2004 4:17:02 PM
Please, is there anything written on genericity support in the Intermediate Language? I mean, something like the Tools Developers Guide in the SDK. Most of these documents refer to CIL v1.1 (Jun 2003), and only one of them (Metadata Unmanaged API) refers to genericity. I'm interested in this beca...more >>

Invoking complex constructors through reflection. Is there any way?
Posted by Bern McCarty at 7/16/2004 3:59:03 PM
I am using reflection to successfully find a System.Type that derives from an abstract class that my code knows about. I want to create an instance of this derived type. The type in question can be created only with a complex constructor (it has one parameter). Is there any way for me to create...more >>

Memory not being released in .net service
Posted by sdc at 7/16/2004 12:43:02 PM
I have a .Net windows service that has 4 threads. Each thread handles large amount of string data. The threads are out to sleep and awaken after 1 minute intervals. From the start of the service, the memory consumption keeps increasing to a point, where 'out of memory' exception is generated and ...more >>

Weak Reference Race Condition
Posted by Chris Mullins at 7/15/2004 3:55:13 PM
If I have an object held only by a weak reference, and I write code that looks like: dim strongRef as Object if wr.IsAlive() then strongRef=wr.Target else strongRef=new MyObject() end if There is a fairly signifigant race condition - between the "wr.IsAlive" call and the wr.Target c...more >>

what language did microsoft use to develop .net framework
Posted by blacknight at 7/14/2004 3:47:01 AM
what language did microsoft use to develop .net framework and can i use c# to build APPLICATION that interact directly with the hardware thanks...more >>

A fundamental question about CAS
Posted by jweizman NO[at]SPAM csi.com at 7/13/2004 2:29:16 AM
Hi After delving into CAS for long days, i begin to understand its security model. BUT, there is still something i don't understand : CAS will treat only .NET written program. So it will never see the others like those written in VB6 or assembly. Considering not all the program won't be wr...more >>

Question on Memory Allocation
Posted by John Linn at 7/12/2004 4:44:01 PM
Let's say I have this object: public class void MyTest() { public string str1 = [1k worth of text]; public string str2 = [1k worth of text]; public string str3 = [1k worth of text]; public string str4 = [1k worth of text]; public string str5 = [1k worth of text]; } MyTest ...more >>

multimodule assemblies info
Posted by Ramunas Urbonas at 7/12/2004 12:13:20 PM
Hello, Currently I'm working on a project which contains 100+ assembly files. Can anyone point me a good info source on building multimodule assemblies, info on bonuses and drawbacks of this approach? regards, Ramunas Urbonas ...more >>

cli specification vs. VS Implementation
Posted by Ben Schwehn at 7/11/2004 1:41:17 AM
Hello all Sorry for X-posting, If there's a more appropiate group, please f'up to it. I've looked a the binary source of several .net modules both with a hex editor and with a parser I've written. There are several things I've noticed and/or don't quite understand with how the metadata ...more >>

ContextBoundObject Attribute question
Posted by Claes Rådström at 7/10/2004 11:14:16 AM
Hi! I rewrote a Custom Attribute sample to supply tracing functionality to a context bound class thru an attribute. The thing is that I would like to continue nested tracing inside the class, but since a method call, in an object, that calls another method on itself seems not to be performe...more >>

threading Vs delegates for Async processing
Posted by rb531 at 7/9/2004 5:32:01 PM
Is it better to use threading or delegates for Async processing? I mean in performance, or IL generation, etc. Thanks a bunch...more >>

"Application Domain".....
Posted by James at 7/9/2004 3:38:37 PM
Is there a tool that will allow me to look at a .Net executable and list the currently existing app domains at runtime? ...more >>

Set DllImportAttribute at run-time?
Posted by Christopher Wells at 7/9/2004 9:56:47 AM
I have a class that has methods like: [DllImport("wfdb.dll")] private static extern int setsampfreq(double freq); The wfdb.dll file isn't in the current directory nor on the path ... so I want to qualify it with the path name, for example: [DllImport(@"c:\foo\wfdb.dll")] Ho...more >>

64Bit .Net & WOW64
Posted by andrew lowe at 7/8/2004 5:14:23 PM
Hi, Lets say I have a verifiable assembly which does not use P/Invoke or COM-Interop. On a 64bit OS this will run in the 64bit .net runtime because i assume the OS loader looks and determines its PE32+. If this assembly (via a plugin type of framework) loads another assembly that is not verifi...more >>

ClickOnce in VS 2005 Beta 1 ?
Posted by ralphsieminsky NO[at]SPAM hotmail.com at 7/8/2004 8:09:44 AM
Has anyone gotten ClickOnce to work with VS 2005 Beta 1? I tried the simplest of apps, Published it using VS 2005, and am getting the following error when clicking the published link: "Deployment manifest requires publisher and product specified." Indeed, the manifest contains this line, ...more >>

What is the opposite of BitConverter.ToString(byte[]) ?
Posted by grennis NO[at]SPAM gmail.com at 7/8/2004 5:49:57 AM
If I run the following code: Byte[] bytes = System.Text.Encoding.ASCII.GetBytes("test"); return BitConverter.ToString(bytes); I get the string "74-65-73-74" back. My question is, what is the easiest way to convert the string back to "test"? Can it be done without breaking the string and u...more >>

.NET + ActiveX control firing many events = continous memory leak
Posted by gary NO[at]SPAM xyris.com at 7/8/2004 5:46:34 AM
Hi, First my conclusion (I hope someone can tell me I'm wrong) followed by a problem description. CONCLUSION: When an activex control is used in any .NET application and the control uses events to continuously pass data to the .NET application the result is that memory is allocated b...more >>

ISymWrapper and System.NotSupportedException
Posted by Mike McPhee at 7/7/2004 2:08:08 PM
There seems to be a lot of calls to ISymWrapper that return System.NotSupportedException. Here are some examples: SymDocument.SourceLength SymDocument.GetSourceRange SymDocument.HasEmbeddedSource SymReader.GetNamespaces .... So far, the ISymWrapper as been a pain to use because of lack o...more >>


DevelopmentNow Blog