FIX: Unable to Communicate to Multiple IE 3.x Threads via DDE

ID: Q167821


The information in this article applies to:


SYMPTOMS

An application can successfully establish a DDE communication with every Internet Explorer 3.x process, but not to subsequent IE 3.x threads spawned from that process.


CAUSE

Internet Explorer 3.x's DDE implementation does not support multiple threads.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Microsoft Internet Explorer 5.


MORE INFORMATION

A distinction needs to be made between an Internet Explorer 3.x process and an Internet Explorer 3.x thread. A new Internet Explorer 3.x process is launched every time Internet Explorer 3.x is launched from the Windows shell. On the other hand, a new Internet Explorer 3.x thread is spawned from the same process every time a user selects File.New Window from the Internet Explorer menu.

Internet Explorer 3.x's DDE implementation calls DdeInitialize() once per process, not per thread. The application instance identifier returned in the pidInst parameter of the DdeInitialize function is local to the calling thread.

Because of this, no DDE conversation is established with subsequent threads spawned from an Internet Explorer 3.x process.

Steps to Reproduce Behavior

  1. Launch an instance of Internet Explorer 3.x from the Windows shell by double-clicking on the Internet Explorer icon on the Windows desktop.


  2. From an application, for example GENERIC, establish a DDE conversation with Internet Explorer 3.x, using the following:
    
    application Name = iexplore, 
    -and-
    
    topic Name       = WWW_RegisterUrlEcho 
    As a result, GENERIC can be notified of URLEcho events whenever a URL gets loaded in Internet Explorer 3.x.


  3. Note that GENERIC gets notified whenever the Internet Explorer navigates to a URL.


  4. Spawn a new Internet Explorer thread by selecting "New Window" from the File menu. Observe a new Internet Explorer window appear on the screen.


  5. From this newly-spawned thread, navigate to a different URL (for example "http://www.microsoft.com"). Observe that GENERIC does not get notified of URLEcho events as this new thread loads a different URL.


  6. Activate the original Internet Explorer window, and navigate to a different URL (for example, "http://www.microsoft.com/ie/default.asp"). Watch GENERIC get notified of URLEcho events as this instance of Internet Explorer navigated to the new URL.


The DDE connection is established only with Internet Explorer's primary thread, but not with subsequently-spawned threads.


REFERENCES

Q94091 DDEML Application-Instance IDs Are Thread Local

Additional query words:


Keywords          : kbIE300bug kbIE301bug kbIE302bug kbIE500fix 
Version           : 
Platform          : 
Issue type        : kbbug 

Last Reviewed: April 8, 1999