DEV Community

xiaoyaocode163
xiaoyaocode163

Posted on

vb6 Pass structure data without copying,DataType by Pointer

This is taught to me by a Chinese tech expert named *ABC, he is my master

`Dim PP As UserInfoPtr, U1 As UserInfo
U1.ID = 135
U1.v = 1
U1.UserName = "TOM"

Dim ClassA As New Class1
ClassA.SubInClass1 VarPtr(U1)

MsgBox "Data changeed?UserInfo.V=" & U1.v & "," & U1.UserName`
Enter fullscreen mode Exit fullscreen mode

FROM :https://www.vbforums.com/showthread.php?900445-vb6-Pass-structure-data-without-copying-DataType-by-Pointer

Dynamic UDT TypeLibs
[url]https://www.vbforums.com/showthread.php?899136-Dynamic-UDT-TypeLibs[/url]

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay