Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing strings to DLL
Message
From
04/12/2001 08:03:03
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00588408
Message ID:
00589161
Views:
38
>>Hi Sergey,
>>
>>Below is the DECLARE statement from the Visual Basic code.
>>
>>Declare Sub CESAVS Lib "CARDNet" Alias "CesAvs" (cardnumber As String, expdate As String, zipcode As String, address As String, commerror As String, transok As Integer, lrcerror As Integer, avscode As String, avsresp As String, tbatch As Integer, bfirst As Integer, blast As Integer, conffile As String)
>
>this ought to work
>
>Declare long CESAVS in CARDNet.dll ;
> string cardnumber, ;
> string expdate, ;
> string zipcode, ;
> string address, ;
> string commerror, ;
> long transok, ;
> long lrcerror, ;
> string avscode, ;
> string avsresp, ;
> long tbatch, ;
> long bfirst, ;
> long blast, ;
> string conffile

I think that may be wrong; my memory is that without explicitly stating ByVal, even simple structures are passed ByRef in VB, so I come up with:
Declare long CESAVS in CARDNet.dll ;
   string @ cardnumber, ;
   string @ expdate, ;
   string @ zipcode, ;
   string @ address, ;
   string @ commerror, ;
   long @ transok, ;
   long @ lrcerror, ;
   string @ avscode, ;
   string @ avsresp, ;
   long @ tbatch, ;
   long @ bfirst, ;
   long @ blast, ;
   string @ conffile
That's why I hate VB declarations...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform