[comp.windows.ms.programmer] DDE Binary data transfer

keogh@nixeid.UUCP (Paul Keogh) (11/30/90)

Is it possible to transfer simple binary data using the DDE messaging 
facility ?. All indications to date confine the format of DDE data to one of
the defined LF_ formats in <windows.h>. All these formats are either 
restricted data sets or have additional structures which describe the data.

It seems crazy for *any* messaging mechanism not to support the simplest of
data formats - unstructured binary, so hopefully I've missed something. The
only solution to date that I can see is using something like the CF_DIB format
which would represent my binary data as a device independent bitmap with an
associated but totally meaningless BITMAPINFO structure at the start of the
global memory block.

Thanx,
Paul Keogh
keogh@u.nix.ie
-- 

Paul Keogh : 	
Passes the day @ : Nixdorf Computer Research & Development
		   Dublin, Ireland.
		   353-1-767551
Lives on the net @ : keogh@u.nix.ie

mojo@netcom.UUCP (Morris Jones) (12/05/90)

keogh@nixeid.UUCP (Paul Keogh) writes:
>Is it possible to transfer simple binary data using the DDE messaging 
>facility ?. 

As long as the sending and receiving applications know the Clipboard
format number, you should be able to send anything at all by DDE.  I have
DDE applications which use a set of USER clipboard formats for the data.

Mojo

-- 
mojo@netcom.UUCP          Site Coordinating Instructor, San Jose South
Morris "Mojo" Jones       Skilled Motorcycling And Rider Training (S.M.A.R.T.)
Campbell, CA              800-675-5559 ... 800-CC-RIDER ...  408-423-2212
AA4KB @ N6LDL.#NOCAL.CA.USA.NA / aa4kb.ampr.org / netcom!mojo@apple.com

goodearl@world.std.com (Robert Goodearl) (12/06/90)

In article <18117@netcom.UUCP> mojo@netcom.UUCP (Morris Jones) writes:
>keogh@nixeid.UUCP (Paul Keogh) writes:
>>Is it possible to transfer simple binary data using the DDE messaging 
>>facility ?. 
>
>As long as the sending and receiving applications know the Clipboard
>format number, you should be able to send anything at all by DDE.  I have
>DDE applications which use a set of USER clipboard formats for the data.
>

In answer to the first question, yes.  You simply register your own clipboard
format, using a name which is likely to be unique.  As long as both
applications register with the same name, they will use the same format.
Once you have your own clipboard format, you are free to do with it what
you want.  You will need a header that at minimum says how long the data
in the message is, since the DDE_DATA message has no provision for passing
length of data.

As an addition to the resonse,
you could also have one application register the clipboard format and the
other look up the name.  Once you've checked a clipboard format number
to insure that it is NOT a predefined format, you can get the name of the
format with GetClipboardFormatName().
-- 
Bob Goodearl -- goodearl@world.std.com