Variadic macros

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Variadic macros

Heath Stewart-3
In case you didn't noticed, support for variable arguments for the various Exit* and Trace* macros has been added now to both wix3 and wix4 codebases. This is something I wanted to do a couple years ago but never got around to it until I had some impetus recently and wanted to not worry about whether I wanted to pass 1 argument or 2 or 3 and change the signatures later should I decide to refactor.
 
What this means: you can now type ExitOnFailure(hr, "%ls %d %ls %d", sczFoo, cFoo, sczBar, cBar) or how ever many parameters (even none) you want without using different macros. No need to specify a number after Exit* macros.
 
So for new code, please use this and maybe eventually we can replace all the old ones that I left there (though redefined as the variadic variant) and remove them.

Hope that helps be more productive!


Heath Stewart
Software Design Engineer
Visual Studio, Microsoft
http://blogs.msdn.com/heaths
 

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
WiX-devs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-devs