Ole automation and buffers

Giganews Newsgroups
Subject: Ole automation and buffers
Posted by:  Ray Mond (nospam@nospam.net)
Date: Tue, 17 Apr 2007

I have an ole automation class that has a function that requires as part of
its input parameters, a pointer to a buffer, and an integer indicating the
size of that buffer.  I understand this to be the right way to go about this
i.e. having the client allocate and free the memory, not the server.

How can I pass the pointer to the buffer to my com function?  I tried
passing it as a pchar (as that is what's defined on the server side) but
delphi raises the 'Type not allowed in Ole Automation call'.


Ray Mond