DdeInitialize(), DdeNameService(), APPCMD_FILTERINITS

Last reviewed: November 2, 1995
Article ID: Q108925
The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) versions 3.1
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT versions 3.5 and 3.51
        - Microsoft Windows 95 version 4.0
    

SUMMARY

DdeInitialize() and DdeNameService() work as complimentary functions during initialization of a server application. When called for the first time to initialize a server application, DdeInitialize() will cause DDEML to append the APPCMD_FILTERINITS flag to the third parameter of the function call by default. Once this flag is set, client applications will not be able to connect to the server until it is reset. This flag is reset when the function DdeNameService() is called to register the service name with DDEML. Also, if the server wishes to remain anonymous, then DdeInitialize() must be called the second time to specifically turn off the APPCMD_FILTERINITS flag.

MORE INFORMATION

The DdeInitialize() function registers an application with DDEML. This function must be called by both the client and the server applications before calling any other DDEML function.

When the server application calls DdeInitialize() for the first time, DDEML appends the APPCMD_FILTERINITS flag to the third parameter of the function call, regardless of whether the application specifies this flag. This flag when used, will prevent DDEML from sending the XTYP_CONNECT and XTYP_WILDCONNECT transactions to the server application until the server has created its string handles and performed other application-specific initialization. The server application then calls DdeNameService() to register its service name with DDEML so that other client or server applications are notified of its existence. Calling DdeNameService() after the server has gone through the process of initialization turns off the APPCMD_FILTERINITS flag.

Some DDEML server applications might not want to register their names with DDEML because of various reasons (for example, the server application is a custom server application that wants to service particular clients, and thus wishes to remain anonymous to the rest of the system).

In special cases like this, an application may choose not to call the DdeNameService() function, because this function broadcasts the name of the server to all DDEML applications on the system. Not calling the DdeNameService() function, however, causes the APPCMD_FILTERINIT flag not to be reset properly, thus keeping the server from getting any XTYP_CONNECT or XTYP_WILDCONNECT transactions even from its clients.

One other way to reset this flag is to call DdeInitialize() a second time, without specifying the APPCMD_FILTERINITS flag.


Additional reference words: 3.00 3.10 3.50 3.51 4.00 95
KBCategory: kbui
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: November 2, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.