> Doesn't the "Len" function do this? I am not positive.
LenB works on Strings and UDTs, but not on objects.
- Chuck
----- Original Message -----
From: "Tim Mccurdy" <tmccurdy@c...>
To: "professional vb" <pro_vb@p...>
Sent: Wednesday, May 16, 2001 5:50 PM
Subject: [pro_vb] RE: Determining size of an object
> Doesn't the "Len" function do this? I am not positive.
>
> i.e.
> Private Type ThisType
> Name As String * 20
> ID As Integer
> End Type
>
> Dim MyType As ThisType
>
> MyType.Name = "Hello"
> MyType.ID = 1
> Msgbox Len(MyType)
>
> I am not totally positive.
>
> -----Original Message-----
> From: Charles Feduke [mailto:webmaster@r...]
> Sent: Wednesday, May 16, 2001 10:20 AM
> To: professional vb
> Subject: [pro_vb] RE: Determining size of an object
>
>
> I had always thought there was a SizeOf in VB, but apparently not.
> The
> closest I can get in the API is SizeOfResource, which is not the same as the
> C sizeof() function. You could write a quick DLL to return the sizeof() if
> you pass the object ByRef.
>
> - Chuck
>
> > -----Original Message-----
> > From: Ian Cox [mailto:ian_cox2001@h...]
> > Sent: Wednesday, May 16, 2001 12:46 PM
> > To: professional vb
> > Subject: [pro_vb] Determining size of an object
> >
> >
> > Does anyone know how to determine the size (in memory) of an object?
> > e.g.
> > I want to know the size of a recordset object or
> > I want to know the size of a business object
> >
> > Thanks in advance
> > Ian
>