If you need to cast a raw pointer in an API, it's usually the sign of a mistake.
A pointer-to-pointer in idiomatic C is used for indicating an out parameter that is a pointer. Ie., you pass in a pointer to a (possibly uninitialized) pointer, and the pointed pointer will be filled in (usually to memory that is dynamically allocated).
Here you are passing a pointer-to-pointer-to-pointer. That's one level of indirection too much. A pointer-to-pointer doesn't mean that you always need to take the address twice. If you already have a pointer to begin with, then taking the address just once already gives you a pointer-to-pointer (obviously).
By taking the address twice, you passed the address of a temporary (itself holding the address of your declared pointer), which was overwritten, but which didn't affevt the value of the pointer of which you took the address twice.
Since references are implicitly coercible to raw pointers, the correct code (only taking the address once) should work without any explicit as conversions.