Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Createobject() syntax
Message
De
26/05/1998 11:37:37
Ryan Hirschey
Federal Reserve Bank of New York
New York City, New York, États-Unis
 
 
À
26/05/1998 09:09:59
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00101887
Message ID:
00101934
Vues:
19
>I have created a DLL in VFP5a and can access it's properties and methods from VFP5 and VFP3, with the following syntax. However, this syntax gives me errors in other products like VB 5.0 CCE, and VB Script in a Active Server Page.
>
>***Works in VFP not VB.
>ox = CREATEOBJECT("myproj.myclass")
>y = ox.mymethod()
>
>*** The first line works in VFP and VB, but the second line
>gives a "Error 424, Object required" in VB5 CCE.
>
>What else could I be missing? Calling the DLL I created in VFP5 works from VFP3 AND VFP5 with the above syntax. All the documentation I've read shows the same syntax for VB "Value = Object.property or Value = Object.method()". However, I can't seem to get to this VFP DLL from VB.
>
>The only thing that this VFP DLL method does is return a "Hello World" string.
>
>Thanks,
>
>Jerryt

Jerry,

Try

SET ox = CREATEOBJECT("myproj.myclass")
Y = ox.mymethod

VB doesn't like empty parentheses after method calls, so remove them from the second line. Hope this helps.
Ryan Hirschey
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform