Microsoft KB Archive/108925

{|
 * width="100%"|

INFO: DdeInitialize, DdeNameService, APPCMD_FILTERINITS

 * }

Q108925

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK) 3.1
 * Microsoft Win32 Application Programming Interface (API), used with:
 * Microsoft Windows NT Server versions 3.5, 3.51
 * Microsoft Windows NT Workstation versions 3.5, 3.51
 * Microsoft Windows 95

-

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 query words: 3.00 3.10 3.50 4.00

Keywords :

Issue type : kbinfo

Technology : kbAudDeveloper kbSDKSearch kbWin32sSearch kbWin32API kbWinSDKSearch