Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing string to VFP COM DLL
Message
De
19/12/2000 11:59:57
 
 
À
19/12/2000 10:03:27
Information générale
Forum:
Visual Basic
Catégorie:
Contrôles ActiveX
Divers
Thread ID:
00455025
Message ID:
00455083
Vues:
27
>Hi,
> I have a VFP COM DLL. I need to pass strings from VB to VFP COM DLL. I get error "type mismatch". Any idea?
>
>Code:
>VFP
>
>DEFINE CLASS obj AS SESSION
>PROCEDURE execute
>PARAMATER tcString, tcString2
>
>**Do watever
>
>ENDDEFINE
>
>VB
>
>Dim myobj as mydll.obj
>
>set myobj = NEW mydll.obj
>
>myobj.execute("aaa","bbb") ' error occured
>
>
>Why?
>
>Thank you


Add Error event code to your "obj" class definition in VFP, to get a better error message (you don't have to call it, the Error event will fire if there's a VFP error and will pass it the 3 parameters listed)
Procedure Error
     LPARAMETERS nError, cMethod, nLine
     Local laError(1)
     AError(laError)
     COMReturnError("VFP DLL object", ;
          "Error: " + Transform(nError) + ": " + ;
          laError[1,2] + ": " + ;
          "Method: " + cmethod + ", Line: " + Transform(nLine))
EndProc
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform