ABI + WRL how to get IStorageFolder.Path ? RRS feed

  • Question

  • I want to get the Path property of IStorageFolder of InstalledLocation

    HString hstrAppData; hstrAppData.Set(RuntimeClass_Windows_ApplicationModel_Package); ComPtr<IActivationFactory> pActivationFactory; HRESULT hr = GetActivationFactory(hstrAppData.Get(), &pActivationFactory); ComPtr<IPackageStatics> pPackage; hr = pActivationFactory.As(&pPackage); if (FAILED(hr)) ::Microsoft::WRL::Details::RaiseException(hr); ComPtr<IPackage> pCurrent; hr = pPackage->get_Current(&pCurrent); if (FAILED(hr)) ::Microsoft::WRL::Details::RaiseException(hr); ComPtr<IStorageFolder> pStorageFolder; hr = pCurrent->get_InstalledLocation(&pStorageFolder); if (FAILED(hr)) ::Microsoft::WRL::Details::RaiseException(hr); pStorageFolder-> ???

    Am I right ?  And what's next?


    • Edited by Raptor K Tuesday, April 10, 2012 5:01 PM
    Tuesday, April 10, 2012 4:56 PM


All replies