Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1449

vb6 Pass structure data without copying,DataType by Pointer

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

Code:

    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

Dynamic UDT TypeLibs
https://www.vbforums.com/showthread....c-UDT-TypeLibs
Attached Images
 
Attached Files

Viewing all articles
Browse latest Browse all 1449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>