Factory method that can be used to create a PUBLIC instance of the wwDotNetBridge class. Use this method instead of explicitly instantiating the class to avoid recreating the .NET object wrapper object each time.

A PUBLIC instance named __DOTNETBRIDGE is created and cached. Calling this function either creates or reuses the existing instance.

DO wwDotNetBridge    && somewhere to load library
loBridge = GetwwDotNetBridge()

loConverter = loBridge.CreateInstance("rtfConverter.rtfConverter")


Optional - specify the .NET version that is to be loaded. If not specified the highest version is loaded.


This is a static function not a method of the class.

loBridge = GetwwDotnetBridge()

.NET is loaded only once

The .NET runtime can only load once into Visual FoxPro so the first time wwDotnetBridge is loaded determines which version of .NET is loaded. Any subsequent version requests are ignored.

To ensure that the proper version of .NET is used in your application we recommend you add a call to GetwwDotnetBridge (or CreateObject("wwDotnetBridge")) somewhere in your application startup code with the version you wish to load:

*** in your startup code
GetwwDotnetBridge("V4")  && forces .NET 4.x for entire app

See also:

Class wwDotNetBridge

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