Recall that a "function-like macro" is not a function; it just looks like one.
IID_PPV_ARGS is not "passed" to CreateCommandQueue,
nor is its "output", since it is not a function.
Instead, a macro is just textual replacement.
This is a bit of an unusual macro that is meant to turn one parameter into two parameters (hence the comma).
C/C++ code is compiled in two phases:
1. preprocessing
In which includes, defines, and other preprocessor "directives" are processed and removed.
2. compiling
The resulting program text is compiled, with all the included stuff (possibly thousands of lines), all the defines replaced with their textual replacements, etc.
Consider:
Code:
#include <iostream>
#define FUNCLIKE_MACRO(x) f(x), g(x)
int f(int x) { return 2 * x; }
int g(int x) { return 3 * x; }
void func(int a, int b, int c) { // needs 3 params
std::cout << a << ',' << b << ',' << c << '\n';
}
int main() {
func(1, FUNCLIKE_MACRO(2)); // kind of looks like we're only passing 2 params
// the macro textually expands to:
func(1, f(2), g(2));
// now we're passing the constant 1, the output of f(2) and the output of g(2)
}
Apparently IID_PPV_ARGS_Helper just returns its input as a void**, except that it ensures that the input (sans pointer levels) derives from IUnknown.