![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2005
Posts: 29
Rep Power: 0
![]() |
I want to get reference to the activex object.Which method should I use GetObject or
I want to get reference to the activex object.Which method should I use GetObject or CreateObject?
|
|
|
|
|
|
#2 |
|
Expert Programmer
|
GetObject is when you want to get a handle to a single instance but multi-use (possibly MSTS) object, such as ActiveDirectory. e.g. GetObject("WinNT://mydomain/auser,user") returns an IADsUser object referencing a user in a domain, as opposed to creating a "user object" which is impossible.
CreateObject actually creates a new local copy of a multi-instance object such as the Windows Scripting Objects, as opposed to referencing an already existent object. You should always aim to use the right method: some objects work with both, though not always. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|