PRB: NetDDE Fails to Connect Under Windows 95

Last reviewed: September 29, 1995
Article ID: Q131025
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows 95 version 4.0
    

SYMPTOMS

An application using Network Dynamic Data Exchange (NetDDE) fails to connect to another DDE application on another computer.

CAUSE

One of the reasons could be that NETDDE.EXE (a system component) is not running.

Network Dynamic Data Exchange (NetDDE) allows two DDE applications to communicate with each other over the network. In Windows for Workgroups, the NETDDE.EXE (a system component) was loaded by default. However under Window 95, NETDDE.EXE is not loaded by default.

RESOLUTION

An application using the netDDE services should check if the netDDE system component is loaded. if NETDDE.EXE isn't running, the application should run it.

Sample Code

The following sample code checks to see if NETDDE.EXE is loaded and tries to load it if necessary. The sample code works for both 32-bit and 16-bit applications.

BOOL IsNetDdeActive() { HWND hwndNetDDE;

// find a netDDE window
hwndNetDDE = FindWindow("NetDDEMainWdw", NULL);
// if exists then NETDDE.EXE is running
if(NULL == hwndNetDDE)
   {
   UINT  uReturn;
   // otherwise launch the NETDDE.EXE with show no active
   uReturn = WinExec("NETDDE.EXE", SW_SHOWNA);
   // if unsucessful return FALSE.
   if(uReturn <= 31)
      return FALSE;
   }
// NetDDE is running
return TRUE; }

STATUS

This behavior is by design.


Additional reference words: 4.00
KBCategory: kbui kbnetwork kbcode kbinterop
KBSubcategory: Usrdde


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: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.