Re: POLYTEXTOUT problems..( including declarations )



"J French" <erewhon@xxxxxxxxxx> wrote in message
news:43438dcc.262950625@xxxxxxxxxxxxxxxxxxxxxxx

> That is interesting, if it works, then it suggests that
> VB only 'copies' a UDT if it contains a String

It works fine, Jerry. The way I see it (at the moment) VB simply sends a
pointer to the start of the UDT data block if every element it contains has
a fixed length (ie is not itself a pointer to something else). So Longs,
Integers and fixed lengtrh strings will probably be okay (except in some
cases there may be some problems with VB's alignment of Longs to a four byte
boundary in a UDT, so that a Long followed by one Integer would be shifted
by two bytes from where you might otherwise expect it to be). Also, there
may be similar alignment problems with fixed length strings if the length of
the string is not a multiple of four. However, in the case of the (modified)
POLYTEXT type everything is a Long (including the four Longs in the RECT
type) so it all should be fine.

Mike




.



Relevant Pages

  • Re: CLR plug in algorithm
    ... When doing data mining on top of a string attribute, ... The assumption is that, for discrete attributes, a data mining algorithm ... using a reference to your UDT DLL you might be able to deserialize the ...
    (microsoft.public.sqlserver.datamining)
  • Re: RecLength for Random File
    ... where the UDT is to ... never read the record back in since it wouldn't know the end of one string ... To save a record to disk, VB's Random Access file I/O is used. ... Dim hFile as Long ...
    (microsoft.public.vb.general.discussion)
  • Re: Storing variables with Random Files
    ... Dim Store1 As String * 15 ... UDT works well for that purpose. ... relational database that has only ONE table (which would mean it's ...
    (microsoft.public.vb.general.discussion)
  • Re: What tool should I use ? More info
    ... My only suggestion is that the UDT should be wrapped inside a class. ... MMSI As String ... Every time I receive info from a specific ship, her info or some of her info is changed. ... best sorting tool for multiple sorting ...
    (microsoft.public.vb.general.discussion)
  • Re: POLYTEXTOUT problems..( including declarations )
    ... >> VB only 'copies' a UDT if it contains a String ... So Longs, ... aligned Struct convention ...
    (microsoft.public.vb.general.discussion)