The untyped way to use the COM DLL

As the ITLogLib2 COM DLL is registered in the system registry, just make sure your language supports registered COM components. Then use it the normal way you use other objects.

 

Example (WScript):

 

Dim objLogLibGlobals

Set objLogLibGlobals = WScript.CreateObject("ITLogLib2.ITLogLib")

 

' INITIALIZE iTech Logging Library

If Not objLogLibGlobals.Initialize("MyApp", "MyApp.icf", LicenseKey) _

Then

MsgBox "Initialization error"

WScript.Quit

End If

 

Note: The scripting languages normally don’t automatically support the constants defined by the type libraries registered in the system registry. So have to define the values of the ITLogLevel enum yourself in order to use them:

 

const LEVEL_INFO= 1

const LEVEL_WARNING= 2

const LEVEL_ERROR= 4

const LEVEL_ALARM= 8