DirectSoundCreate is a pointer (function pointer).
"DirectSoundCreate" tests if pointer is not NULL. It is equivalent to following expression "DirectSoundCreate != NULL".
"SUCCEEDED(DirectSoundCreate(0, &directSound, 0))" is calling this function pointer and passing result to SUCCEEDED macro. This macro expands to something like this: "DirectSoundCreate(0, &directSound, 0) == S_OK".
So if statement executes following:
| if (DirectSoundCreate != NULL)
{
if (DirectSoundCreate(0, &directSound, 0) == S_OK)
{
...
}
}
|