You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Geoff --
I think that to use descriptors is incorrect way.
So, for me it looks better to do something like this
Vb
Code:
DefLng A-Z
Private Declare Sub Pb Lib "PbA" (ByRef Ar As Long, m1 As Long, m2 As Long, n1 As Long, n2 As Long)
Private Sub Form_Load()
m1 = 2: m2 = 6: n1 = 4: n2 = 8
ReDim Ar(m1 To m2, n1 To n2)
For i = m1 To m2: For j = n1 To n2
Ar(i, j) = 100 * i + j
Next: Next
Pb Ar(m1, n1), m1, m2, n1, n2
End
End Sub
Pb
Code:
#Compile Dll "F:\WinNt\System32\PbA.Dll" '<--- Change
#Register None
#Dim All
#Include "win32Api.Inc"
Sub Pb Alias "Pb" (ByVal ArPtr As Long Ptr, m1 As Long, m2 As Long, n1 As Long, n2 As Long) Export
Dim i As Long, j As Long, s As String
ReDim Ar(m1 To m2, n1 To n2) As Long At ArPtr
For i = m1 To m2
s = "": For j = n1 To n2: s = s + Str$(Ar(i, j)): Next: MsgBox s
Next
End Sub
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment