You can declare it as -1 and let {$ Z4} tell the compiler to use 4 bytes for this enumeration:
{$Z4} type TMF_Plugin_Type = ( MF_Plugin_Type_MFT = 0, MF_Plugin_Type_MediaSource = 1, MF_Plugin_Type_MFT_MatchOutputType = 2, MF_Plugin_Type_Other = -1);
It can also work without a compiler directive. The docs say:
To assign ordinality to a value, follow its identifier with = constantExpression, where constantExpression is a constant expression that evaluates to an integer.
An integer in the value -1 is internally represented as 4 bytes. Therefore, any method should work.
Update: I double-checked, and the compiler directive is really necessary (unless you set the same option in the project settings).
source share