This looks like it should work, but I've still got no joy. If I print the filename, it's still coming back as "0". Should I have to do anything to coerce $filename back into something that I can print? I'm wondering if the "Open" method is working in the first place.
It looks like I can get methods that want a pointer to a long to work by initializing them with $var = Variant(VT_I4|VT_BYREF, 0);. The docs say that the BSTR variables have to be initialized to NULL. Isn't that what we're doing with the $var = Variant(VT_BSTR|VT_EMPTY, 0) statment?
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.