NSBasic Win32 components provide access to various useful OS features for the NSBasic applications. Currently (version 2.0.1) the following objects are included in this library:

Timer object

ProgID: NSBasic.win32.Timer
ClassID: {ACE050A1-EEF9-435B-8D29-0D676727188B}
Create example: AddObject "NSBasic.win32.Timer", MyTimer

Tray object

ProgID: NSBasic.win32.Tray
ClassID: {5334D155-E526-4A1D-B03F-86B112DC8D3A}
Create example: AddObject "
NSBasic.win32.Tray", MyTray

Registry object

ProgID: NSBasic.win32.Registry
ClassID: {602E25DA-DBE7-4358-A542-1DFEC6793443}
Create example: AddObject "NSBasic.win32.Registry", MyRegistry

RAS Object

ProgID: NSBasic.win32.RAS
ClassID: {38CE02DD-7A75-4077-A1A8-DEC520CD618A}
Create example: AddObject "NSBasic.win32.RAS", MyRas

See also: RASEntry object and RASConState object which are non-creatable. They are obtained from the RAS object (See Entry, Connections, Entries) and RASEntry.Status respectively

API object

ProgID: NSBasic.win32.api
ClassID: {9217A3CE-4560-45D0-853C-F4CBCAD694C4}
Create example: AddObject "NSBasic.win32.api", MyApi

See also: PtOrRect object which is used by some routines that return/accept point or rectangle. 

Creation notes

To use a particular object you need to add it to your application. For example:
AddObject "NSBasic.win32.RAS", "ras"
later in the code you use it like this, for example:
Set connections = ras.Connections

In other words you use the ProgID of the object to create it and you specify a name of your choice for the created object.

For the most objects the best place to use the AddObject statement is the FormX_Load. However, objects like the Registry for instance are often used only in some specific parts of the application which are not always executed. In such case you can add the object in the routine that begins the task that needs the object and thus save some memory when the object is not needed.

The Tray and the Timer object have important events without which their usage is almost meaningless. This makes FormX_Load the best place for their creation.  

Supported platforms

The library is available as single DLL named: NSBasicWin32ax.dll

Builds are available for: Windows NT4/2000/XP/2003/Vista and later, Palm-sized PC, Handheld PC (all versions), Pocket PC, Pocket PC 2002, 2003/SE, 2005 (WM5) and later, MS Smartphone 2003/WM5 and later, custom CE.NET 4.0 or later based devices.

Compatibility with the old version - MGCEWin32 library.

This library is a reincarnation of the Mark Gamber's MGCEWin32 library, written anew from scratch only following the interface layout of the MGCEWin32 library as far as possible. All the creatable objects have a property named Version which return the class version as Major * 100 + Minor. For example 201 is returned for version 2.01. The legacy MGCEWin32 library classes have this property as well and it returns 10X. If you are porting code that uses MGCEWin32 library you can use this property to resolve compatibility issues. Alternatively you can change the code to use the new version and re-pack the application with the new DLL.

NSBasicWin32 is almost fully compatible with the older MGCEWin32 on usage syntax level, but there are some differences and additions. Some of the changes were needed in order to correct some problems in the old version, others were made in order to improve the usage and implement new features. Still, about 90% of the methods and properties are the same or defined with optional arguments in such manner that will permit old code to run without changes. Major differences can be found only in the RAS object which in contrast to the old version is now a root object of a hierarchy of objects that allow more convenient work with RAS phonebook entries.