Last change
on this file since 299 was 299, checked in by dai, 17 years ago |
【32bitコンパイラ】
静的リンクライブラリを実装
ジェネリクスを実装
※64bitコンパイラは未実装
|
File size:
617 bytes
|
Rev | Line | |
---|
[230] | 1 | '--------------------------------------------------------------------
|
---|
| 2 | ' Test case of GCHandle Class
|
---|
| 3 | '--------------------------------------------------------------------
|
---|
| 4 |
|
---|
| 5 | Namespace GCHandleTest
|
---|
| 6 |
|
---|
| 7 | Sub TestMain()
|
---|
| 8 | Dim o = New Object
|
---|
[283] | 9 | Dim gch = System.Runtime.InteropServices.GCHandle.Alloc(o)
|
---|
[230] | 10 | UnitTest("GCHandle.Alloc, Target", o.Equals(gch.Target))
|
---|
| 11 |
|
---|
[283] | 12 | Dim ip = System.Runtime.InteropServices.GCHandle.ToIntPtr(gch)
|
---|
[230] | 13 | gch = Nothing
|
---|
| 14 |
|
---|
[283] | 15 | gch = System.Runtime.InteropServices.GCHandle.FromIntPtr(ip)
|
---|
[230] | 16 | UnitTest("GCHandle - IntPtr", o.Equals(gch.Target))
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 | End Sub
|
---|
| 20 |
|
---|
| 21 | End Namespace
|
---|
| 22 |
|
---|
| 23 | GCHandleTest.TestMain()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.