Re: COM issue, problems with return type.

From: Date: Fri, 15 Nov 2002 22:51:55 +0000
Subject: Re: COM issue, problems with return type.
Groups: php.windows 
Request: Send a blank email to php-windows+get-16980@lists.php.net to get a copy of this message
imho, the best documentation of the COM functionality is done by the random people who post comments to the online documentation here: http://www.php.net/manual/en/ref.com.php About the return value, it might be an array, or it might just be a reference to another COM object. Try this: echo $groups; If its an object or a reference, then you're only hope is to look at the COM documentation for Active Directory to see how one interates through group objects. If its anything like LDAP, its probably a big pointless convoluted mess. This link might be of use: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/adsi/active_directory_service_interfaces_adsi.asp good luck! -- Brian 'Bex' Huff bex@stellent.com Phone: 952-903-2023 Fax: 952-829-5424 > Hello all, > > I am having a little problem with return types from a COM object. Basically > (code follows) I get a collection back from the object and I can not figure > out a way to iterate through this collection. Posted is a snippet of test > code that I hope one of you can help me with. > > > <?php > echo "Starting\n"; > > $system = new COM("ADSystemInfo") or die("failed to get system info"); > $usr = new COM("WinNT://$system->DomainDNSName/USERID,user") or > die("failed on usr"); > $groups = $usr->Groups() or die("fail"); > > > //Groups should be a collection of objects that I can iterate through, but > for > //of me I can't figure out how. > > //iteration through group should be here. > > ?> > > > If someone could point me to some relevent documentation about this It > would be great. > > Thanks, > Eric

« previous php.windows (#16980) next »