Article View: comp.os.ms-windows.programmer.ole
Article #24How to initiate "OLE DDE"? Part 2.
From: Jon Shemitz
Date: Wed, 18 Feb 1998 00:00
Date: Wed, 18 Feb 1998 00:00
44 lines
2724 bytes
2724 bytes
I wrote:
> A customer wants me to write some code to continually export some of
> their app's state data, so that customers can write Excel spreadsheets
> to do more analysis than they provide. Both for marketing reasons, and
> because DDE can be slow (especially over a network), they want this to
> be "an OCX" (or at least use OLE).
[and]
> (1) In the deprecated old days of DDE, I would just put a topic
> description on the clipboard in "link" format, and users would Paste
> Special. What's the analogous process for IDataObject/IAdviseSink
> conversations?
At this point, I have a data object that represents (a mockup of) the
data I want to export. I can do a 'static paste' by using
OleSetClipboard() to put this on the clipboard; Excel then sees the CSV
format (but not the XlTable format?), and can paste it. Alas, this won't
cut it for a 'dynamic paste', because for reasons of their own Microsoft
makes a copy of my data object in OleSetClipboard(), and the copy does
not support DAdvise.
After spending a long time with Inside OLE trying to figure how to
initiate a dynamic paste, it looks like I'm supposed to put a data
object that offers to stream a moniker (the "Link Source" format) and to
copy an OBJECTDESCRIPTOR and a couple of strings (the "Link Source
Descriptor" format) to an HGLOBAL on the clipboard. I've written what
look like they should be working File and Item moniker objects, and have
a data object that offers the source and descriptor formats.
The thing is, when I do OleSetClipboard(), the data object gets asked
for the OBJECTDESCRIPTOR but not the moniker. Excel disables the Paste
and Paste Special options.
Is this the right approach? Am I just passing the wrong values in my
OBJECTDESCRIPTOR? Or have I gone down the wrong path?
--
http://www.midnightbeach.com - for info about me, my work, my writing,
and my homeschool resource pages.
Technical Details
Message-ID:
<34EB6CC7.87BA23C9@midnightbeach.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 108cda,82f69029abade678,start X-Google-Attributes: gid108cda,public X-Google-Thread: fd196,82f69029abade678,start X-Google-Attributes: gidfd196,public X-Google-Thread: fe15c,82f69029abade678,start X-Google-Attributes: gidfe15c,public From: Jon Shemitz <jon@midnightbeach.com> Subject: How to initiate "OLE DDE"? Part 2. Date: 1998/02/18 Message-ID: <34EB6CC7.87BA23C9@midnightbeach.com> X-Deja-AN: 326387197 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: Midnight Beach Mime-Version: 1.0 Reply-To: jon@midnightbeach.com Newsgroups: comp.os.ms-windows.programmer.ole,microsoft.public.win32.programmer.ole,borland.public.delphi.oleautomation