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
 Macro-function header confuses VAX
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

BruteForce
Senior Member

Greece
32 Posts

Posted - Dec 16 2010 :  10:12:03 PM  Show Profile  Reply with Quote
Hi,

I use a set of macros to define the signature and test functions and VAX seems to get confused by these macros and underlines with red all variables in the code making my life a total misery...



If I expand the macro myself then VAX seems to be having no trouble that's what makes me think it is the macro that is to blame (and not for example the __try{}/__except().

Below is the code for your quick reference!
Thanks!
Dimitris Staikos

------------------------------------------

#define WCI_API extern "C"
#define WCI_TEST_API WCI_API
#define API_TEST_FUNC_NAME(apifunc) Validate_##apifunc
#define API_TEST_FUNC(apifunc) WCI_TEST_API BOOL WINAPI API_TEST_FUNC_NAME(apifunc)(void)

API_TEST_FUNC(TestVAX)
{
__try
{
ULONG TestValue = 9;
return (TestValue != 0);
}
__except(GetExceptionCode() == STATUS_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
{
return FALSE;
}
}

extern "C" BOOL WINAPI Validate_TestVAX2(void)
{
__try
{
ULONG TestValue = 9;
return (TestValue != 0);
}
__except(GetExceptionCode() == STATUS_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
{
return FALSE;
}
}

When all else fails try common sense.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 17 2010 :  7:20:39 PM  Show Profile  Reply with Quote
Recursive macro parsing is turned off by default. Can you please try turning it on to see if it helps?

http://docs.wholetomato.com?W363
Go to Top of Page

BruteForce
Senior Member

Greece
32 Posts

Posted - Dec 18 2010 :  03:55:39 AM  Show Profile  Reply with Quote
Thanks, it works fine!

Although it looks strange to me that recursive macro parsing is OFF by default, you probably have some reason for it (most likely backwards compatibility of some sort).
However, I don't see why such an option is not available in the UI of VAX and I have to crawl in the dungeons of the registry :-P

Keep up the good work!

When all else fails try common sense.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 19 2010 :  12:08:46 PM  Show Profile  Reply with Quote
I have put in a feature request to put this option on the UI to see what the developers make of it:

case=53468

Hopefully we can turn it on by default eventually as we got more feedback.
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