The information in this article applies to:
SUMMARYIn an Out of Process Automation Server, it is possible to display a modal dialog box, Messagebox, error message or Wait Window. However, if you distribute the server remotely, you do not want to have any user interface display. To prevent a server from going into a modal state, issue the SYS(2335,0) function. MORE INFORMATION
If any type of modal dialog appears in a remote server, the server
processing stops and the client appears to hang until some type of user
interaction handles the dialog. To prevent the server from going into a
modal state, use the SYS(2335,0) function early in the code. This is the
"Unattended Server Mode" and it causes Visual FoxPro to generate an error
if any type of modal user interface (UI) is attempted in the server code.
The error code is 2031:"User-interface operation not allowed at this time",
which is a trappable error.
Sample Code
To build this code, create a project and name it MySample. Copy and paste
this code into a .prg file and add it to the project. Build the project as
an EXE. To run the sample code from the Command window, issue the
following:
A Dialog box should display stating the 2031 error number, message, and
line number where the error occurs.
The SYS(2335) function is only for Out of Process Servers (EXE's); the In Process servers (DLL's) are by default in unattended mode and can not display any UI. REFERENCES
Visual FoxPro Help; search on: "SYS(2335)"; topic: "SYS(2335)- Unattended
Mode"
© Microsoft Corporation 1998, All Rights Reserved. Additional query words: kbvfp600
Keywords : |
Last Reviewed: August 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |