Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: "pointers" for calling a DLL

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


in reply to "pointers" for calling a DLL

Hey, thanks to everyone for your help so far...I think I'm almost there. I can get the methods that reference either longs or doubles to work.

I'm still having problems with any method requires a pointer to a string. I am referring to the usage under the dispinterface IXRawfile in the OLEview. For the GetFileName method it is:

[id(0x00000003), helpstring("method GetFileName")] void GetFileName(BSTR* pbstrFileName);

Now if I look in the user documentation for the library it says that "the pbstrFileName variable is a valid pointer to a BSTR variable. This variable must exist and be initialized to NULL." My question is, does this bit of code initialize this variable to NULL? I can't see any reason why this should not work...dang.

my $filename = Variant(VT_BSTR|VT_BYREF, 0);

Thanks, chinman

Replies are listed 'Best First'.
Re^2: "pointers" for calling a DLL
by Solo (Deacon) on Feb 11, 2003 at 13:51 UTC
    The manual says:

    my $filename = Variant(VT_BSTR|VT_BYREF, VT_NULL);
    --
    Without precise calculations we could fly right through a star or bounce too close to a supernova and that'd end your trip real quick, wouldn't it?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2022-08-07 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?