Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: "pointers" for calling a DLL

by chinman (Monk)
on Feb 11, 2003 at 04:42 UTC ( #234319=note: print w/replies, xml ) Need Help??

in reply to "pointers" for calling a DLL


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?


Replies are listed 'Best First'.
Re^2: "pointers" for calling a DLL
by Solo (Deacon) on Feb 11, 2003 at 12:04 UTC
    Variant BSTRs should automatically print nicely.

    You say you found GetFileName in OLE View, but was it of type "Dispinterface" or something else? Do you have an automation/scripting object model for the component--or can you get one?

    COM/OLE components can contain interfaces that only C/C++ can hit. And they often contain thin wrappers, called Dispinterfaces, around these C/C++ calls that VB, vbs, Perl, et al can easily use. You may have found the wrong one. I wonder if the syntax is going to be something different... for instance:

    my $filename = $XRawFile->{Filename};

    ** /me shrugs ** But this is just a hunch.

    Never tell me the odds!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://234319]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2022-08-13 07:09 GMT
Find Nodes?
    Voting Booth?

    No recent polls found