Creates an instance of a .NET class and passes it back to Visual FoxPro as a COM reference.

Types need to be loaded as fully qualified class names (ie. Namespace.Class).

Before you load the class specified make sure any required assemblies are loaded first with LoadAssembly().

o.CreateInstance(lcClass, lvParm1, lvParm2, lvParm3, lvParm4, lvParm5)

Return Value

.NET Object (via COM) or null.


The name of the instance type or class to instantiate. You must specify the fully qualified classname which is namespace plus class name. (System.Net.Mail.MailMessage)

An optional constructor parameter.

An optional second constructor parameter.


This method is limited to 5 parameters for the .NET constructor.

See also:

Class wwDotNetBridge

© West Wind Technologies, 2023 • Updated: 06/07/17
Comment or report problem with topic