Ouch !  Do you promise us that BundleGetPromiseType() won't modify *bp ?
... and, of course, if you can promise that, why doesn't it admit it in its signature ?