----- Original Message -----
Sent: Thursday, August 28, 2003 9:59
AM
Subject: RE: [DUG]: Dlls. COM and
PChars
Sharemem unit? May get around the issue.
Technically only OLE Automation compatible types can be passed via
COM objects, unless you do you own marshalling ...
However, If you want to break COM's rules it can be done - however
both objects have to be in the same process space - create In process
servers etc.
It
is simpler to avoid problems and use widestrings if you are uncertain. There
is a overhead using them, but do we really care these days - how often is
the call done? Unless I was after the ultimate in performance I would prefer
the reliability and encapsulation that COM provides - thats (one of) the
normal reason for using it in the first place?
Myles.
I think my usage of PChars may be
incorrect. I have a Com object within and application that has
functions that return pChar, a dll that uses this com
object sometimes seems to receive only a portion of the text.
It makes no difference if I store the result in a pChar or a String.
Any ideas?
I have avoided this by passing results as
WideStrings, is this a good thing?
Rob Martin
Software
Engineer
phone 03 377 0495
fax 03 377
0496
web www.chreos.com