DOCERR: WM_COPYDATA Is Also Supported on Win32s
PSS ID Number: Q108402
Article last modified on 04-28-1994

3.10

WINDOWS NT


----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Win32 Software Development Kit (SDK) for Windows NT
   version 3.1
----------------------------------------------------------------------

SUMMARY
=======

There are a number of methods that two processes (both 32-bit, or one 32-
bit and one 16-bit) can use to communicate on both Windows NT and Win32s.
These methods include the use of dynamic data exchange (DDE), the
clipboard, and object linking and embedding (OLE), all of which can involve
some amount of overhead.

Windows NT introduces a new message, WM_COPYDATA, which can be used to pass
data from one application to another. The Win32 "Programmer's Reference"
contains the following description

   WM_COPYDATA
   wParam = (WPARAM) (HWND) hwndFrom;
   lParam = (LPARAM) (PCOPYDATASTRUCT) pcds;

where wParam is the handle of the sending window and pcds is a pointer to
the structure that contains the data.

The documentation does not indicate that this message is supported under
Win32s; however, WM_COPYDATA is supported under Win32s.

Note that under Win32s, WM_COPYDATA does not actually copy the data--it
only translates the pointers to the data. If the receiving application
changes the buffer, then the data is changed for both applications.

Additional reference words: 3.10
KBCategory: Prg
KBSubcategory: BseMisc

=============================================================================

Copyright Microsoft Corporation 1994.
