Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with DLL. Runs in VB, not VFP
Message
From
02/07/2002 12:59:38
 
 
To
02/07/2002 12:50:40
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00674563
Message ID:
00674574
Views:
18
>Hi everyone. I am trying to make a clarion dll work inside of VFP 5.0 I was given sample VB that works, but I can't seem to get it to work in Foxpro.
>
>Here's the VB code:
>Private Declare Sub StringsToFromVB Lib "vFCla" (ByVal s1$, ByRef adr As Long)
>Dim tmp$
>Dim adr As Long
>tmp = Text1.Text
>Call StringsToFromVB(tmp, adr)
>
>The VFP code:
>DECLARE GET2STRINGS IN "vFCla.dll" AS "StringsToFromVB" STRING s1, LONG @adr
>tmp = ThisForm.Text1.Value
>adr = 0
>lcx = StringsToFromVB(tmp,@adr)
>
>My problem is this: In VB, the Clarion DLL displays the string that VB passes, then writes a string and updates the variable "adr" with a pointer to a string. VB then uses another DLL to go get the string, but that is not an issue at the moment. The issue that I have is that the Clarion DLL blows Foxpro out of the water when it tries to update the "adr" variable that I am trying to pass by reference.
>
>I don't know much about this stuff, but I know that the VB code I show above runs. In debugger, the "adr" variable is about a seven digit number when it's done. Foxpro just craps out.
>
>Can anyone with VB experience and VFP experience, help me out? I have tried using the @ symbols and not using them. Same result.
>
>Thanks in advance,
>Tim

Declare the ddl function like this:
DECLARE GET2STRINGS IN "vFCla.dll" AS "StringsToFromVB" STRING @ s1, LONG @ adr
Can you send me the clarion dll?

HTH
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Previous
Reply
Map
View

Click here to load this message in the networking platform