| Creates a COM object from a file. |
|---|
|
GetObject(LoadedModuleID, clsid, strPrefix): Returns a reference to an Automation object from a file. Objects created with the GetObject method using the strPrefix argument are connected objects.These are useful when you want to sync an object's events. The object's outgoing interface is connected to the script file after the object is created. Event functions are a combination of this prefix and the event name. Here's an example that creates a COM object (with outgoing methods - events).: //JScript
var id = System.LoadLibrary("activex.dll");
var obj = System.GetObject(id, "{9ACBF10A-ECE2-4F01-905B-1384EC0F8206}", "prefix");
obj.HelloWorld("DDD", 64);
//
'VBScript
Dim obj, id
id = System.LoadLibrary("activex.dll")
Set obj = System.GetObject(id, "{9ACBF10A-ECE2-4F01-905B-1384EC0F8206}", "prefix")
obj.HelloWorld "DDD", 64
'
|
| The advanced scripting shell. It is not wscript.exe! |