These are MIDL language attributes for specification of COM-interface methods parameters in IDL file. The meaning of the specifiers goes from their names, and generally can be understood as passing parameters by value (in), by reference(in, out), and as return value (out, retval). out means only return value - but passed through the parameter, so the method can return several values.
In documentation: [in] attribute specifies input parameter, [out] - only output parameter, [in, out]- input and output, [out, retval] - return value. Do not forget that low level IDL description then can be used in different languages using this COM-object. For instance, we can have the IDL description (not strict):
// [out, retval] must be last
genererate([in] item_name, [out] size, [out, retval] res);
and the usage will be:
var sz; // will be initialized in the COM-method
var res = FooObj.generate("new_item", sz); // FooObj is our COM-object