Export (0) Print
Expand All
Expand Minimize

SET PROCEDURE Command

Opens a procedure file.


SET PROCEDURE TO [FileName1 [, FileName2, ...]] [ADDITIVE]

Parameters

FileName1[, FileName2, ...]

Specifies the sequence in which files are to be opened. SET PROCEDURE can take more than one file name, making it possible for you to open several procedure files at once. This option makes it possible for you to create stand-alone libraries of functions and specify them separately.

ADDITIVE

Opens additional procedure files without closing currently open procedure files.

Issuing SET PROCEDURE TO without any file names closes all open procedure files. Use RELEASE PROCEDURE to close individual files.

When you execute a procedure, the procedure files are searched if the procedure isn't located in the currently executing program.

For more information about procedure files, see PROCEDURE Command and DO Command.

If a COM dynamic-link library (DLL) which uses SET PROCEDURE TO is instantiated more than once, the Init method of the second instance may fail with one of the following messages:

OLE error code 0x80004005: Unspecified error.

OLE error code 0x80020009: Exception occurred.

To instantiate an OLEPUBLIC class, Visual FoxPro must be able to find all the code for the class. There is an internal SET PROCEDURE/SET CLASSLIB to detect all the related code; if you try to change this setting, an error occurs. To prevent this, use SET PROCEDURE TO with the ADDITIVE keyword.

Community Additions

ADD
Show:
© 2014 Microsoft