all groups > dotnet clr > january 2005
Filter by week: 1 2 3 4 5
Urgent : Event Handling in Visual Studio Extensibility
Posted by Pravin at 1/31/2005 3:17:02 AM
Hi Friends,
I'm working with Visual Studio Add-Ins. Using Visual Studio Extensibility
(EnvDTE) I have disabled the context-menu (right-click) mouse event of
deleting a project item. But I'm unable to lock/disable the Keyboard events.
If I select an project item and press the "Delete" key in... more >>
uniqueness of id's in .locals init
Posted by u_int32_t at 1/31/2005 12:18:30 AM
I have come across an example where the following compiles in ms.net:
..locals init([0]unsigned int8 _loop_param,
[1]unsigned int8 _loop_limit,
[2]unsigned int8 _loop_param,
[3]unsigned int8 _loop_limit,
[4]unsigned int8 _loop_pa... more >>
What does RuntimeFieldHandle do for me?
Posted by darndt at 1/29/2005 2:37:02 PM
Given a FieldInfo object, is there any way to get a reference to the object
that the FieldInfo describes?
In other words:
FieldInfo aFieldInfo = aObject.GetType().GetField( "myTextBox" )
Now... how to I get the actual TextBox object that the FieldInfo describes?
I can't see any obviou... more >>
Get PropertyInfo via FieldInfo?
Posted by darndt at 1/29/2005 1:33:01 PM
Given a FieldInfo for a given instance variable, how can I then get
PropertyInfo for a member of that object (assuming a type)...
To illustrate:
DoReflectionTask( object theForm, string theField )
{
/// Get the field info for a field on the form object
FieldInfo afi = theForm.G... more >>
Adding an event handler using reflection?
Posted by John Dumais at 1/28/2005 1:15:38 PM
Hello,
I'm trying to create an application that can allow users to extend the
menu by supplying the event handlers in their own libraries. My first
thought was to use reflection to specify the event handler, something
like this...
// The user's assembly has already been loaded and we have... more >>
server gs vs workstation gs
Posted by Zeng at 1/28/2005 9:43:36 AM
I just realized that there are 2 modes for garbage collection modes: server
gs and workstation gs. Would someone know how I can go about changing the
mode for my web application written in C#? I want to make sure it's using
server gs mode. Thank you for any comment or advice.
-zeng
... more >>
calling ADSI from WebApp
Posted by johnny at 1/28/2005 1:13:02 AM
Hello, I got this weird problem. I have an intranet application that needs to
communicate with Active directory. Authentication to Web application is done
by means of active directory accounts.
Now I have this code:
DirectoryEntry objDomain = new DirectoryEntry("LDAP://rootDse");
string d... more >>
bytecode verifier vs. delegates
Posted by George at 1/26/2005 9:33:09 AM
Could anyone help me in the following problems?
The ECMA standard states the following concerning the delegate constructors:
"The verification algorithm shall require that one of the following code
sequences is used for constructing delegates; no other code sequence in
verifiable code shal... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Primitive Type Definition
Posted by Ice at 1/25/2005 1:07:53 AM
All -
Up till now (at least in my opinion) the definition of a primitive type has
been at a language level. You can refer to this definition on msdn at
ms-help://MS.NETFrameworkSDKv1.1/vblsnet/html/vblrfVBSpec6_2.htm
However, in reading Jeffrey Richters book (Applied Microsoft .NET Framewor... more >>
custom memory allocator.
Posted by Z. Cristi at 1/24/2005 6:27:01 AM
Hell All.
The C# programming language does not allow the overloading of the
new operator. I'm interested if there is some mechanism through which
I can instruct the CLR to use a different memory allocation routine
than that called by default by the runtime.
Thx
Z. Cristi
... more >>
Calling a private base constructor from within a constructor in MSIL
Posted by Kemal Erdogan at 1/23/2005 11:58:21 AM
Hello All,
I am trying to implement proxies for a certain group of classes, using
System.Reflection.Emit. Subclassing works fine as long as the base class
have a non-private default constructor.
Here is a part of my code:
ConstructorInfo ci = basetype.GetConstructor(ALL_INSTANCE_METHODS,
... more >>
Thread and Console.WriteLine
Posted by enki at 1/23/2005 11:07:03 AM
Hi all software cowboys,
this may be dumb question, but I can't find answer in help. I have main
windows service, which calls multiple background threads. I have many calls
Console.WriteLine to trace their steps, but in output window appears "thread
threadname exited with 0x0". It's fine, I a... more >>
Can I SET InitOnly(readonly) attribute in FieldInfo ??
Posted by Dmitri Sazonov at 1/21/2005 6:15:42 AM
Hi
I need to be able to pass const parameters to function.
And I'm using reflection to get class (which I will when
pass as parameter) and I'm using FieldInfo.SetValue to
set that's class fields.
So, best way to acheve constness, will be to set change
FieldAttributes of that field. I need ... more >>
CSC.EXE Compiler Error when /Lib switch have path with space
Posted by Pratik Mehta at 1/19/2005 1:17:06 AM
Hi Friends,
I am facing trouble with dynamically compiling C# source files. Here is the
example:
Following command works:
csc.exe /out:test.dll /target:library /r:system.dll,Infineon.FD.Repository.S
hared.dll
/lib:E:\Pratik\FD\SourceCode\RE_TB\GUI\REGUI\bin\Debug\RepositoryBin\
test.cs
... more >>
Method header alignment
Posted by mps at 1/18/2005 10:05:07 AM
According to Partition II (and several other documents) method headers are
supposed to be aligned. However, examining a hex dump of
System.Messaging.dll shows the following tiny method headers (Surrounded by
*'s).
0013300 00 00 00 00*36*02 28 2f 00 00 0a 03 6f 30 00 00
0013320 0a 2a*3a*02... more >>
GCHandles - are there any "special" GCHandle values?
Posted by Bern McCarty at 1/18/2005 9:12:58 AM
Currently, when I use a GCHandle member I declare another boolean member to record whether or not
the GCHandle is in an allocated state. I do this because I don't see anything in the documentation
anywhere that leads me to believe that you can avoid it. In order to know if a handle needs freeing
... more >>
Accessing GC section metrics
Posted by John Lemire at 1/17/2005 1:33:06 PM
Hi,
I would like to know if there is a way to access the section metrics to
programatically query the same data that sos reports via the eeheap -gc
command. I would like to access this from managed code ideally through the GC
class or the the System.Diagnostics class. Some what less ideal al... more >>
.data segments and accessing idividual bytes in bytearray declerat
Posted by James Moore at 1/16/2005 11:21:02 AM
Hi,
I am currently working on a compiler and generating order preserving perfect
minimal hashes, since the generated hash tables are availible at compile
time I have been trying to embed these into the data segment of my IL file
but when the test program is run I get the following exceptio... more >>
Threading and CPU Registers
Posted by herbert at 1/15/2005 11:25:02 PM
Is it true that CPU registers are not saved and restored on a switch between
threads of the same process?... more >>
When do assemblies get loaded
Posted by AndrewEames at 1/14/2005 9:21:01 AM
I'm trying to understand when assemblies get loaded (in particular so I can
gain a better understanding of how security works)
I have a .exe which references half a dozen other assemblies. If I put a
breakpoint in the first line of Main, I can see that one of the referenced
assemblies has b... more >>
WindowsIdentity._GetCurrentToken() Access is denied
Posted by Robert Phillips at 1/13/2005 2:27:32 PM
I periodically get an ApplicationException "access is denied" in the
WindowsIdentity._GetCurrentToken() method. Reflector shows the
_GetCurrentToken() method as
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern IntPtr _GetCurrentToken();
which i believe means it is an i... more >>
How to write array of doubles to stream without using a loop?
Posted by John Dumais at 1/13/2005 10:04:44 AM
Hello,
I have been trying to figure out how to write an array of doubles (in
this specific case) to a binary stream without using a loop. What I
have been doing is...
foreach(double d in TraceData)
{
instanceOfBinaryWriter.Write(d);
}
The loop is introducing overhead I don't want. ... more >>
Assembly resolving
Posted by AndrewEames at 1/13/2005 8:45:07 AM
I have a piece of code that is reading resources out of a loaded assembly
that goes something like this...
Stream stream = assembly.GetManifestResourceStream(resourceName);
using(ResourceReader reader = new ResourceReader(stream))
{
...
Now the ... more >>
aligned to the natural size? invalid address?
Posted by George at 1/13/2005 8:17:04 AM
Could somebody help me with answers at the following problems:
ECMA standard states that "initblk assumes that "addr" is aligned to the
natural size of the machine". What does this "alignment" means in a low-level
memory view?
1. Does it mean that, for example, on a 32-bit machine "addr" i... more >>
Asynchronous I/O
Posted by Jim Mischel at 1/13/2005 7:55:06 AM
I guess I'm confused about how to use the asynchronous I/O capabilities in
FileStream (BeginRead, EndRead, BeginWrite, EndWrite). The methods work in
that they actually transfer the data, but things don't appear to be happening
asynchronously. And, yes, I'm telling the FileStream constructor... more >>
MIME parser
Posted by Himanshu at 1/12/2005 10:43:05 AM
I am looking for support for parsing and generating a mime stream in
CLR. One of the scenarios which will better explain my requirements is
User types some data in an HTML enabled text control. I take this data and
converty it into multipart mime message and store the multipart mime message
... more >>
help! generic CIL instructions
Posted by George at 1/12/2005 8:45:05 AM
I would have a few questions concerning the generic instructions such as
"add", "div", "rem".
When a "div" is performed for two values on the stack, the result depends on
the operands' types. So a "div" needs to know the types of the operands:
int32, int64, etc. How does "div" know these ty... more >>
Assembly problem in IL DLL (peVerifiy)
Posted by MalteseFalcon at 1/12/2005 3:31:03 AM
Hello
I am writing a small dll in .NET. ILasm is compiling with no errors.
However, peVerify is giving me the following error:
Microsoft (R) .NET Framework PE Verifier. Version 2.0.40607.16
Copyright (C) Microsoft Corporation. All rights reserved.
Could not load type '' from assembly '... more >>
static blocks and threading
Posted by Luis Fajardo at 1/11/2005 12:25:04 PM
I want to know if I should worry about threading if I open a file
(read/write) within a static block?
Thanks... more >>
Iterators in .NET 2.0 Nov '04 CTP
Posted by Mujtaba Syed at 1/9/2005 5:00:02 PM
I have the Nov '04 CTP of .NET 2.0 (The splash screen of Visual Studio .NET
calls it Beta 2).
I was trying some simple iterator code...
using System.Collections.Generic;
public class CityCollection : IEnumerable<string>
{
string[] m_Cities = {"New York","Paris","London"};
public ... more >>
Garbage Collection/OutOfMemory Exception 2
Posted by ronald NO[at]SPAM calleva.com at 1/8/2005 1:50:45 PM
Follow up to previous 16 message thread. Real world example of how
Garbage collector completely messes up machines and fails
comprehensively to collect Garbage with out prompting.
The Garbage collector is designed and optimised for Client based
applications where there are regular pauses in u... more >>
Dynamic Load Assembly
Posted by BrianS at 1/6/2005 9:49:02 AM
I have Web Service (A) that dynamically loads a private assembly (B). I do
NOT reference B in A. ( I do reference A in B, but that should not matter?).
Both these Assemblies reside in the A's /Bin.
I dynamically load B and Invoke a Method:
'Create evidence for the new appdomain.
Dim adevi... more >>
Scripting Engine (somewhat advanced)
Posted by John Puopolo at 1/6/2005 9:14:39 AM
All:
I am writing an application (.NET 1.1/C#/VS.NET 2003) that would benefit
from having a scripting language as part of the program - much like VBScript
can be used in Excel to automate it.
I would like to use Javascript as the scripting language.
Any idea how I would go about solving t... more >>
"Cannot access a disposed object" - weird exception.
Posted by bajy NO[at]SPAM intizen.com at 1/5/2005 6:26:54 PM
Hi,
//SITUATION
I got a panel control that hold a certain position on a form.
Every controls or UIs are on this panel.
At certain situation, I called dispose() method of this panel control
and change it with other panel which contains other business logic and
UI controls.
//ACTUAL CODE... more >>
Unexpected integer addition result
Posted by Pmcg at 1/5/2005 9:41:08 AM
If i add a number to an int which gives me a value > int.MaxValue i get a
negative number, i would have expected an overflow exception, is this
expected behaviour, can't see this in the SDK
For the following console app i get
-31789
-2147482669
-9223372036854774829
using System;
publi... more >>
Attributes question
Posted by martin_aliger NO[at]SPAM myrealbox.com at 1/3/2005 1:52:31 AM
Hi all,
is there any way how to access type which is decorated with mine
attribute within that attribute?
E.g.
[MyAttr]
public class Whatever
{
}
[AttributeUsage(Class)]
public class MyAttrAttribute : Attribute
{
MyAttrAttribute()
{
Type t = .... //want to get ty... more >>
Is Whidbey the beginning of the end for the developer ?
Posted by Fresh_Air_Rider NO[at]SPAM Hotmail.com at 1/1/2005 8:57:28 AM
Hi Everyone
I have just been getting up to speed on the forthcoming ASP.Net 2.0
(Whidbey) that Microsoft is releasing some time this year.
It all looks great but I was a bit concerned that it aims to reduce
the amount of code that needs to be written by the developer by 70%.
The new GridV... more >>
|