Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Template for STDMETHOD create impl?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

peterchen
Tomato Guru

126 Posts

Posted - Jan 29 2019 :  06:36:02 AM  Show Profile  Reply with Quote
When I have a COM class declaration containing


struct CoClass
{
  STDMETHOD(MemFn)();
};


and I choose "create implementation" for MemFn, I get


STDMETHODIMP CoClass::MemFn()
{
   return S_OK;
}


This seems to be a custom body for this type of method (it is not the "Create From Usage Method Body" snippet), but I can't find where I can customize this.

Independent of making it customizable, consider making "return E_NOTIMPL" the default. his wpuld be the equivalent of throwing a not-implemented-exception.

Thank you!

(edit: fixed formatting)

Edited by - peterchen on Jan 29 2019 10:49:51 AM

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jan 29 2019 :  07:18:16 AM  Show Profile  Reply with Quote
A good point, I cannot see any way to control this default body either, I have put in a feature request for this, we really should have control here:

case=135767

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000