Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 10
#Compile Exe
#Dim All
%Unicode = 1
#Include "Win32API.inc"
Enum Equates Singular
IDC_Button
End Enum
Type TestType
i As Long
s As String * 5
j As Long
t As String * 5
End Type
Global hDlg As Dword, D(), temp As TestType
Global P As TestType Ptr
Function PBMain() As Long
BuildFakeData
p = VarPtr(D(0))
temp = @p[5]
? temp.s
End Function
Sub BuildFakeData
Local i As Long
ReDim D(5)
For i = 0 To 5
D(i).i = i
D(i).j = i + 1
D(i).s = Str$(D(i).i)
D(i).t = Str$(D(i).j)
Next i
End Sub
http://www.garybeene.com/sw/gbsnippets.htm