Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameter problem
Message
 
 
À
04/05/2010 03:36:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01462947
Message ID:
01462956
Vues:
66
WAG, try to use an object type null variable
if llError 
    loSession = CREATEOBJECT("Empty")
    loSession = NULL
    lnErrorCode = loThirdParty.getLastErrorCode(loSession)
endif
BTW, it's totally unnecessary to compare logical values with .T./.F.

>I'm accessing a third party dll which has a getLastErrorCode-method.
>After initiliazing the object, I have to begin a new session.
>If I can't establish a session, i want to retreive the last error code. This method has the session-object as an incoming parameter but when i don't have this object, the parameter can be set to NULL.
>When I do this in Visual Studio I send 'null' to the method and it works fine, BUT in VFP any value I send works (NULL, .NULL., "", .F., 0, ...) I always get a 'Unknown COM status code'.
>
>Does anyone know what value to send ?
>If i have established a session and i send this session-object as the parameter an errorcode is returned.
>
>------------------------------
>
>loThirdParty = CREATEOBJECT("CISComWrapper.CIS_ComWrapperImpl")
>
>llError = .F.
>try
> loSession = loThirdParty.BeginSession()
>catch
> llError = .T.
>endtry
>
>if llError = .T.
> lnErrorCode = loThirdParty.getLastErrorCode( NULL ) &&& this is the parameter I'm talking about
>endif
>
>loThirdParty = NULL
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform