Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Camera App not showing up #3842

Merged
merged 1 commit into from
Jun 1, 2020

Conversation

alekhyareddy28
Copy link
Contributor

Summary of the Pull Request

This was happening because of the way the resource was passed to the SHLoadIndirectString function.
For some apps like Camera, the resource is LensSDK/Resources/AppTitle whereas for most other applications it is just AppTitle or AppDescription and the code was written such that the resources keyword would be prefixed. However, this does not work when there is a namespace with Resources already defined like in the case of the Camera app.
Due to this the DisplayName and Description were not being retrived and hence the app was not displayed. Another app for which this was happening on my system is XBox Console companion.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

  • If the word resource is present in the DisplayName parameter of the Appmanifest.xml file, we do not add an extra resource string.

Validation Steps Performed

  • The camera app shows up now.
    image
  • Set breakpoints where exceptions were thrown when the SHLoadIndirectString function returned an hresult other than S_OK and verified that all those cases are now solved, which was Camera and Xbox Companion console apps in my case.

@alekhyareddy28 alekhyareddy28 added the Product-PowerToys Run Improved app launch PT Run (Win+R) Window label May 29, 2020
@alekhyareddy28 alekhyareddy28 requested a review from a team May 29, 2020 01:19
@alekhyareddy28 alekhyareddy28 changed the title Camera App was not showing up Fix for Camera App not showing up May 29, 2020
@crutkas
Copy link
Member

crutkas commented May 29, 2020

we hit this cause we removed that random unsigned dll?

@alekhyareddy28
Copy link
Contributor Author

No this is not related to that dll. The way the code was adding the string resource to get teh DisplayName was incorrect. Due to that we were getting an empty DisplayName and description leading to the app not showing up.

@dsrivastavv
Copy link
Contributor

I am unable to see camera app in wox as well. This issue was there since we inherited their codebase. We can contribute this change back to wox as well.

@crutkas
Copy link
Member

crutkas commented May 29, 2020

if they haven't fixed the issue, lets prep a PR for them

@crutkas
Copy link
Member

crutkas commented May 29, 2020

@jjw24 and @bao-qian, this change may be helpful for your code bases.

@crutkas
Copy link
Member

crutkas commented May 29, 2020

if we're going to do a hotfix, this may not be a bad PR for that

Copy link
Contributor

@dsrivastavv dsrivastavv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alekhyareddy28 alekhyareddy28 merged commit d2dfbff into microsoft:master Jun 1, 2020
alekhyareddy28 added a commit to alekhyareddy28/PowerToys that referenced this pull request Jun 2, 2020
crutkas pushed a commit that referenced this pull request Jun 3, 2020
* Add resource only when it is not already present (#3842)

(cherry picked from commit d2dfbff)

* Take space into consideration while calculating the first matched index (#3874)

(cherry picked from commit a8d67a1)

* Fix for File explorer not showing up and multiple notepads (#3969)

* reverted the dedup code, file explorer shows up but so do duplicates

* Fixed file explorer and dedup

* Formatting

* Added tests for all the cases

* Formatting

* Tests

* take name and exe into consideration while calculating hash

* unique primes while calculating hash code

(cherry picked from commit 8cddd59)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-PowerToys Run Improved app launch PT Run (Win+R) Window
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants