Das solltest du nicht tun, denn damit verletzt du eine Regel für Interfaces:
Zitat:
The set of interfaces accessible on an object through QueryInterface must be static, not dynamic. This means that if a call to QueryInterface for a pointer to a specified interface succeeds the first time, it must succeed again, and if it fails the first time, it must fail on all subsequent queries.
IUnknown::QueryInterface method