Need help converting a function from VB to FoxPro
Hi, I wrote the folowing in VB and it works perfectly in VB. I'm not
a FoxPro guy, but trying to convert something for a client and the
syntax is killing me. Can anyone look at what I've tried and help fix
the syntax? Thanks!
-------- VB6 -----------------
Private Declare Function SysAllocStringByteLen Lib "oleaut32" (ByVal
lpString As Long, ByVal lLen As Long) As String
Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal
lpString As Long) As Long
Private Function PtrToVBString(ByVal lPointer As Long) As String
PtrToVBString = SysAllocStringByteLen(lPointer, lstrlen(lPointer))
Text2.Text = PtrToVBString(myPointerStructure)
-------- FoxPro ?? --------------
Are all the strings and integers there? What about use of "@" in these
Declare String SysAllocStringByteLen in oleaut32;
Integer lpString,; && these are longs, what are they in FP?
Declare Integer lstrlen In kernel32 as lstrlenA; && returns a long
Integer lpString && int or string in FP?
FUNCTION PtrToVBString && can't get this to work at all
retval = SysAllocStringByteLen(lPointer, lstrlen(lPointer))
I get a "methods and events cannot contain nested procedure..." error
in the actual function. Thanks.