PRB: NetDDE Fails to Connect Under Windows 95

ID: Q131025


The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API), included with:
    • Microsoft Windows 95


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 query words:

Keywords : kbnetwork kbAPI kbSDKPlatform kbWinOS95 kbCodeSam kbGrpNet
Version : winnt:
Platform : winnt
Issue type : kbprb


Last Reviewed: January 6, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.