* SafeHandle.cs: Use refcount == -1 to indicate that the handle
had been closed.
The problem here is that we have no records of why the code that
threw a ObjectDisposedException inside the do { } while block on
DangerousAddRef was added. It seems it was added in response to
Close() methods being called and the need to throw that exception
on further calls to ObjectDisposedException.
Sadly, we have no test suites for that.
svn path=/trunk/mcs/; revision=154741
* SafeBuffer.cs: When comparing the end, we only need to compare
source+size being bigger than last_byte, not bigger or equal,
otherwise we can not access the last element.
svn path=/trunk/mcs/; revision=148365
* _Assembly.cs: Remove Evidence and GlobalAssemblyCache
properties for NET_2_1
* Marshal.cs: Avoid depending on SecureString for NET_2_1
svn path=/trunk/mcs/; revision=142398
2009-09-19 Sebastien Pouliot <[email protected]>
* net_2_1_bootstrap_corlib.dll.sources, net_2_1_raw_corlib.dll.sources:
New. Moonlight specific build files to minimize size and build time.
Copied from corlib.dll.sources minus some 4.0 stuff and COM types.
In System.Runtime.InteropServices:
2009-09-19 Sebastien Pouliot <[email protected]>
* Marshal.cs: Avoid depending on COM stuff for NET_2_1
svn path=/trunk/mcs/; revision=142266
2009-04-29 Tom Hindle <[email protected]>
* Marshal.cs: Improved GetExceptionForHR to return real
C# exceptions in certain cases instead of always COMException.
svn path=/trunk/mcs/; revision=133150
* ConsoleTest.cs: added a bunch of tests for the standard input,
output and error stream properties.
2009-03-23 Marek Habersack <[email protected]>
* FileStreamTest.cs: added a bunch of tests for SafeFileHandle
constructors
2009-03-23 Marek Habersack <[email protected]>
* Console.cs: OpenStandard{Input,Output,Error} no longer use
FileStream on 2.0+. The reason is that SafeFileHandle used in the
stream doesn't allow handles with values <= 0, and on Unix stdin
is 0 which would break the Console class. Instead of FileStream,
introduced a simple internal specialized stream which is used in
this scenario.
2009-03-23 Marek Habersack <[email protected]>
* FileStream.cs: implemented full support for SafeFileHandle in
2.0. The obsolete constructors taking an IntPtr now wrap it in a
SafeFileHandle.
2009-03-23 Marek Habersack <[email protected]>
* SafeHandle.cs: added an internal property, OwnsHandle, used by
FileStream.
svn path=/trunk/mcs/; revision=130049
tests, and removed use of ExpectedException. Use more meaningful names
for test methods. Minor code formatting.
* Marshal.cs: Fixed order of arguments for ArgumentException in
GetComSlotForMethodInfo.
svn path=/trunk/mcs/; revision=106354
* GCHandle.cs (AddrOfPinnedObject): Use -2 to communicate that the handle is not
pinned. Correct exception message. Fixes#82848.
svn path=/trunk/mcs/; revision=85803
* SafeHandle.cs: Harden this, do not call ReleaseHandle if the
handle is invalid.
* CriticalHandle.cs: Harden this, do not call ReleaseHandle if the
handle is invalid.
svn path=/trunk/mcs/; revision=82260
* DefaultParameterValueAttribute.cs: Move to System.dll.
In System/System.Runtime.InteropServices:
* StandardOleMarshalObject.cs: New .net2.0 class.
* DefaultParameterValueAttribute.cs: Move here from corlib.
svn path=/trunk/mcs/; revision=74124
* SafeHandle.cs: Do not use locks in SafeHandle to protect the
access to the refcount, use Interlocked.CompareExchange. The
locks were the source of problems with domain finalization when
this code was enabled.
This should fix Matt Hargett's bug report with a full `make check'
that reported variations of:
** (../../class/lib/net_2_0/nunit-console.exe:29644): WARNING **:
Finalization of domain <domainname> timed out.
Also, it is a lot lighther.
svn path=/trunk/mcs/; revision=70433
SafeWaitHandle support for WaitHandles (2.0)
A few APIs implemented from Marshal.
2006-12-11 Miguel de Icaza <[email protected]>
* WaitHandle.cs: In 2.0 use SafeWaitHandles and the SafeWaitHandle
patterns instead of using directly the IntPtr Handle.
Refactor the code to reuse as much as possible, and follow the new
conventions where appropriate.
2006-12-15 Miguel de Icaza <[email protected]>
* Marshal.cs (SecureStringToCoTaskMemAnsi, SecureStringToBSTR,
SecureStringToCoTaskMemUnicode, ZeroFreeCoTaskMemAnsi,
ZeroFreeCoTaskMemUnicode, ZeroFreeGlobalAllocAnsi,
ZeroFreeGlobalAllocUnicode): Implement.
(StringToCoTaskAuto): return the same as Ansi.
The ANSI code is out of sync with Mono, which treats ANSI as
UTF-8.
Code formatting changes
svn path=/trunk/mcs/; revision=69552
* SafeHandle.cs: Fix a handful of bugs, and add tests for them.
Only release the handle if its owned by us. Also throw
ObjectDisposedException's
svn path=/trunk/mcs/; revision=69378
2006-12-11 Miguel de Icaza <[email protected]>
* SafeHandle.cs: Implement finalizer.
DangerousAddRef will now throw an exception if the object was
disposed.
2006-12-10 Miguel de Icaza <[email protected]>
* SafeFileHandle.cs: Implement this one.
svn path=/trunk/mcs/; revision=69296
* SafeHandle.cs: Implement this class.
2006-12-02 Miguel de Icaza <[email protected]>
* SafeFileHandle.cs: Remove the IsInvalid method, as that is
present in the base class.
svn path=/trunk/mcs/; revision=68875
* Marshal.cs: Replaced the *Auto internal calls with managed
variants. Fixed SystemDefaultCharSize to return an OS dependent
value.
svn path=/trunk/mcs/; revision=64659
* ComInteropProxy.cs: Fix default constructor being always
being called.
* Marshal.cs: Implement GetIDispatchForObject.
* __ComObject.cs: Added defintion of IDispatch interface, and
property. Get CLSID of supertype for creation if class not
ComImport attributed (allows for inheritance of RCW).
* MonoType.cs: Implement IsCOMObjectImpl.
svn path=/trunk/mcs/; revision=63630