sptr

WinFBX

sptr

CVAR Class ››
Parent Previous Next

Description

Returns the address of the underlying variant. Same as vptr but without clearing the variant.


Syntax


FUNCTION CVar.sptr () AS VARIANT PTR


Parameter


This method has no parameters.


Return value


The address of the underlying variant. Can be used to pass the variant to a IN BYVAL VARIANT PTR parameter.


Example


SUB Foo (BYVAL v AS VARIANT PTR)

  PRINT AfxVarToStr(v)

END SUB


Using the pointer syntax:


DIM pcv AS CVAR PTR = NEW CVAR("Test string")

Foo pcv->sptr

Delete pcv


Using the normal syntax:


DIM cv AS CVAR = "Test string"

Foo cv.sptr


But with the normal syntax you can use the * operator instead:


DIM cv AS CVAR = "Test string"

Foo *cv


or simply


DIM cv AS CVAR = "Test string"

Foo cv


Include file


CVar.inc


Created with the Personal Edition of HelpNDoc: Easy CHM and documentation editor