Getting Started
- Download setup.msi.
- Run setup.msi to install WWBNET07.DLL, WWB9_32W.DLL, WWB9_32A.DLL and WWB9_64.DLL.
Where's the Script Engine?
WWBNET07.DLL accesses WWB9_32W.DLL, WWB9_32A.DLL or WWB9_64.DLL for WinWrap® Basic script editing, debugging and execution. When deploying WinWrap® Basic .NET 2007 with your application, place WWBNET07.DLL, WWB9_32W.DLL, WWB9_32A.DLL, WWB9_64.DLL and any language resource dlls in the same folder as your application's executable.
Each version of WWBNET07.DLL is independent. The version of WWBNET07.DLL that you compile your application with is the one you should ship. Your project reference should use a local copy of the WWBNET07 assembly.
What's on the WinWrap® Basic Side
WinWrap® Basic .NET 2007 has two name spaces:
| .NET | Description |
| BasicIdeCtl | A .NET control that can be placed on a form. Macro editing, execution and debugging are supported through the IDE embedded in the form. |
| BasicNoUIObj | A .NET object that can be referenced or created without a containing form. Macro execution is supported through the object. Macro editing and debugging are not supported. |
| BasicIdeObj | A .NET object that can be referenced or created without a containing form. The IDE window for this object is not created until the CreateOverlappedWindow method is called. Macro execution is supported through the object. Macro editing and debugging are supported through the IDE in the overlapped window created by CreateOverlappedWindow. |
| Handler | A handler object provides access to a single WinWrap® Basic Sub or Function. |
| Handlers | A handlers collection is a collection of Handler objects. |
| Module (untyped Object) | The module object provides access to a WinWrap® Basic module's Public Subs, Functions and Properties. |
What's on the Application Side
A class used to extend the WinWrap® Basic language must implement the IDispatch interface. This is easily done. The following VB.NET/C#/C++ class can be used with AddExtensionWithEvents:
| Sample VB.NET Class |
<Microsoft.VisualBasic.ComClass(), _
System.Runtime.InteropServices.ComVisible(True)> _
Public Class AppObject
Private value_ As String
Public Event ValueChanged()
Public Property Value() As String
Get
Return value_
End Get
Set(ByVal NewValue As String)
value_ = NewValue
RaiseEvent ValueChanged()
End Set
End Property
'VB.NET doesn't support non-parametric
' default properties.
' If DispID 0 can't be found WinWrap Basic
' looks for _DefaultProperty_ instead.
Public Property _DefaultProperty_() As String
Get
Return Value
End Get
Set(ByVal NewValue As String)
Value = NewValue
End Set
End Property
End Class |
| Sample C# Class |
[ComVisible(true), InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface _AppObjectEvents
{
void ValueChanged();
}[ComVisible(true), ClassInterface(ClassInterfaceType.AutoDual),
ComSourceInterfaces(typeof(_AppObjectEvents))]
public class AppObject
{
private string value_; internal delegate void ValueChangedEventHandler();
internal event ValueChangedEventHandler ValueChanged; internal AppObject()
{
} [DispId(0)]
public string Value
{
get { return value_; }
set
{
value_ = value;
ValueChanged();
}
}
} |
| Sample C++ Class |
using namespace System;
using namespace System::Runtime::InteropServices;
[ComVisible(true), InterfaceType(ComInterfaceType::InterfaceIsIDispatch)]
public interface class _AppObjectEvents
{
[DispId(1)] void ValueChanged();
};
public delegate void ValueChangedEventHandler();
[ComVisible(true), ComSourceInterfaces(_AppObjectEvents::typeid)]
public ref class AppObject
{
public:
AppObject()
{
}
~AppObject()
{
}
[DispId(0)]
property String ^ Value
{
String ^ get()
{
return value_;
}
void set(String ^ value)
{
value_ = value;
ValueChanged();
}
}
private:
String ^ value_;
event ValueChangedEventHandler ^ ValueChanged;
}; |
What's on the User's Side
| Sample WinWrap® Basic script using VB.NET/C#/C++ class above |
Sub Main
AppObject = "hi"
End SubPublic Sub AppObject_ValueChanged()
MsgBox AppObject
End Sub |