On Mon, May 2, 2022 at 1:19 PM Rony G. Flatscher <rony.flatsc...@wu.ac.at> wrote:
> 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". > Mark Miesfield added overrides to a number of methods on the OLEObject (copy, class, send, etc.) class back in 2009 to check if the underlying OLE Object has a matching method name and do the dispatch as if the method had been overridden. > > 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 ? > The answer for an OLEObject is always going to be The OLEObject class. Rick > ---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 >
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel