Changeset 223 for Include/Classes/System/Runtime
- Timestamp:
- Apr 30, 2007, 1:56:57 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Runtime/InteropServices/GCHandle.ab
r208 r223 12 12 Sub Target(obj As Object) 13 13 allocated.Add(obj) 14 handle = GetPointer(VarPtr(obj)) 14 15 End Sub 15 16 … … 24 25 25 26 Sub Free() 26 Dim pobj = VarPtr(handle) As *Object27 27 allocated.Remove(Target) 28 28 handle = 0 … … 30 30 31 31 Static Function ToIntPtr(h As GCHandle) As LONG_PTR 32 Return h.handle As LONG_PTR Xor &hffffffff As LONG_PTR32 Return h.handle As LONG_PTR 33 33 End Function 34 34 35 35 Static Function FromIntPtr(ip As LONG_PTR) As GCHandle 36 36 FromIntPtr = New GCHandle 37 FromIntPtr.handle = (ip Xor &hffffffff As LONG_PTR)As VoidPtr37 FromIntPtr.handle = ip As VoidPtr 38 38 End Function 39 39
Note:
See TracChangeset
for help on using the changeset viewer.