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
 Goto not working with STDMETHOD_ macro
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pwc
Tomato Guru

138 Posts

Posted - Aug 15 2012 :  11:53:14 AM  Show Profile  Reply with Quote
Hello,

In a header have:


class CMyClass : public IUnknown
{
public: 
	CMyClass();
	STDMETHOD(QueryInterface)(REFIID riid, void **ppvObject);
	STDMETHOD_(ULONG, AddRef)(void);
	STDMETHOD_(ULONG, Release)(void);
};

In the corresponding cpp file:

STDMETHODIMP CMyClass::QueryInterface(REFIID riid, void **ppvObject)
{
	if(!ppvObject)
		return E_POINTER;
	if(riid == IID_IUnknown)
	{
		*ppvObject = static_cast<IUnknown*>(this);
		AddRef();
		return S_OK;
	}
	return E_NOINTERFACE;
}

STDMETHODIMP_(ULONG) CMyClass::AddRef(void)
{
	return 2;
}

STDMETHODIMP_(ULONG) CMyClass::Release(void)
{
	return 1;
}



In the header, trying hitting alt-g on AddRef or Release - nothing happens. QueryInterface works.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Aug 15 2012 :  11:27:13 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=58457
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