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
 Move implementation to source bug
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pwc
Tomato Guru

138 Posts

Posted - Dec 10 2015 :  3:55:39 PM  Show Profile  Reply with Quote
Hi,

The 'move implementation to source file' drops the const modifier if COM macros are used.

In a header file:


class Test
{
public:
	STDMETHOD(GetValue)(const wchar_t** val) const { return E_NOTIMPL; }
	bool GetValue2(double** val) const { return false; }
};


If you execute the command on the GetValue function, you'll get this in the cpp file:


STDMETHODIMP Test::GetValue(const wchar_t** val)
{
	return E_NOTIMPL;
}


Notice that const is missing from the end - the generated code will not compile. I am pleased to see that VAX know to convert STDMETHOD to STDMETHODIMP - very nice.

Doing the same operation on GetValue2 works fine.

Thanks,
Paul

pwc
Tomato Guru

138 Posts

Posted - Dec 10 2015 :  3:56:43 PM  Show Profile  Reply with Quote
Sorry, I forgot to include my system info:

License:
VA_X.dll file version 10.9.2076.0 built 2015.09.15
DevEnv.exe version 12.0.31101.0 Ultimate
msenv.dll version 12.0.31101.0
Comctl32.dll version 6.10.9600.18006
Windows 8.1 6.3 Build 9600
12 processors (x86-64, WOW64)
Language info: 1252, 0x409

Platform: Project defined
Stable Includes:
C:\\Program Files (x86)\\Windows Kits\\8.1\\Include\\winrt;
C:\\Program Files (x86)\\Windows Kits\\8.1\\Include\\shared;
C:\\Program Files (x86)\\Windows Kits\\8.1\\Include\\um;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\include;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include;

Other Includes:

Stable Source Directories:
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\crt\\src;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\src\\atl;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\src\\mfcm;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\src\\mfc;

-Paul
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 11 2015 :  12:54:17 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

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