ok, it works, but I need do this...

Dim v() As Variant
v = myClass.ValueArray("GetVector")
....
Dim o As OLEObject
o = new OLEObject( "MyVBDll.AnotherClass" )
o.Method(v)

in Visual Basic, "Method" declaration is:
Public Function Method(ByVal myVariant As Variant) As ADODB.Recordset

When I compile app, I got the error "Expected Variant, but got Variant()" on
line "o.Method(v)".



2006/11/14, William Yu <[EMAIL PROTECTED]>:


REALbasic doesn't support arrays as variants, so you'll have to do
this instead:

Dim v() As Variant
v = myClass.ValueArray("GetVector")

~William


On Nov 14, 2006, at 12:25 PM, Alex Cassol wrote:

> hi!
>
> I have a VB class that have a method called: GetVector.
>
> Public Function GetVector() As Variant
>    Dim v(1) As Variant
>
>    v(0) = "Some words"
>    v(1) = 1
>
>    GetVetor = v
> End Function
> -----------------------
>
> In RealBasic I call the method GetVector like this:
>
>    dim myClass = new OLEObject("MyVBDll.clsMyClass")
>   dim v as Variant
>   v = myClass.GetVector
>
> The "v" variable contains always "nil"! Why!?
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>




--
 Alex Cassol de Vasconcelos
 alexcassol at gmail.com
 MCSD
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to