Microsoft KB Archive/140032

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

Article ID: 140032

Article Last Modified on 12/9/2003

-

APPLIES TO


 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 16-bit Enterprise Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q140032



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.



Steps to Reproduce Problem
 Start the 16-bit version of Visual Basic 4.0, or if it is already running, click New Project on the File menu. Use the following steps to create an OLE server called MyPop:

 On the menu, click Tools. On the Tools menu, click Options, and then click the Project tab. 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. Click OK to close the Options dialog box.</li></ol> </li> Use the following steps to create a class module: <ol style="list-style-type: lower-alpha;"> On the menu, click Insert. On the Insert submenu, click Class Module. The code window for the Class1 class module appears.</li> In the Properties window of the Class1 class module, set the Instancing Property to 2-Creatable MultiUse, and set the Public property to True.</li></ol> </li>  Add the following code to the Class1 code window: Private Sub Class_Initialize Beep End Sub

Private Sub Class_Terminate Stop End Sub </li> Add a label to Form1. Set the Caption of this label to "My OLE Server."</li> Press the F5 key to start the program. Minimize this instance of Visual Basic.</li> Start a second instance of Visual Basic 16-bit. In the Project window, Form1 is highlighted.</li> On the File menu, click Remove File to remove Form1.</li>  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 </li>  Create another module and add the following code into the Module2 code window: Sub goo Set r = New Class1 Set r = Nothing End Sub </li> 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.</li> Press the F8 key to single step through the program until you get to the Stop statement.</li> Press ALT+TAB to return to the client. The client program stops responding.</li></ol>

Additional query words: vb4win vb416 buglist4.00 hung hang

Keywords: kbbug KB140032

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.