Article View: borland.public.cppbuilder.nativeapi
Article #16659Re: How to get the actual size of a pointed object
From: Rob
Date: Sun, 04 May 2003 05:44
Date: Sun, 04 May 2003 05:44
21 lines
1869 bytes
1869 bytes
"Sky" <huangc913@msn.com> wrote in message news:3eb47518@newsgroups.borland.com... > hi all, i want transfer some memory by WM_COPYDATA, > but i don't know how to get the actual size of a point, > for example, i want transfer a TStrings *strs, > but how can i get the size of strs? > Any hint? TIA > TStrings, as far as C++ is concerned, is a class type with virtual functions [in reality it is a Delphi type, but those details shouldn't matter to you]. Basically, you should not try to copy the object directly, but need to represent the data *within it* as an array of char to send it with WM_COPYDATA. I suggest you read up on various properties of TStrings (Count, Strings) first in the online help. As the Strings property allows acccess to AnsiStrings (which are also a non-trivial class type) you will need to read up on that type as well.
Technical Details
Message-ID:
<3eb4a962@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!out.nntp.be!propagator2-sterling!news-in.nuthinbutnews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3eb47518@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,843f8a38f40cb88f X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-03 22:51:53 PST From: "Rob" <nospam@nonexistant.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3eb47518@newsgroups.borland.com> Subject: Re: How to get the actual size of a pointed object Date: Sun, 4 May 2003 15:14:55 +0930 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 203.134.19.246 Message-ID: <3eb4a962@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1052027234 203.134.19.246 (3 May 2003 22:47:14 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!out.nntp.be!propagator2-sterling!news-in.nuthinbutnews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail