Article View: comp.os.ms-windows.programmer.ole
Article #23Re: How to initiate "OLE DDE"? Part 2.
From: Jon Shemitz
Date: Thu, 19 Feb 1998 00:00
Date: Thu, 19 Feb 1998 00:00
46 lines
3080 bytes
3080 bytes
After looking at what Excel and Word put on the clipboard, I realized
that (part of) what I have to do is to create a single data object that
offers both the static data AND the "ObjectLink" and "Link Source
Descriptor" (so far, I've resisted the temptation to write code that
refers to the LSD) formats. When I do this, Excel enables Paste Special
and its Paste Link options, and pasting creates something that looks
plausible in the formula: ClassName|ExeName!Item.
Thing is (things are?) (1) the data for the array all comes out as #REF!
(2) my file moniker is never created (yes, it >appears< to be in the
registry properly, and I can successfully create a copy via a routine
that (if I understand the framework dox properly) uses its class
factory) and (3) the "Link Source" format still never gets read.
What am I still doing wrong? Doesn't ANYONE KNOW? This is driving me
crazy!
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
I wrote:
> 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.
--
http://www.midnightbeach.com - for info about me, my work, my writing,
and my homeschool resource pages.
Technical Details
Message-ID:
<34ED1BD7.674F0756@midnightbeach.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34EB6CC7.87BA23C9@midnightbeach.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 108cda,82f69029abade678 X-Google-Attributes: gid108cda,public X-Google-Thread: fd196,82f69029abade678 X-Google-Attributes: gidfd196,public X-Google-Thread: fe15c,82f69029abade678 X-Google-Attributes: gidfe15c,public From: Jon Shemitz <jon@midnightbeach.com> Subject: Re: How to initiate "OLE DDE"? Part 2. Date: 1998/02/19 Message-ID: <34ED1BD7.674F0756@midnightbeach.com> X-Deja-AN: 326847058 Content-Transfer-Encoding: 7bit References: <34EB6CC7.87BA23C9@midnightbeach.com> MIME-Version: 1.0 Reply-To: jon@midnightbeach.com Content-Type: text/plain; charset=us-ascii Organization: Midnight Beach Newsgroups: comp.os.ms-windows.programmer.ole,microsoft.public.win32.programmer.ole,borland.public.delphi.oleautomation