Set Direction to System.Data.ParameterDirection.ReturnValue to obtain query result as parameter.
If the System.Data.ParameterDirection is System.Data.ParameterDirection.Output or System.Data.ParameterDirection.InputOutput, an exception is thrown.
Please refer to article Using Parameters for more information about parameters in dotConnect for Salesforce.