Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: "pointers" for calling a DLL

by chinman (Monk)
on Feb 11, 2003 at 13:37 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2025-07-18 10:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.