Quantcast
Viewing all articles
Browse latest Browse all 1479

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

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
Image may be NSFW.
Clik here to view.
 
Attached Files

Viewing all articles
Browse latest Browse all 1479

Trending Articles