April 28, 2016
On Thursday, 28 April 2016 at 17:40:23 UTC, Jesse Phillips wrote:
> enum tagINSTALLMESSAGE
> {
> // 12 others ...
> 	INSTALLMESSAGE_INITIALIZE     ,
> 	INSTALLMESSAGE_TERMINATE      ,
> 	INSTALLMESSAGE_SHOWDIALOG     ,
> [greaterThan(500)]
> 	INSTALLMESSAGE_PERFORMANCE    ,
> [greaterThan(400)]
> 	INSTALLMESSAGE_RMFILESINUSE   ,
> [greaterThan(450)]
> 	INSTALLMESSAGE_INSTALLSTART   ,
> [greaterThan(450)]
> 	INSTALLMESSAGE_INSTALLEND     ,
> }
>
> mixin taggedEnum!tagINSTALLMESSAGE

FYI, that is a no since attributes can't be added to enumerations.

"Error: basic type expected, not @"
April 29, 2016
On Thursday, 28 April 2016 at 22:54:10 UTC, Jesse Phillips wrote:
> This one doesn't get the values right for the different versions. The other problem is functions are written as:
>
>    void* something(INSTALLMESSAGE arg);
>
> So I could make all the functions take an int/uint or such, but that is a lot of change for the header along with less documenting.

Different values depending on target version? That's weird, never seen anything like that in windows headers.

enum
{
// 12 others ...
	INSTALLMESSAGE_INITIALIZE     ,
	INSTALLMESSAGE_TERMINATE      ,
	INSTALLMESSAGE_SHOWDIALOG
}
static if(_WIN32_MSI >= 500)
enum
{
	INSTALLMESSAGE_PERFORMANCE=15,
	INSTALLMESSAGE_RMFILESINUSE
}
else static if(_WIN32_MSI >= 400)
enum INSTALLMESSAGE_RMFILESINUSE=15;
static if(_WIN32_MSI >= 450)
enum
{
	INSTALLMESSAGE_INSTALLSTART=INSTALLMESSAGE_RMFILESINUSE+1,
	INSTALLMESSAGE_INSTALLEND
}

alias INSTALLMESSAGE=int;
1 2
Next ›   Last »