Jump to content

propput, propget and the same method name IN HRESULT


Go to solution Solved by LarsJ,

Recommended Posts

I try to create interface_description for ObjCreateInterface function
Here the part of interface:

[id(0x00000002), propput, helpstring("Default")]
        HRESULT Default([in] BSTR TokenId);
        [id(0x00000002), propget, helpstring("Default")]
        HRESULT Default([out, retval] BSTR* TokenId);

you can see that there are two the same method Default.
first is [in], second is - [out].

how to write a description of this?

Default hresult(bstr;);Default hresult(bstr*); - is it correct?

or so?
Default hresult(bstr;bstr*);
please help.

Edited by Inververs
Link to comment
Share on other sites

  • Solution

This code snippet seems to be from an IDL-file. To translate interface descriptions to AutoIt, it's normally easier to use the header file. Then you'll see, that the implementation probably should be something like this:

 

get_Default hresult(bstr);
put_Default hresult(bstr*);
Link to comment
Share on other sites

Yes, this is from idl-file. 
 
If header this is:

virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Default( 
            /* [in] */ __RPC__in const BSTR TokenId) = 0;
        
        virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Default( 
            /* [retval][out] */ __RPC__deref_out_opt BSTR *TokenId) = 0;

 
thank you, LarsJ

Link to comment
Share on other sites

According to the header file this is probably more correct:

put_Default hresult(bstr);
get_Default hresult(bstr*);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...