Currently "samples\ole\adsi\adsi4.rex" looks like:
/*******************************************************************/
/* ADSI Sample 4: */
/* */
/* Using filters with ADSI collections. */
/* */
/*******************************************************************/
ComputerName = value("COMPUTERNAME",,"ENVIRONMENT")
computerObject = .OLEObject~GetObject("WinNT://"||ComputerName)
computerObject~Filter = .array~of("Group","Service")
/* show only objects of type Group and Service: */
do item over computerObject
say item*~class* ":" item~name
end
return 0
Running it via 32-bit Rexx (r12376) yields on my machine:
C:\Program Files (x86)\ooRexx\samples\ole\adsi>bkp\adsi4.rex
Group : Administratoren
... cut ...
Group : System Managed Accounts Group
... cut ...
Service : AdobeARMservice
Service : AESMService
Service : AGMService
Service : AGSService
Service : AJRouter
Service : ALG
Service : AppHostSvc
Service : AppIDSvc
Service : Appinfo
Service : Apple Mobile Device Service
Service : AppMgmt
Service : AppReadiness
Service : AppVClient
Service : AppXSvc
Service : aspnet_state
Service : AssignedAccessManagerSvc
Service : AudioEndpointBuilder
Service : Audiosrv
Service : autotimesvc
Service : AxInstSV
Service : BDESVC
Service : BFE
... cut ...
However, this seems like an error as "item~class" should yield "The OLEObject class" instead of the
strings "Group" or "Service".
OLE programs should employ either "item~unknown('class',.array~new)" or "item~dispatch('class')" to
get the message "CLASS" to be transported to the Windows side.
How can one get at the ooRexx class object in this case ?
---rony
P.S.: Also "adsi3.rex" now causes the following error:
C:\Program Files (x86)\ooRexx\samples\ole\adsi>adsi3
49 *-* do member over container~members
Error 97 running C:\Program Files (x86)\ooRexx\samples\ole\adsi\adsi3.rex
line 49: Object method not found.
Error 97.1: Object "The NIL object" does not understand message "MEMBERS".
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel