The Address of a Variable

The Address of a Variable

THE ADDRESS OF A VARIABLEVB5 includes a built-in VarPtr function (see tip “Use the Object Browser to Discover UndocumentedFeatures”), but this function isn’t available in VB4. The VB4 runtime library does include this function, butyou must declare it first:#If Win16 ThenDeclare Function VarPtr Lib _ “VB40016.DLL” (variable As Any) _ As Long#ElseDeclare Function VarPtr Lib _ “VB40032.DLL” (variable As Any) _ As Long#End IfThis function is useful when passing an external API routine a Type structure, and one of its fields is theaddress of another variable or record.

See also  How HealthStream Learning Center Supports Healthcare Education and Compliance

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist