| BasicNoUIObjModuleInstance Method | 
      Returns an instance of the 
Module object.
    
 WinWrap.Basic.Server (in WinWrap.Basic.Server.dll) 
 Syntax
Syntaxpublic Module? ModuleInstance(
	string fileName,
	bool createNew
)
Public Function ModuleInstance ( 
	fileName As String,
	createNew As Boolean
) As Module
public:
virtual Module^ ModuleInstance(
	String^ fileName, 
	bool createNew
) sealed
Parameters
- fileName  String
- 
      Get an object for this module.
      The filename string consists of two parts, each of which is optional:
      
        [modulepath|][param]
       If this modulepath is omitted, use the value of the
      FileName property as the file name.
- createNew  Boolean
- 
	  Only False is supported at this time (2025-01-24).
      If this is True then a new instance is created.
      (Only class or object modules can create new instances.)
      If this is False, the default object associated with the module is returned.
    
Return Value
Module
      An instance of the 
Module object implement by the module.
      If the module doesn't exist or has syntax errors null (
Nothing for Visual Basic) is returned.
      All syntax errors are reported via the 
Error property.
    
Implements
IBasicNoUIModuleInstance(String, Boolean) Remarks
Remarks
        All Public declarations in the module are available
        only through the returned object.
      
Macro/Module Paths
      Macro/module paths are typically file paths.
      However, it is sometimes useful to work with macros/modules that are not
      stored as files.
      A macro/module path is of the form:
      
| Part | Description | 
|---|
| '*' | Paths that being with '*' are non-file system macro/modules.
            The application provides the methods for reading and writing these files.
            Paths that begin and end with '*' are hidden from the IDE.
            User's can't step into or otherwise inspect the contents. | 
| '**' | Paths that begin with '**' are non-file system modules.
            The application provides the methods for reading and writing these files.
            Running an event-driven module loads it using LoadModule. | 
| path | This is the identity of the macro/module. | 
 Example
Example
Call the public sub called DoIt in TEST.BAS:
      
using (Module module = basicIdeCtl1.ModuleInstance("TEST.BAS", false))
{
    module.Call("DoIt");
}Using module As Module = BasicIdeCtl1.ModuleInstance("TEST.BAS", False)
    Module.Call("DoIt")
End Usingusing (Module module = basicIdeCtl1->ModuleInstance(L"TEST.BAS", false))
{
    module->Call("DoIt");
} See Also
See Also