[Mono-devel-list] RE: [mono-vb] VB Class status
A Rafael D Teixeira
rafaelteixeirabr@hotmail.com
Thu, 24 Jun 2004 17:30:54 -0300
that is at least consistent with our hipothesys... but I still don't know if
we can solve it in c#, or things are getting ugly and besides fixing mbas we
will have to recode in vb.net...
Good work, Rob
Rafael "Monoman" Teixeira
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
http://monobrasil.softwarelivre.org
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
>From: Rob.Tillie@Student.tUL.EDU
>To: rafaelteixeirabr@hotmail.com
>CC: mono-vb@lists.ximian.com
>Subject: RE: [Mono-devel-list] RE: [mono-vb] VB Class status
>Date: Thu, 24 Jun 2004 22:03:44 +0200
>
>I did a little test with the following sample:
>
>Imports System
>Imports Microsoft.VisualBasic
>
>Module GetPutObject
> Sub Main
> Dim c As String
> FileSystem.FileOpen(1, "GetPutObject.txt", OpenMode.Binary)
> FileSystem.FilePutObject(1, "ABCDEF", -1)
> FileSystem.Seek(1, 1)
> FileSystem.FileGetObject(1, c, -1)
> Console.WriteLine(c)
> Dim arr(1) as Integer
> arr(0) = 1
> FileSystem.FileClose(arr)
> End Sub
>End Module
>
>Concentrating on the FileOpen method, which has an extra 3 optional
>parameters.
>
>Compiler: Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
>
>Compiled using MS's MS.VB.dll, the IL to call the method looks like this:
>IL_0000: ldc.i4.1
> IL_0001: ldstr "GetPutObject.txt"
> IL_0006: ldc.i4.s 32
> IL_0008: ldc.i4.m1
> IL_0009: ldc.i4.m1
> IL_000a: ldc.i4.m1
> IL_000b: call void
>[Microsoft.VisualBasic]Microsoft.VisualBasic.FileSystem::FileOpen(int32,
>string,
>valuetype [Microsoft.VisualBasic]Microsoft.VisualBasic.OpenMode,
>valuetype [Microsoft.VisualBasic]Microsoft.VisualBasic.OpenAccess,
>valuetype [Microsoft.VisualBasic]Microsoft.VisualBasic.OpenShare,
>int32)
>
>Compiled using Mono's MS.VB:
>IL_0000: ldc.i4.1
> IL_0001: ldstr "GetPutObject.txt"
> IL_0006: ldc.i4.s 32
> IL_0008: ldc.i4.0
> IL_0009: ldc.i4.0
> IL_000a: ldc.i4.0
> IL_000b: call void
>[Microsoft.VisualBasic]Microsoft.VisualBasic.FileSystem::FileOpen(int32,
>string,
>valuetype [Microsoft.VisualBasic]Microsoft.VisualBasic.OpenMode,
>valuetype [Microsoft.VisualBasic]Microsoft.VisualBasic.OpenAccess,
>valuetype [Microsoft.VisualBasic]Microsoft.VisualBasic.OpenShare,
>int32)
>
>Obviously it is passing 0 for each default value, while this should be
>-1...
>(I don't know anything about IL, but I guess m1 stands for -1)
>
>Greetz,
>-- Rob.
_________________________________________________________________
MSN Messenger: instale grátis e converse com seus amigos.
http://messenger.msn.com.br