Peripheral Devices
9836 3521 01 591
8.14.16 How to use the API
The API is developed in Visual Basic 6 as an ActiveX object and is as such callable from other languages
as well. Below are some examples on how to call the API from Visual basic.
Environment
Set up your Visual Basic environment according to the following
PowerMACSAPI must be installed on the computer
PowerMACSAPI must be checked in the project references dialog.
Do not create more than instance of the PowerMACSAPI.Api object in your application.
Declare a variable at module level
Private WithEvents mPowApi As PowerMACSApi.Api
Put some initiating code in the form load event
Set mPowAPi = New PowerMACSApi.APi
mPowApi.IpAddress = ”192.168.0.1”