Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ActiveXObject or WScript.CreateObyect ?

27 views
Skip to first unread message

Enrico Bernardini

unread,
Jun 10, 1999, 3:00:00 AM6/10/99
to
Hi all,
In my opinion ActiveXObject is the same of WScript.CreateObject.
So, for example
f = new ActiveXObject("Scripting.FileSystemObject")
is equivalent to
f = WScript.CreateObject("Scripting.FileSystemObject")

Am I wrong? Have I missed anything (like event handler, perhaps)?

Thanks in advance
Enrico

John Grant

unread,
Jun 10, 1999, 3:00:00 AM6/10/99
to
Well one is the Javascript method and one is a VBScript method

Michael Harris

unread,
Jun 10, 1999, 3:00:00 AM6/10/99
to
When you use only one argument (the progid) , then WScript.CreateObject,
(jscript) new ActiveXObject, and (vbscript) CreateObject all accomplish the
same thing. It's when you get to the purpose of the 2nd argument that they
diverge. WScript uses it to support event sinking. The other two use it
for DCOM support (at least they're supposed to --- it doesn't work in
version 5.0 but will be in version 5.1).

--
Michael Harris


Enrico Bernardini <enr...@cli.di.unipi.it> wrote in message
news:375F737B...@cli.di.unipi.it...

0 new messages