OLE- LDAP - uSNChanged - Returns Unknown OLE Object

From: Stephan Klauberg (sk_at_klauberg.net)
Date: 07/21/04


Date: 21 Jul 2004 12:35:31 -0700

Hello *,

i'm useing OLE to connect to secured ADS / ADAM Server. To track
changes i'll use the uSNChanged attribute of a user Object but
Get or GetEx uSNChanged return a other OLE Object not a
Win32::OLE::Variant !!! And it is also not blessable to
Win32::OLE::Variant.
Can anyone tell me what kind of Object that is ? And witch Method to
Call to get the Value ???

Code:
8< ----------------------------------------------------------------------

use Win32::OLE;

# Test.uSNChanged.pl 127.0.0.1 389
"CN=Administrator,CN=Users,CN=ADAM1,DC=KN" "<password> " 0

my $host=$ARGV[0];
my $port=$ARGV[1];
my $user=$ARGV[2];
my $passwd=$ARGV[3];
my $authOptions=$ARGV[4]; # 0- PlainText, 1-Crypted

my $ldap=Win32::OLE-> GetObject("LDAP:");
my $ldapObj =
$ldap-> OpenDSObject("LDAP://".$host.":".$port."/".$user,$user,$passwd,$authOptions);

print $ldapObj-> Get('cn')."\n";
print $ldapObj-> Get('uSNChanged')."\n";
8=--------------------------------------------------------------------------

STDOUT
8<-------------------
Administrator
Win32::OLE=HASH(0x8d7690)
8=------------
Even throu ADO Stuff ....

TIA Stephan