microsoft.public.dotnet.framework.clr Archive - May 2002
Post a message to this list
Messages
Page: 12
System.Net.WebClient should remember cookies (5 replies)
microsoft.public.dotnet.framework.clr
The System.Net.WebClient class is convenient for making HTTP requests. Unfortunately, if I make an HTTP request with a WebClient and the response contains cookies, those cookies are not stored in the WebClient object and are not sent out with the next request I make from the same WebClient. Because I'm writing an application which needs to act like a Web browser and needs to send back cookies whic...
How to shutdown multi-threaded Windows Service? (4 replies)
microsoft.public.dotnet.framework.clr
I need to run non ending, repetitive processing as a Windows Service. This processing is implemented as method Execute of object MyClass (ie, Execute does not return to the caller). So in the OnStart of my Windows Service I instantiate MyClass and then invoke its "Execute" method on a thread: Protected Overrides Sub OnStart(ByVal args() As String) objMyClass New MyClass() myThread New System.Threa...
Separate thread in a WEB response Threading (3 replies)
microsoft.public.dotnet.framework.clr
I have a C# web application where I need to send e mail. Because this takes a long time and would delay the response back to the client I have put the actual send in a separate thread using the following code: MailSender oMailSender new MailSender() ; Thread oMailThread new Thread(new ThreadStart(oMailSender.SendSmtpOutBox)) ; oMailThread.IsBackground true ; oMailThread.Start() ; Does anyone know ...
Boxing/unboxing question. (5 replies)
microsoft.public.dotnet.framework.clr
Hi All, I am trying to make a simple function that accepts an object as argument and converts it to the double value. The only rule is that: if the argument is not a "castable to double" boxed value type the function throws, all "castable" are unboxed and returned as a double. I could not produce anything batter than this ugly code: double ConvertToDouble(object obj) { Type type obj.GetType(); if ...
Filtros Isapi (5 replies)
microsoft.public.dotnet.framework.clr
Hola grupo: Tengo un pequeño sitio al que necesito proteger con contraseña. El acceso que quiero utilizar es el de windows, es decir que el IIS controle si los usuarios estan registrados en el servidor. Actualmente cuando intento ingresar al sitio, me aparece una ventana gris de Windows que me requiere el nombre de usuario y contraseña, pero desearia cambiarla por una pagina Html que me requiera e...
Is it possible to enumerate AppDomains ? (4 replies)
microsoft.public.dotnet.framework.clr
Hi, Is it possible to enumerate the AppDomains currently executing and list the loaded assemblies in each ? Thanks for your time.
Address of first element of an array (2 replies)
microsoft.public.dotnet.framework.clr
Hello, I'd like to know how to compute the address of the first element of an array, without using ldelema. 'arr' is a int32[] array, saved to after a newarr ldloc 'arr' call void [mscorlib]System.Console::'WriteLine'(int32) gives me: 12855900 ldloc 'arr' ldc.i4.0 ldelema int32 call void [mscorlib]System.Console::'WriteLine'(int32) gives me:12855908 8 bytes more than the value of the first element...
Event (4 replies)
microsoft.public.dotnet.framework.clr
I want an event being handled only once, then disconnect the event process function from an event, is it possible? example, I want to handle the click event of a button only once, btn Sample.Click new EventHandle(btn Sample Click); private void btn Sample Click(object sender, EventArgs e) { // doing something.... // then I don't want to handle this event again, and I don't want to use // programmi...
MAJOR Try...Catch...Finally BUG! (6 replies)
microsoft.public.dotnet.framework.clr
I have found what seems to be a MAJOR bug with VB.NET's structure error handling when working with XML types. I have confirmed that I can cause this behavior on different systems. Has anyone else run across this? Try the following code in a new Console Application: Option Strict On Imports SystemImports System.Xml Module Module1 Sub Main() Dim testXML As XmlDocument New XmlDocument()Dim steps As X...
string Operation (2 replies)
microsoft.public.dotnet.framework.clr
Does .net Framework provide a string operation like Format method in CString in VC ? CString str; str.Format("i %d, j %d, k %d", i, j, k); can .net framework do the same thing as CString.Format method? ZhangZQ
Problem enumerating derived classes (probably missing the obvious) (2 replies)
microsoft.public.dotnet.framework.clr
Hey all, I've got a class "clsDictionaryItems" that inherits NameObjectCollectionBase. I want to make a strongly typed collection that holds instances of "clsDictionaryItem". Populating the collection is no problem, and I can enumerate using "For x 0 to DictionaryItems.Count 1", but when I try to use Dim l clsDI as clsDictionaryItem For Each l clsDI In DictionaryItems .... Next I always get an Inv...
SSL Support? (2 replies)
microsoft.public.dotnet.framework.clr
Hi. The only mention of SSL support that I could find in the documentation was with WebRequest. It seems to suggest that if the URI starts with "https", it automatically uses SSL. (So, I'm not sure if it should really have pertained to HTTPWebRequest instead. Anyway...) What if my connection is not HTTP based? Is there an exposed independent SSL class that I can use and that somehow didn't make it...
System.Threading.Thread object not getting garbage collected (2 replies)
microsoft.public.dotnet.framework.clr
I've been profiling some stuff with a third party tool and with the allocation profiler from www.gotdotnet.com. When I create a Thread object it doesn't seem to get garbage collected the profilers indicate that it remains on the heap after it has gone out of scope. Once the Thread object goes out of scope, there are no references to it, and I would have thought it would be garbage collected. I've ...
System.Reflection.Emit ldc.i4.s and NOPs (2 replies)
microsoft.public.dotnet.framework.clr
Hello, I'm using Reflection.Emit to emit a dynamic assembly (console app). Each time I use ldc.i4.s, it generates 3 NOPs afterwards. Take a look at this: IL 000b: ldloc.0 IL 000c: ldc.i4.s 20 IL 000e: nop IL 000f: nop IL 0010: nop IL 0011: add I'm just adding two things, yet it puts three NOPs in between the ldc and the add... why? Thanks, Mike
calli on numeric constant (5 replies)
microsoft.public.dotnet.framework.clr
Hello, I'm seeing something very interesting. I copied the value of a ldftn result, and pasted it into another assembly: ldstr "Amazing." ldc.i4 0x79b8959b calli void(string) This calls Console.WriteLine with "Amazing." I'm seeing that the constant 0x79b8959b always goes to Console.WriteLine (I tried a different assembly, that even had different references..., haven't tried Mono yet...). Is this c...
C++ with /CLR Runtime Exception _IMAGELIST (2 replies)
microsoft.public.dotnet.framework.clr
I have an application that: 1. When I compile without /CLR works beautifully 2. When I compile with /CLR, at runtime, gives me a TypeLoadException saying that it is unable to load IMAGELIST. When I look up IMAGELIST, I find that it only has a forward declaration in comctl.h as struct IMAGELIST, but it doesn't appear that it is ever actually declared. Any ideas on how to get around this? Thanks in ...
Wierd error message... (2 replies)
microsoft.public.dotnet.framework.clr
I have an application that is written in C# but has a unmanaged/managed C portion that controls data access. I have recently changed this layer to include nullability in the get methods from the managed C layer. To this end I am using System::Data::SQLTypes instead of their System counterparts. The problem I am having is I get an exception thrown when the following method is called: SqlTypes::SqlI...
C++ with /CLR Runtime Exception (Part II) (2 replies)
microsoft.public.dotnet.framework.clr
Ok, we got past one System.TypeLoadException() for IMAGELIST by adding: struct IMAGELIST {}; to one of our header files, but know we are running into a problem that produces the same exception: Our application consists of 20 or so DLL's that export C classes. One DLL contains a class not unlike the following: class X { public: Data* GetData(void); void SetData(Data* data); private: Data* data; }; ...
Intercepting file systems calls (3 replies)
microsoft.public.dotnet.framework.clr
Hi, I am developing a security framework in C# and I need to intercept file system calls, of any aplication written in C#. How can I see an access to a file, performed by an application? I know that the Security Manager and the System.Security.CodeAccessPermission.Demand() calls a Check () method every time a file is read. May I have access to this Check() method? Thank you very much, Pedro Dias.
Multiple cpblks failure? (5 replies)
microsoft.public.dotnet.framework.clr
Hello, I have a program written in IL (directly from Reflect.Emit, not compiled from another language). In one section, I do many cpblk, and then check the values compared to what they should be. The copy copies from a static field (raw data) into a temporary space, and them from one place in the field to another, and then from the temp into the data again (a swap). It works well until the 10th se...
dynamic assemblies (2 replies)
microsoft.public.dotnet.framework.clr
Can anyone give me an example of a dynamic assemblie, or documentation? Thanks
Call methods of dynamically loaded classes via interface? (3 replies)
microsoft.public.dotnet.framework.clr
I need to implement "plugin" components for an application that all implement a specific interface and are loaded dynamically during the execution of the application. The interface part, I think I understand, sort of. The dynamic loading part, I think I understand, vaguely. I can't figure out how to glue them together, probably due to the "sort of" and "vaguely" problems mentioned above. All examp...
System.InvalidProgramException in production /CLR (2 replies)
microsoft.public.dotnet.framework.clr
After a great deal of help from MS, we were able to get our application to compile and run well with /CLR in DEBUG. But trying to execute the program compiled for PRODUCTION yields at least one DLL that throws the System.InvalidProgramException. I need to get this application built and running with /CLR in production as soon as possible. We are evaluating the possibility of a slow conversion to C#...
Convert (2 replies)
microsoft.public.dotnet.framework.clr
Does .net Framework provide a simple mechanism to convert a string to byte[]? ZhangZQ
Shifting 1MB up one byte (8 replies)
microsoft.public.dotnet.framework.clr
Hello, Since cpblk doesn't work reliably on overlapping areas, how would I shift 1MB or so of data up one byte in memory? Must I make a temporary buffer to do this? On a related note, if I localloc too much, can that cause a stack overflow? I had a problem once like that but never completely tracked it down... Thanks, Mike
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com