Interprocess Communication on Windows NT, Windows 95, & Win32s

Last reviewed: December 16, 1996
Article ID: Q95900
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT versions 3.1, 3.5, 3.51, and 4.0
        - Microsoft Windows 95 version 1.2, 1.25, 1.3, and 4.0
    

SUMMARY

The following are some of the standard mechanisms available for interprocess communication (IPC): NetBIOS, mailslots, windows sockets (winsock), named pipes, anonymous pipes, semaphores, shared memory, and shared files. Other IPC mechanisms available on Microsoft systems include DDE, OLE, memory-mapped files, Windows messages, Windows atoms, the registration database, and the clipboard.

MORE INFORMATION

The table below denotes what platforms and subsystems provide which IPC mechanisms (this does not imply that all the mechanisms will interoperate between different subsystems):

Interprocess Communication Mechanisms

   IPC Mechanism  WinNT  Win95  Win32s(1)  Win16(2)  MS-DOS(2)  POSIX  OS/2
   -------------  -----  -----  ---------  --------  ---------  -----  ----

             DDE  YES    YES    YES        YES        NO         NO     NO
         OLE 1.0  YES    YES    YES        YES        NO         NO     NO
         OLE 2.0  YES    YES    YES        YES        NO         NO     NO
         NetBIOS  YES    YES    YES        YES       YES         NO    YES
     Named pipes  YES    YES(3) YES(3)     YES(3)    YES(3)     YES(4) YES
 Windows sockets  YES(5) YES    YES        YES(5)     NO         NO(6)  NO
       Mailslots  YES    YES    YES(3)      NO        NO         NO    YES
      Semaphores  YES    YES     NO         NO        NO        YES    YES
             RPC  YES    YES(7) YES(8)     YES       YES         NO     NO
 Mem-Mapped File  YES    YES    YES         NO        NO         NO     NO
     WM_COPYDATA  YES    YES    YES(9)     YES        NO         NO     NO

(1) Win32s an extension to Windows 3.1, which allows Win32-based
    applications to run under Windows 3.1. Win32s supports all the Win32
    APIs, but only a subset provides functionality under Windows 3.1. Those
    APIs that are not functional return ERROR_CALL_NOT_IMPLEMENTED.

(2) This is technically not a subsystem.

(3) Cannot be created on Win16, Windows 95 and MS-DOS workstations, but can

    be opened.

(4) The POSIX subsystem supports FIFO queues, which do not interoperate
    with Microsoft's implementation of named pipes.

(5) Via the Windows sockets API.

(6) Currently BSD-style sockets are under consideration for the POSIX

    subsystem.

(7) Windows 95 supports the RPC 1 protocol only. The NetBios protocol is
    not supported. Namedpipe servers are not supported.

(8) Win32s version 1.1 provides network support through Universal Thunks.

(9) 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.

(10) OLE objects created in a Win32 service must be in the same user
   context as a logged on user that wishes to use them.  Any attempt to
   access these objects from a different user context will result in
   failure.  For example, a service that runs under the LocalSystem account
   creates an object that an application running in Domain\User's context
   attempts to access will fail.


KBCategory: kbprg
KBSubcategory: BseIpc
Additional reference words: 1.20 1.25 1.30 3.10 3.50 3.51 4.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 16, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.