Skip to content

Commit

Permalink
2003-03-03 Tim Coleman <tim@timcoleman.com>
Browse files Browse the repository at this point in the history
        * HandleRef.cs: Add this struct

svn path=/trunk/mcs/; revision=12164
  • Loading branch information
Tim Coleman committed Mar 3, 2003
1 parent 77c3b54 commit 78c4ae6
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
@@ -1,3 +1,6 @@
2003-03-03 Tim Coleman <tim@timcoleman.com>
* HandleRef.cs: Add this struct

2003-01-05 Sebastien Pouliot <spouliot@videotron.ca>

* COMException.cs: New. Minimal (incomplete - i'm not using COM)
Expand Down
52 changes: 52 additions & 0 deletions mcs/class/corlib/System.Runtime.InteropServices/HandleRef.cs
@@ -0,0 +1,52 @@
//
// System.Runtime.InteropServices.HandleRef
//
// Author:
// Tim Coleman (tim@timcoleman.com)
//
// Copyright (C) 2003 Tim Coleman

using System;

namespace System.Runtime.InteropServices {
public struct HandleRef {

#region Fields

object wrapper;
IntPtr handle;

#endregion // Fields

#region Constructors

public HandleRef (object wrapper, IntPtr handle)
{
this.wrapper = wrapper;
this.handle = handle;
}

#endregion // Constructors

#region Properties

public IntPtr Handle {
get { return handle; }
}

public object Wrapper {
get { return wrapper; }
}

#endregion // Properties

#region Type Conversions

public static explicit operator IntPtr (HandleRef value)
{
return value.Handle;
}

#endregion // Type Conversions
}
}

0 comments on commit 78c4ae6

Please sign in to comment.