Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

BUG: DDExecute Function Returns DMLERR_NOT_PROCESSED


View products that this article applies to.

This article was previously published under Q330337

↑ Back to the top


Symptoms

When you use dynamic data exchange (DDE) to establish a connection to Internet Explorer with WWW_OpenUrl, and you then use the DdeClientTransaction function with XTYP_EXECUTE to locate a specific Web page, the operation executes successfully, but Internet Explorer returns a DMLERR_NOTPROCESSED message instead of a DMLERR_NO_ERROR message.

↑ Back to the top


Cause

Several years ago Spyglass Inc. defined a Software Development Interface (SDI) that has served as the basis for most common inter-process communication (IPC) support in current browsers. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
160957 INFO: DDE Support in Internet Explorer Versions
In the original specification, the OpenURL verb was implemented in DDE as an XTYP_REQUEST transaction type with the topic of WWW_OpenURL, where the name of the item that is requested is the parameter to the OpenURL verb.

A DDE request uses atoms to identify the name of the item that is being requested. However, because atom names are limited to 255 bytes, the DDE implementation of OpenURL cannot open URLs that are longer than 255 bytes. Because of this, Internet Explorer permits the OpenURL verb to use the XTYP_EXECUTE transaction type, where the command string is used to pass the parameters to OpenURL. The command string is not an atom and therefore does not have the size limitation.

However, internally, Internet Explorer still responds to a WWW_OpenURL execute transaction as if it were a request transaction, which causes the DDE client program to receive a return value that indicates an error. This occurs because a server is supposed to respond to a DDE execute transaction with a DDE ACK message or NACK message, but in this case Internet Explorer responds with a WM_DDE_DATA message, which is appropriate for a DDE request.

↑ Back to the top


Workaround

To work around this problem, determine the length of the URL. If the length is less than 255 bytes, use XTYP_REQUEST. If the length is greater than 255 bytes, use XTYP_EXECUTE.

↑ Back to the top


Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

Steps to Reproduce the Behavior

The following sample code demonstrates DdeClientTransaction:
    // Connect to the service.
    HSZ service = DdeCreateStringHandle(instance, "IExplore", 0);
    HSZ topic   = DdeCreateStringHandle(instance, "WWW_OpenURL", 0);
    conv = DdeConnect(instance, service, topic, NULL);
    
    //Invoke DdeClientTransaction.

    DWORD dummy = 0;
    LPBYTE vCmd = (LPBYTE)cmd;
    DdeClientTransaction(vCmd, len, conv, 0, 0, XTYP_EXECUTE, 2000, &dummy);


    //You receive the error.    
    rc = DdeGetLastError(instance);
				

↑ Back to the top


References

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
191508 INFO: DDE Support in Internet Explorer Versions
For more information, visit the following Microsoft Developer Network (MSDN) Web site:

↑ Back to the top


Keywords: KB330337, kbnofix, kbbug

↑ Back to the top

Article Info
Article ID : 330337
Revision : 2
Created on : 5/12/2003
Published on : 5/12/2003
Exists online : False
Views : 422