all groups > dotnet clr > november 2004
Filter by week: 1 2 3 4 5
Can a Publisher Policy Redirect Dependent Assemblies?
Posted by Kim Johnson at 11/30/2004 4:19:16 PM
Our software, which installs to the GAC, is dependent on third party
software which can be installed separately. To alleviate some of the
coupling between our version and the third party version, we're looking at
using configuration or policy files to redirect between versions known to
work wit... more >>
CLR Memory Footprint
Posted by Eric Smith at 11/30/2004 3:16:09 PM
I'm working on a project that integrates with Office and the Windows shell.
Right now we have add-ins for Excel, PowerPoint, Word and Outlook, and a
couple of shell extensions for Windows Explorer, all written in C++.
We're at a point where we want to overhaul some of this stuff, so we're
c... more >>
Sandboxed appdomain opening winforms
Posted by Kirk Jackson at 11/30/2004 3:01:07 PM
Hi,
I'm having trouble running untrusted code inside a sandboxed AppDomain, and
I was hoping that someone could help me!
The code is user-supplied, and so I want my Winform application to run the
code in a seperate AppDomain without any more permissions than given in the
Internet permiss... more >>
DateTime
Posted by Viorel Ghilas at 11/29/2004 4:38:44 PM
Hi all
I have some trouble. I hava configurable date format, for ex. like this
'yyyyMMdd' and I try to convert strings to date time, and .net give me an
error 'string is not recognized as a valid DateTime', my code is:
DateTimeFormatInfo df = new DateTimeFormatInfo();
df.DateSeparator = str... more >>
How prevent the crash and exit gracefully?
Posted by Boris at 11/29/2004 3:37:03 PM
I notice the following strange behavior of the applications running under
..NET Framework.
Let say I have application MyApp.exe which reference assembly MyAssembly.dll.
The MyAssembly.dll is strong named assembly, which is installed in the GAC.
I notice that if MyAssembly.dll is not installe... more >>
AppDomain.CurrentDomain.ProcessExit && CTRL-C
Posted by Stephen Gennard at 11/29/2004 11:33:47 AM
Hi,
My console application needs to do some shutdown processing even when a
CTRL-C is pressed. So I installed ProcessExit event handler and was
surprised to find this did not get invoked when a CTRL-C occurs.
I then set about using the Win32 API to install a console ctrl handler t... more >>
Can't import .OCX assembly into Web Matrix Project.Hi,
Posted by Jason Robertson at 11/29/2004 2:33:41 AM
Hi,
I am using Web Matrix Project as .NET programming environment. Can you show
me detailed steps how to import the .ocx library into the Web Matrix
Project. I can't seem to be able to import other assembly than .dll, .exe or
..mcl . I am pretty new to the .NET programming environment, and ma... more >>
How to replace a object in place?
Posted by Lei Jiang at 11/28/2004 7:43:26 PM
For example :
class A
{
int a;
}
class B : A
{
int b;
}
There are a lot of instance of A in a system(this means there are a lot of
reference to A), and I want to replace all A with B at runtime and make all
references originally point to A now point to B.
These problem ca... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to find all keys map to a object in a Hashtable?
Posted by Lei Jiang at 11/28/2004 6:25:04 PM
Sometimes there are several keys map to the same object in the hashtable.
How to find them quickly given the object?
... more >>
Basic GAC question...
Posted by Paul Mason at 11/26/2004 12:55:02 PM
Hi folks,
I was under the impression that once you had loaded an assembly into the
GAC, that you didn't have to make specific reference calls to the assembly
in another assembly. I was under the impression that this was the way you
extended the .net framework.
I've just done a little ... more >>
PE COM+ Header [???]
Posted by Nadav at 11/24/2004 5:53:14 AM
Hi,
Introduction
*****************
I am writing a file system scanner ( similar to unvisus apps ), this require
me to 'check' each file on the file system, hence, I have to know the type of
executable being scanned regardless of it's extention.
The Problem:
*****************
Managed an... more >>
DateTime.Parse converts a UK format monetary sum into a date
Posted by James Higgs at 11/24/2004 4:17:06 AM
Hi group,
If you take the following code, the result is not, as one would expect, an
exception, but rather the string "01/12/0500"
DateTime dt = DateTime.Parse("£12,500", new CultureInfo("en-GB"));
Console.WriteLine(dt.ToString("dd/MM/yyyy"));
This also happens with a range of different... more >>
Get the status of a running application
Posted by Henning Krause [MVP] at 11/23/2004 2:45:01 PM
Hello,
is it possible to hook into a .NET program and get the Stackframe of the
currently executed method?
I know I can use the Process Class to enumerate the threads of an
application. But can I go any deeper than that?
Greetings,
Henning Krause [MVP]
==========================
Visit ... more >>
It's said that System.Enum is a reference-type ! ?
Posted by Lostinet at 11/23/2004 12:07:39 PM
Dear all :
Please check this:
http://msdn2.microsoft.com/library/system.enum.aspx
It said :
"Class Enum is derived from class ValueType; that is, Enum is itself a
reference type, not a value type."
Does that mean , because System.Enum is derived from System.ValueType , so
the System.Enu... more >>
url parameter
Posted by zbcong at 11/23/2004 11:10:01 AM
hello
how can i get the parameter "param" from the url
http://localhost/myapp/webform1.aspx?param=p1 in the serverside c# code?
thank you
... more >>
Printing a signature
Posted by Mike.Spertus NO[at]SPAM veritas.com at 11/22/2004 7:03:58 AM
Does anyone know of an (unmanaged) function to print a signature given
the sigblob or do I need to decode the sigblob myself?
Thanks,
Mike... more >>
assembly version compatibility
Posted by roland at 11/21/2004 4:47:19 PM
Greetings.
I have a few questions concerning the version compatiblity of assemblies.
Let me first depict the scenario:
I am a component designer, my customers are mainly people who design and
sell end-user applications.
I am using design-time licenses and my components are strongly named.
Now ... more >>
Different Casting C# - VB.NET?
Posted by herbert at 11/20/2004 10:57:04 AM
The following code in C# results in decimalPlaces = 6.
private static long frequency;
QueryPerformanceFrequency(out frequency);
decimalPlaces = (int)Math.Log10(frequency);
The code rewritten in VB.NET however results in
decimalPlaces = 7:
Private Shared frequency As Long
Call QueryPe... more >>
GAC Update without Publisher Policy?
Posted by Sandman at 11/19/2004 2:01:08 PM
I have an app that references a specific version of a dll in the GAC. If I
update that dll in the GAC, and only change the last number of the version,
the app doesn't seem to get the new version.
Since my app references a specific version, will I need a publisher policy
file to redirect the ... more >>
Loading svr build of CLR for my .net Windows Service
Posted by sunil NO[at]SPAM volcanomail.com at 11/19/2004 3:31:57 AM
Dear All,
I have a few questions regarding CLR Hosting...I have read a few
sites that explain them...but I still have some unanswered
questions...like...
1. Every process (.net app) loads its own CLR. Is this right?
2. I have a Windows Service that is installed on the my Clients
S... more >>
.override directive missing in manual COM interop...
Posted by Nathan Baulch at 11/19/2004 12:06:57 AM
I am so close to getting my manual COM interop classes to load correctly!
I have very slowly tracked down the problem to missing .override directives
on the classes in the IL generated from my assembly compared to that of
TlbImp.
I don't really understand why the directives exist in the first ... more >>
Rationale on double and single arithmetic handling
Posted by Dave Schmidt at 11/18/2004 2:38:40 PM
I am involved in a port of an engineering application to .NET.
While testing some of the math (using doubles), I was surprised to find
that in cases where you have an overflow or divide by zero etc..., the
result is set to a double.NAN or double.Infinity etc... rather then
throwing an Arith... more >>
MSI File format
Posted by Nadav at 11/18/2004 8:02:07 AM
Hi,
I am writing some kind of a file scanner, at certain time all of the files
under a certain directory will be scanned, this scan require de-compression
of common files formats such as ZIP and MSI, the ZIP file format is well
known so there is no problem of decompressing it manually, howe... more >>
C# enum and VB.NET enum conflict?
Posted by Edward Yang at 11/17/2004 6:17:28 PM
I found this problem when I reference gotdotnet user sample
Win32Security assembly in some of my VB.NET projects. The Win32Security
projects are written in C#.
For example, in Win32Security project, AccessType is a enum that is
defined as:
[Flags]
public enum AccessType : uint
And in... more >>
Microsoft namespace
Posted by Joe Abou Jaoude at 11/17/2004 2:03:30 AM
I was reading in the .Net Book of the MS Press, and they said that the
system namespace is the root of all namespaces and classes in the .Net
class library.
However I noticed the existence of the Microsoft namespace which is not
part of the System namespace.
So is the System namespace still... more >>
Calling user control from VBScript (managed and un-managed)
Posted by b.bardugo NO[at]SPAM gmail.com at 11/16/2004 4:58:09 AM
Hi all,
I have a C# user control (a little app I made to display video). In
this code I am using a third party .dll, which is written in C++
(un-managed). I am tring to put this control on a web page and somehow
the managed code is working OK but when it arrives the part of the
code where it is... more >>
ISymbolScope.StartOffset .EndOffset problem
Posted by Sacha Faust at 11/15/2004 4:19:17 PM
I'm trying to get the IL bytes for a specific method using the ISymWrapper
assembly.
To do so, I get the ISymBolMethod for the method I want and then access
the ISymBolMethod.RootScope property and get the start and end offset
When I do so, I get the right number of bytes but not the right byte... more >>
ECMA Mistake? - ArrayTypeMismatchException
Posted by George at 11/12/2004 2:11:02 AM
I've read in the ECMA standard for CLI that the "ldelem" instructions can
throw an "ArrayTypeMismatchException" "if array doesn't hold elements of the
required type". This is only for "ldelem.ref".
The same exception type can be thrown also by "stelem".
I don't really see how this exceptio... more >>
More JIT questions?
Posted by Kevin Burton at 11/11/2004 3:27:03 PM
I have a web service that uses an assembly and a Windows service that also
uses an assembly. If I ngen the assembly will both the web service and the
Windows service use the ngen'd image?
If the web service is running behind a clustering of web servers. I use ngen
to establish an image on e... more >>
JIT Time
Posted by Kevin Burton at 11/11/2004 2:37:03 PM
I have a web service that I suspect is having some JIT issues. I have not
proved it yet (and suggestions as to how to do so are welcome) but I suspect
that the delay (as long as 8-9 seconds) on the first invocation is due to
time spent in JIT. I was under the impression that once a method was ... more >>
.NET Security exception (???)
Posted by Nadav at 11/10/2004 2:34:05 PM
Hi,
I am writing an Obfuscator to Obfuscate managed .NET assemblies, the
obfuscator works with most of the assemblies I have tried, how ever, some
assemblies ( such as nunit-gui.exe ) generate the following exception ( Only
with the obfuscated assemblies ) :
“Request for the permission o... more >>
Disabling Download Cache?
Posted by Shelly G at 11/10/2004 6:56:09 AM
Over a year ago, Bill Menees asked the questoin, "Is there any way to
completely disable the download cache?" - answer was "no, but you can just
delete everything in it".
Is there any new info on disabling the download cache at all? Like Bill, I'm
running in to huge problems with debugging... more >>
Strange problem
Posted by Lars Olsson at 11/9/2004 5:38:37 PM
Ok, here is the situation:
We have a windows service A and a windows foms application B, both written
in
C#, compiled with .net framework 1.1
A starts autmatically at PC startup.
For various reasons, we want to launch B when the PC shuts down, without any
possibility
for end users to interf... more >>
getting parameter type from method signature
Posted by Sacha Faust at 11/9/2004 2:58:18 PM
I'm having a problems getting parameter types from the method signature when
the CorElementType I get is
ELEMENT_TYPE_CLASS or ELEMENT_TYPE_VALUETYPE.
For example, the type tokenid I'm suppose to be getting is 0x02000006 but I
always end up getting 6
Here is a code snippet of my code. Sig... more >>
Resizing an existing PE section
Posted by Nadav at 11/8/2004 1:43:02 AM
Hi,
Introduction:
******************************
I am trying to extend an existing section of a PE, in addition to updating
the ‘DataDirectory’ies and section RVAs I have to update the resources RVAs
and the import and IAT/INT tables RVAs, as for what was just mentioned
everything wor... more >>
'CorBindToRuntimeEx' an STAThread attribute
Posted by Nadav at 11/8/2004 1:42:02 AM
Hi,
I am using ‘CorBindToRuntimeEx’ To create a runtime host and execute an
assembly:
hr = CorBindToRuntimeEx(. . .)
hr = spICorRuntimeHost->CurrentDomain(&spUnk);
spIAppDomain = spUnk;
spIAssembly = spIAppDomain->Load_3(saRawPEImage);
.. . .
spIAssembly->EntryPoint->Invoke_3(vtMissin... more >>
Weak References - Performance Question
Posted by jamal NO[at]SPAM docUSA.com at 11/5/2004 8:47:59 PM
Could anybody provide me some tips regarding the performance of weak
references vs. strong references?
Thanks
... more >>
Binding policy
Posted by .NET at 11/3/2004 10:14:51 AM
My app binds to an assembly (version 1.0.0.0) which has a bug. I release a
new version (1.0.0.1) where the bug has been resolved. My app should bind to
the new version by default without me having to defining a binding policy.
It is not. Any ideas why?
As far as I know, if the build or the rev... more >>
indirect jump using MSIL
Posted by Darren at 11/2/2004 12:01:28 PM
I'm looking for a way to jump to a arbitrary opcode within a method. The
branch functions don't allow for indirection.
I'm looking at the calli and ldfn opcodes but I haven't found any examples.
Thanks.
... more >>
AppDomain Unhandled exception
Posted by Hagay Lupesko at 11/2/2004 11:54:26 AM
Hi,
It is possible to hook on the UnhandledException event in the Default app
domain, and that way get notifications about unhandled exceptions in all of
the threads in the win32 process, i.e. all of the App Domains.
Is there a way to know in which AppDomain the exception occured?
... more >>
Rotor Bug: TimeZone ToLocalTime
Posted by tbandrow NO[at]SPAM mightyware.com at 11/2/2004 11:00:22 AM
The following snippet is from CurrentTimeZone in Rotor.
//
// Converts the specified datatime to the Universal time base
on the current timezone
//
/// <include file='doc\TimeZone.uex'
path='docs/doc[@for="TimeZone.ToUniversalTime"]/*' />
public virtual Date... more >>
Exception Handling - help!
Posted by George at 11/2/2004 3:35:01 AM
My problem is related to the user-filters used in CLR. They are executed in
the 1st pass of the exception handling mechanism (it is a 2-pass mechanism!).
But their execution can involve calling other methods, right? How would then
look the CPU stack of call frames?
More concrete, suppose t... more >>
AppDomain questions
Posted by Hagay Lupesko at 11/1/2004 7:08:06 PM
Hi,
Im designing a module that is made of some sub modules (obviously... :) ),
each performing other task.
One of the sub modules should be very stable, and I dont want it to crash
over problems the other sub modules might have.
It looks as if using different AppDomains is ideal for my case... more >>
|