PRB: "Multi Use" Cannot be Selected Until .exe is Created

Last reviewed: February 10, 1997
Article ID: Q162298
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 5.0

SYMPTOMS

When building an OLE Server, you may want to allow multiple users to access one instance of an OLE server executable. You can do this by selecting Multi Use in the Instances list that is located on the Servers tab in the Project Info dialog box. If the Project has not been built into an executable at least once, this selection is not available. This selection is only available after the executable has been built if olepublic is selected in the Class Info dialog box for a class in the Visual Class Library.

RESOLUTION

Build the executable. When the library is displayed, select Multi Use.

STATUS

This behavior is by design.

MORE INFORMATION

The Servers tab shows the class library name that is included in the project only after the executable has been built. So an OLE server executable that is designed to allow multiple users to access the same instance must be built at least twice. It must be built the first time so that the class library appears and you can select Multi Use for instancing. It must be built again so that the executable builds in multi use capability. Typically this is not a problem because the executable is built several times before it is made multi-user capable.

The project does not know that the class is marked as olepublic until the executable is built.

Steps to Reproduce Behavior

  1. Create a wait window program and add it to a new project.

  2. Add a library with a class in it to the project.

  3. Modify the class, mark its class as olepublic under the Class Info dialog box, and save the class.

  4. On the Project menu, click Project Info.

  5. Click the Servers tab. Nothing is displayed, and you cannot select Multi Use in the Instances list.

Build the executable, and check the Servers tab again. The library is displayed and you can select Multi Use in the Instances list.

NOTE: The same executable should not be used as an OLE server and as a standalone executable. If the executable is run as a standalone executable and then accessed as a server, two instances of the executable will run. The executable, running standalone, cannot be accessed as a server.

REFERENCES

"Visual FoxPro Developer's Guide," version 5, page 441


KBCategory: kbole kbtool kbprb
KBSubcategory: FxtoolDk FxtoolProjman vfoxwin
Additional reference words: 5.00


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: February 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.