BUG: After Switching OLE Client Hangs in Visual Basic 16-Bit

Last reviewed: November 28, 1995
Article ID: Q140032
The information in this article applies to:
  • Professional and Enterprise Editions of Microsoft Visual Basic, 16-bit only, for Windows, version 4.0

SYMPTOMS

When you create an OLE server program and an OLE client program in the 16-bit edition of Visual Basic for Windows, version 4.0 and run both programs, the client program stops responding after switching from the OLE server program back to the OLE client program.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start the 16-bit version of Visual Basic 4.0, or if it is already running, click New Project on the File menu.

  2. Use the following steps to create an OLE server called MyPop:

    a. On the menu, click Tools.

    b. On the Tools menu, click Options, and then click the Project tab.

    c. In the Project Name text box, type "MyPop." In the StartMode group, click OLE server. In the Application Description text box, enter Pop OLE server.

    d. Click OK to close the Options dialog box.

  3. Use the following steps to create a class module:

    a. On the menu, click Insert. On the Insert submenu, click Class Module. The code window for the Class1 class module appears.

    b. In the Properties window of the Class1 class module, set the Instancing Property to 2-Creatable MultiUse, and set the Public property to True.

  4. Add the following code to the Class1 code window:

    Private Sub Class_Initialize()

              Beep
           End Sub
    
           Private Sub Class_Terminate()
              Stop
           End Sub
    
    

  5. Add a label to Form1. Set the Caption of this label to "My OLE Server."

  6. Press the F5 key to start the program. Minimize this instance of Visual Basic.

  7. Start a second instance of Visual Basic 16-bit. In the Project window, Form1 is highlighted.

  8. On the File menu, click Remove File to remove Form1.

  9. On the Insert menu, click Module to create a module. The code window for Module1 is displayed. Add the following code to the Module1 code window:

           Sub Main()
              goo
           End Sub
    
    

  10. Create another module and add the following code into the Module2 code window:

           Sub goo()
              Set r = New Class1
              Set r = Nothing
           End Sub
    
    

  11. On the Tools menu, click References. The References dialog box is displayed with a list of all the objects that are available from other applications. In the Available References list box, scroll down the list until the Pop OLE Server check box is displayed. Click this check box. Click OK to close the References dialog box.

  12. Press the F8 key to single step through the program until you get to the Stop statement.

  13. Press ALT+TAB to return to the client. The client program stops responding.


Additional reference words: vb4win vb416 buglist4.00 hung hang
KBCategory: kbprg kbbuglist
KBSubcategory: IAPOLE


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 28, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.