Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Very simple but no luck
Message
De
07/06/2002 11:18:27
Setrak Aslanian
Aslan Solutions Inc.
Ottawa, Ontario, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Very simple but no luck
Divers
Thread ID:
00665987
Message ID:
00665987
Vues:
73
Hi all,

I have a mysterious behavior (well maybe not mysterious). I create a DLL in VFP7. It works with no problem under VFP 6 or 7. But when i try to used in VB6, i get a range of errors (wrong number of parameters, type mismatch, radonly property) and the error changes with each compile without changing a single line of code. The following is the VFP class:

Define Class Test as Custom Of 'Test.prg' Olepublic

Dimension Array1(10)

Dimension Array1_COMATTRIB[4]
Array1_COMATTRIB[1] = 0
Array1_COMATTRIB[2] = 'Array1 Description'
Array1_COMATTRIB[3] = 'Array1'
Array1_COMATTRIB[4] = 'Single'

Procedure Init as VOID
For i=1 to 10
This.Array1(i) = i
EndFor
EndProc

Procedure Array1_Assign(m_Value as Single, intIndex as Integer) as VOID
This.Array1(intIndex) = m_Value
Endproc

Function Array1_Access(intIndex as Integer) as Single
Return This.Array1(intIndex)
Endfunc

Enddefine

And now the vb6 code:
Private Sub Command1_Click()
Dim ox As testchar.Test
Set ox = New testchar.Test
With ox
ox.Array1(1) = 6
Debug.Print ox.Array1(1)
End With
Set ox = Nothing
End Sub

Thanks in advance,

Setrak Aslanian
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform