“pseudo-pointer.” in VB

Channel:
Subscribers:
732
Published on ● Video Link: https://www.youtube.com/watch?v=hHEUGrKSC9E



Duration: 0:00
109 views
0


From what I vaguely remember, the Variant type in VB had a usage that could be described as a “pseudo-pointer.” Especially when calling COM or API functions, passing a variable as ByRef Variant allowed it to be treated on the C++ side as a VARIANT* or even a VARIANT**, enabling the function to write values back into it. This was similar to double-pointer indirect referencing in C, allowing actual memory manipulation through the Variant. It was also used in handling SAFEARRAYs and BSTRs, making it one of the more intriguing low-level techniques in VB/VBA. I encourage you to try it out in VBA or similar environments.