So I’m currently trying to write a driver for a PCI device. I’ve been looking through some of the examples that come with the WDK Documentation and I noticed something that I am not familiar with in their source code.
This is how Microsoft does their function calls (at least I think that this is what it is)
VOID
PLxEvtIoWrite(
IN WDFQUEUE Queue,
IN WDFREQUEST Request,
IN size_t Length
)
Is there a reason why they format their function calls like this? Putting the return type on its own line confused me for quite a while.
It’s just an attempt at making the code more readable/self documenting. The newlines have no syntactic meaning, they just break up the arguments individually.
It’s more useful for those functions that have many more parameters and longer type annotations.
As an example:
IoCreateFileEx.