✅ WiFiDirectDevice.FromIdAsync throws 0x80070005(E_ACCESSDENIED)
im making a program that makes wifi direct connection in uwp. all of my code is from here and this program works very well, but when i make new project and paste the code, this happens..
i checked project settings, and many other things but i couldn't find the solution...
what should i do?
GitHub
Windows-universal-samples/Samples/WiFiDirect at main · microsoft/Wi...
API samples for the Universal Windows Platform. Contribute to microsoft/Windows-universal-samples development by creating an account on GitHub.
9 Replies
your app is also UWP, right?
sure
did you add the proximity capability to your package manifest
nop i'll try it rn
you mean the
Package.appxmanifest
file?yeah
https://github.com/microsoft/Windows-universal-samples/blob/main/Samples/WiFiDirect/cs/Package.appxmanifest#L52 this is what it looks like in the sample
it seems to enable the use of WiFiDirect API
omg it works!!! thx for the solution
btw, is it natural common sense to modify package manifest?
i googled error 0x80070005 and saw a lot of posts(that error was mostly from wireless device connections), and there was no mention about package manifest,,
given that you have an access denied error i assumed there was some kind of permission issue
in UWP apps you have to explicitly opt-in to permissions for many APIs to work
e.g. to use functions like camera or GPS or bluetooth, you would also need to add the capabilities to the manifest, otherwise those APIs do not work
i see
thx for ur help!! :xd:
:)