getFilterParameter() return values and error codes can not be differentiated
When getFilterParameter() is called with incorrect parameters it returns the error code INVALID_PARAMETER (1). It can not be distinguish from a normal return value, because it is perfectly valid for a filter parameter to be 1.
Either getFilterParameter() should have two return values (error code and the value), or return codes should be disabled for this function and a zero should be returned in the case of an error (zero is less surprising than 1). I would probably prefer the latter option, as two return values are messy in C/C++.
Another option would be to make error codes negative as they are in several other systems.. but I'm tending towards returning 0 on error in this case.