microsoft.public.dotnet.framework.clr Archive - July 2003
Post a message to this list
Messages
Page: 12
static class constructor constraints (2 replies)
microsoft.public.dotnet.framework.clr
Hi, I am wondering about the following line in the "Constraints" section of the "Static Class Constructors" chapter of the Managed Extensions for C Specification: A class constructor shall not directly or indirectly create any objects of its class type. How literally should this be taken? Some of my co workers take this to mean "It's OK to create an instance of a class in that class' class constru...
Code and data Segment of a DLL (4 replies)
microsoft.public.dotnet.framework.clr
Hi All, I have a quesion regarding the size of the DLL and the memory foot print (memory consumed after the dll is loaded) by the process. Are they inter related in .Net? How is it different than a Windows dll. Is the code segment of a .net dll shared among different .net processes as the case with windows dll? Regards Gnanavel
CLR and Type Constructors (2 replies)
microsoft.public.dotnet.framework.clr
On page 188 of J.Richter's Applied MSFT .NET Framework book he states ""The CLR guarantees only that a type constructor has started execution it can't guarantee that a type constructor has completed execution. This behavior was necessary to avoid deadlocks in the unusual case when two type constructors reference each other." Does this mean that instance constructors are blocked until completion or...
Custom Menu Shortcuts (2 replies)
microsoft.public.dotnet.framework.clr
How can I assign custom shortcuts to menu items? (For example, Alt Enter, Shift A, etc.)
ILDasm and Reflection (3 replies)
microsoft.public.dotnet.framework.clr
It is easy to check that ILDasm has not been built using .NET (just try to dissassemble itself), so ILDasm.exe may not be using the Reflection API. The question is: even in the case that ILDasm would use the Reflection API, how is it possible to get this: (as generated from ILDasm) ldstr ... call valuetype [System.Windows.Forms]System.Windows.Forms.DialogResult [System.Windows.Forms]System.Windows...
data between applications. (5 replies)
microsoft.public.dotnet.framework.clr
here is the scenario: I have windows service and "standard" windows forms applications. what kind of methods there is to share data between those applications? Applications will be in same machine, so any remoting is futile. Are there similar stuff like shared memories in linux in .Net framework? I would like to chance just some numeric data between applications and if possible send objects. How c...
"Where-ref bind" in fusion log (2 replies)
microsoft.public.dotnet.framework.clr
Can someone please explain what this refers to? I have no idea how it's being set. For example: LOG: Where ref bind. Location C:\Documents and Settings\jkey\Desktop\secret\anotherSecret LOG: Appbase D:\DOCUME~1\Jeff\LOCALS~1\Temp\secret\bin\Release LOG: Initial PrivatePath W:\secret\Authoring\anotherSecret\Loader\ Project\bin\Debug\ I'm settining appbase and privatepath, but NOT setting the "where...
custom Serialization & classes derived CollectionBase (Framework 1.1) (2 replies)
microsoft.public.dotnet.framework.clr
I am having a problem with .NET Framework v1.1, where it doesn't seem to like custom serialization with classes derived from CollectionBase. It basically NULLS out all contained objects when retrieving... The following code works fine in .NET Framework 1.0, but does not in .NET Framework 1.1 (when added to a class derived from CollectionBase): public ListDerivedFromCollectionBase (SerializationInf...
Problem: InstallUtil & Windows Services Reports Error (2 replies)
microsoft.public.dotnet.framework.clr
I have encountered a problem with CLR1.1/VS.NET 2003 where I cannot install a service. I think I have isolated the problem as being CLR1.1/VS.NET 2003. I have both 1.0/2002 and 1.1/2003. To isolate the problem I did the "building a Service walkthrough" in both products. 1.0/2002 works as expected. 1.1/2003 reports the following when trying to install the service using the InstallUtil utility. "No ...
Dispose and Object References (2 replies)
microsoft.public.dotnet.framework.clr
Hi Consider the following: //create and fill dataset objDs [...] // create XmlDataDocument XmlDataDocument objXDD New XmlDataDocument(objDs) // dispose dataset objDs.dispose(); objDs null; What happens to the XmlDataDocument? Is there a reference to the objDS to objXDD? Or will the instanciation of the XmlDataDoc contain all the information that the dataset had and live on without failure? Rgds //...
Multiple Compiler Support in .NET (3 replies)
microsoft.public.dotnet.framework.clr
Does .NET support multiple languages within same project / Solution? If Codebehind needs to be C# and UI as VB.NET what is the effective solution offered within IDE? I tried to compile using support for Multiple Compilers within Compilation Element of Web.Config file as follows, but it doesnt seem to understand: compilation defaultLanguage "C#" debug "true" compilers compiler language "VB" extensi...
Q: non-blocking console read/should BeginRead block? (2 replies)
microsoft.public.dotnet.framework.clr
Hi, What is the easiest way to implement a non blocking read on System.Console.In? I have tried to get at the stream using stdin System.Console.OpenStandardInput() and then do iasyncresult stdin.BeginRead(...), check iasyncresult.IsCompleted etc. Unfortunately, the "asynchronous" call stdin.BeginRead blocks if there is nothing to read, so I do not get the non blocking behavior. Is this the correct...
Cannot serialize Exception (2 replies)
microsoft.public.dotnet.framework.clr
I am having trouble serializing an exception. I get an InvalidOperationException exception: There was an error reflecting 'System.Exception'. where the InnerException is another InvalidOperationException: The property 'Source' on type 'System.Exception' cannot be serialized because it is decorated with declarative security permission attributes. Consider using imperative asserts or demands in the ...
Passing objects between AppDomains (2 replies)
microsoft.public.dotnet.framework.clr
Hi all, I need to extract type information from an assembly and unload the assembly to prevent it from locking. So I create separate application domain, explore the assembly via Reflection in this domain (this results in building a hierarchical data structure containing the information about the types in the assembly) , and unload the domain. The question is what is the best way to pass the data s...
Question about classes that derive from a synchronization attribute class. (2 replies)
microsoft.public.dotnet.framework.clr
I have a class that derives from a base class that has the Synchronization attribute applied. Will the methods in my derived class also be synchronized or do I also have to put the Synchronization attribute on the derived class as well? // Context bound type with the Synchronization context attribute. [Synchronization()] public class SampleSyncronized : ContextBoundObject { // A method that does s...
Dynamically calling a native method? (3 replies)
microsoft.public.dotnet.framework.clr
Hello, What's the easiest way to dynamically call a native method? Right now I'm thinking about emitting a dynamic assembly and defining a PInvokeMethod there, but isn't there a better way? Thanks, mike MVP
Delegate type compatibility: There is no polymorhic possibilities (3 replies)
microsoft.public.dotnet.framework.clr
Hi to All, Is delegate type compatibility exists? The conventional type compatibiliy is about "is a" relation. If class Apply is descendant of class Fruit, then U can use and Apply tpye expression anywhere where Fruit is excepted. (because of Apple "is a" fruit) But what about delegates. Delegates do not descend from each other, instead of their parameters in their signature do. For example consid...
Return string from Fortran Dll back to C#. (2 replies)
microsoft.public.dotnet.framework.clr
Dear all: My C# program need a string returned from a Fortran Dll. The Fortran Dll is like this: SUBROUTINE REDO(s) !DEC$ ATTRIBUTES DLLEXPORT::REDO, C CHARACTER*(*) s !DEC$ ATTRIBUTES REFERENCE :: s s 'Let them talk, now!'C END And I use C# PInvoke to call it, the client code like this: public class BackString { [DllImport(@"BackString.dll", EntryPoint "REDO")] public static extern void REDO(stri...
How unmanged code works ? (6 replies)
microsoft.public.dotnet.framework.clr
Hello, I have written this code and I don't understand how its work : #include windows.h #undef MessageBox #using mscorlib.dll #using "System.Windows.Forms.dll" #include tchar.h int tmain(void) { System::Windows::Forms::MessageBox::Show( "Hello from .NET" ); ::MessageBoxA( 0, "Hello from Win32", "", 0 ); return 0; } Ok for the first MessageBox call : it is managed by the CLR. But the second ... wh...
How to use MethodInfo.Invoke with a variable arguments list? (3 replies)
microsoft.public.dotnet.framework.clr
I have a method with a variable number of parameters (in C#, uses the "params" keyword) which I need to invoke via reflection. I'm able to do this with the following call to Type.InvokeMember: result aType.InvokeMember(aMethodName, BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod, null, anInstanceOfTheType, someParameters); But I can't figure out how to do the same using Met...
IL coding question (9 replies)
microsoft.public.dotnet.framework.clr
I am curretly porting an open source language www.harbour project.org to ..NET. I have the following IL coding question, hopefully someone may provide me some guidance: I have some objects ("object" type) placed at the stack. Then I need to create an ArrayList and pop those objects from the stack and add them to the array. i.e.: ldc.i4.s 123 box [mscorlib]System.Int32 ldc.i4.s 456 box [mscorlib]Sy...
References (4 replies)
microsoft.public.dotnet.framework.clr
Greets, To view the file in question: http://www.lookwrite.com/software/DataAccess/ get the SqlDbBase.vb file. To use it... Dim Data As SqlDbBase New SqlDbBase(connStr) Dim X As Integer 0 Data.Parameters("@RecordCount", SqlDbType.Int, ParameterDirection.Output, 4, X) Data.CommandType CommandType.StoredProcedure Data.CommandText "sp TestProc" Data.ExecuteNonQuery() ** X Data.GetParameter("@RecordCo...
Memory Mapped files support (6 replies)
microsoft.public.dotnet.framework.clr
Hi everyone. I'd like to know it the framework supports the use of memory mapped files to do some IPC between managed code and, let's say, a native application. I'd like to create a mapped file to communicate between this application and the .Net code. I know that there are better approaches, but I'd like to know if this is possible, and, if so, if you could point me to some example code. Thanks i...
Can multi-app listen on the same socket port (3 replies)
microsoft.public.dotnet.framework.clr
i need to receive udp datagram on port 1900, but the port is in used by other application. the code : new UdpClient(1900) fail! so ,what should i do ? please help me ,thank in advance.
Performance and Dispose (7 replies)
microsoft.public.dotnet.framework.clr
Hello, Sometimes some people have recommened that if an object provides Close and Dispose, or provides Dispose, but doesn't use unmanaged resources, that calling Dispose isn't necesary. However, if an object has a finalizer, won't there be a performance impact of not calling dispose because the object will go from gen0 to gen1 since it's on the finalize queue? Since Dispose should call SurpressFin...
Ad
Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification