WIKI article: GetObject in Team Developer

Post your tools and samples or ask for them.
Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Posts: 2956
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

WIKI article: GetObject in Team Developer

Post by Dave Rabelink » 12 Aug 2018, 10:40

Just added a new WIKI article how to use the GetObject functionality in Team Developer, widely used in scripting languages like JScript and VbScript.

The sample shows the usage of WMI and has a ready to go function PALActiveXGetObject, which is a wrapper for GetObject.

Sample of the usage to query the logged on user using WMI

Code: Select all

If PALActiveXGetObject( '', "winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2", uService, uError )
   ! Get the collection
   If uService.ExecQuery1( "Select * from Win32_ComputerSystem", uWbemObjectSet )
      Call uWbemObjectSet.PropGetCount( nTotal )
      While uWbemObjectSet.Next( uComputer )
         Call uComputer.PropGetUserName( sName )
         Call SalMessageBox( sName || " is logged on", "Msg", MB_Ok )

Article and source sample can be found here: ... workaround
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Igor Ivanovic
Site Admin
Site Admin
Posts: 1282
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

WIKI article: GetObject in Team Developer

Post by Igor Ivanovic » 13 Aug 2018, 09:36


Great article and sample!

Igor Ivanovic

Return to “Tools & Samples”

Who is online

Users browsing this forum: [Ccbot] and 0 guests