<LI><A HREF="#getobject() and getactiveobject() now support optional destructor argument"><CODE>GetObject()</CODE> and <CODE>GetActiveObject()</CODE> now support optional DESTRUCTOR argument</A></LI>
<LI><A HREF="#remote object instantiation via dcom">Remote object instantiation via DCOM</A></LI>
<LI><A HREF="#enumerate all win32::ole objects">Enumerate all Win32::OLE objects</A></LI>
<LI><A HREF="#the variant>put() method now returns the variant object itself">The VARIANT-><CODE>Put()</CODE> method now returns the VARIANT object itself</A></LI>
<LI><A HREF="#the variant>put(arrayref) form allows assignment to a complete safearray">The VARIANT-><CODE>Put(ARRAYREF)</CODE> form allows assignment to a complete SAFEARRAY</A></LI>
<LI><A HREF="#new win32::ole::nls methods: sendsettingchange() and setlocaleinfo()">new Win32::OLE::NLS methods: <CODE>SendSettingChange()</CODE> and <CODE>SetLocaleInfo()</CODE></A></LI>
<LI><A HREF="#win32::ole::const now correctly treats version numbers as hex">Win32::OLE::Const now correctly treats version numbers as hex</A></LI>
<LI><A HREF="#more robust global destruction of win32::ole objects">more robust global destruction of Win32::OLE objects</A></LI>
</UL>
<LI><A HREF="#version 0.1005 (changes since 0.1003)">Version 0.1005 (changes since 0.1003)</A></LI>
<UL>
<LI><A HREF="#optional destructor for getactiveobject() getobject() class methods">optional DESTRUCTOR for <CODE>GetActiveObject()</CODE> <CODE>GetObject()</CODE> class methods</A></LI>
<P>Please read further documentation in Win32::OLE.</P>
<P>
<H2><A NAME="getobject() and getactiveobject() now support optional destructor argument"><CODE>GetObject()</CODE> and <CODE>GetActiveObject()</CODE> now support optional DESTRUCTOR argument</A></H2>
<P>It is now possible to specify a DESTRUCTOR argument to the <CODE>GetObject()</CODE> and
<CODE>GetActiveObject()</CODE> class methods. They work identical to the <CODE>new()</CODE> DESTRUCTOR
argument.</P>
<P>
<H2><A NAME="remote object instantiation via dcom">Remote object instantiation via DCOM</A></H2>
<P>This has actually been in Win32::OLE since 0.0608, but somehow never got
documented. You can provide an array reference in place of the usual PROGID
parameter to Win32::OLE->new():</P>
<PRE>
OBJ = Win32::OLE->new([MACHINE, PRODID]);</PRE>
<P>The array must contain two elements: the name of the MACHINE and the PROGID.
This will try to create the object on the remote MACHINE.</P>
<P>
<H2><A NAME="enumerate all win32::ole objects">Enumerate all Win32::OLE objects</A></H2>
<P>This class method returns the number Win32::OLE objects currently in
existance. It will call the optional CALLBACK function for each of
these objects:</P>
<PRE>
$Count = Win32::OLE->EnumAllObjects(sub {
my $Object = shift;
my $Class = Win32::OLE->QueryObjectType($Object);
printf "# Object=%s Class=%s\n", $Object, $Class;
});</PRE>
<P>The <CODE>EnumAllObjects()</CODE> method is primarily a debugging tool. It can be
used e.g. in an END block to check if all external connections have
been properly destroyed.</P>
<P>
<H2><A NAME="the variant>put() method now returns the variant object itself">The VARIANT-><CODE>Put()</CODE> method now returns the VARIANT object itself</A></H2>
<P>This allows chaining of <CODE>Put()</CODE> method calls to set multiple values in an
<H2><A NAME="the variant>put(arrayref) form allows assignment to a complete safearray">The VARIANT-><CODE>Put(ARRAYREF)</CODE> form allows assignment to a complete SAFEARRAY</A></H2>
<P>This allows automatic conversion from a list of lists to a SAFEARRAY.
<P>There are four new methods for formatting variant values: Currency(), Date(),
<CODE>Number()</CODE> and Time(). For example:</P>
<PRE>
my $v = Variant(VT_DATE, "April 1 99");
print $v->Date(DATE_LONGDATE), "\n";
print $v->Date("ddd',' MMM dd yy"), "\n";</PRE>
<P>will print:</P>
<PRE>
Thursday, April 01, 1999
Thu, Apr 01 99</PRE>
<P>
<H2><A NAME="new win32::ole::nls methods: sendsettingchange() and setlocaleinfo()">new Win32::OLE::NLS methods: <CODE>SendSettingChange()</CODE> and <CODE>SetLocaleInfo()</CODE></A></H2>
<P><CODE>SendSettingChange()</CODE> sends a WM_SETTINGCHANGE message to all top level windows.</P>
<P><CODE>SetLocaleInfo()</CODE> allows changing elements in the user override section of the
locale database. Unfortunately these changes are not automatically available
to further Variant formatting; you have to call <CODE>SendSettingChange()</CODE> first.</P>
<P>
<H2><A NAME="win32::ole::const now correctly treats version numbers as hex">Win32::OLE::Const now correctly treats version numbers as hex</A></H2>
<P>The minor and major version numbers of type libraries have been treated as
decimal. This was wrong. They are now correctly decoded as hex.</P>
<P>
<H2><A NAME="more robust global destruction of win32::ole objects">more robust global destruction of Win32::OLE objects</A></H2>
<P>The final destruction of Win32::OLE objects has always been somewhat fragile.
The reason for this is that Perl doesn't honour reference counts during global
destruction but destroys objects in seemingly random order. This can lead
to leaked database connections or unterminated external objects. The only
solution was to make all objects lexical and hope that no object would be
trapped in a closure. Alternatively all objects could be explicitly set to
<A HREF="../../../../lib/Pod/perlfunc.html#item_undef"><CODE>undef</CODE></A>, which doesn't work very well with exception handling.</P>
<P>With version 0.1007 of Win32::OLE this problem should be gone: The module
keeps a list of active Win32::OLE objects. It uses an END block to destroy
all objects at program termination <EM>before</EM> the Perl's global destruction
starts. Objects still existing at program termination are now destroyed in
reverse order of creation. The effect is similar to explicitly calling
Win32::OLE-><CODE>Uninitialize()</CODE> just prior to termination.</P>
<P>
<HR>
<H1><A NAME="version 0.1005 (changes since 0.1003)">Version 0.1005 (changes since 0.1003)</A></H1>
<P>Win32::OLE 0.1005 has been release with ActivePerl build 509. It is also
included in the <EM>Perl Resource Kit for Win32</EM> Update.</P>
<P>
<H2><A NAME="optional destructor for getactiveobject() getobject() class methods">optional DESTRUCTOR for <CODE>GetActiveObject()</CODE> <CODE>GetObject()</CODE> class methods</A></H2>
<P>The <CODE>GetActiveObject()</CODE> and <CODE>GetObject()</CODE> class method now also support an
optional DESTRUCTOR parameter just like Win32::OLE->new(). The DESTRUCTOR
is executed when the last reference to this object goes away. It is
generally considered <CODE>impolite</CODE> to stop applications that you did not