Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameter sent by value not being updated
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Parameter sent by value not being updated
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01565124
Message ID:
01565124
Vues:
68
I have code that integrates with XCharge for payment processing. I call a function out of a DLL using a DECLARE statement. The results of the transaction are placed in a variable which is passed by reference to the function in the DLL.

This has all worked very well for the last 3 years.

Today, I needed to troubleshoot the way some of the return values are handled, but I am observing very strange behavior with the parameter I pass by value. For reference, here is the code:
    cMyResult = SPACE(2000)
    DECLARE INTEGER XC_eXpressLink IN XCClient.DLL INTEGER nHWnd, STRING cParam, STRING @cMyResult 
    nHWnd = _SCREEN.HWND
    N = XC_eXpressLink(nHWnd, cTransactionRequest, @cMyResult)
I am now seeing an issue with cMyResult not being populated in certain scenarios. I am not sure if this is a problem with the .dll or something in VFP. I have a very basic test program that processes a variety of different transactions. I run this program directly from vfp, and this is what is happening:

- If run the program from the command window using DO TEST the cMyResult variable is properly populated with the results.
- If I run the exact same program by hitting control+E or the "Run" toolbar button, cMyResult keeps the value it was initialized to.
- If I put a set step on in the code and try to observe the cMyResult variable, it is always populated with the results.

In my production code, I am finding that in some screens that launch a payment transaction, the results are being captured and in some they are not. I have not been able to figure out any common denominator for the failed transactions.

I have tried on 3 different machines running Windows 8 and Windows 7. I have tried two different version of the XCharge software I am integrating with. I have tried testing my full application in both source code and compiled, and I have experienced the problems in all environments.

In short, I am baffled, and the provider of the payment integration software is as well.

Any thoughts?
Paul R. Moon
Business Software Solutions
paul@businessoftware.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform