C
C#9mo ago
시큐우

✅ 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.
No description
9 Replies
reflectronic
reflectronic9mo ago
your app is also UWP, right?
시큐우
시큐우OP9mo ago
sure
reflectronic
reflectronic9mo ago
did you add the proximity capability to your package manifest
시큐우
시큐우OP9mo ago
nop i'll try it rn you mean the Package.appxmanifest file?
reflectronic
reflectronic9mo ago
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
시큐우
시큐우OP9mo ago
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,,
reflectronic
reflectronic9mo ago
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
시큐우
시큐우OP9mo ago
i see thx for ur help!! :xd:
reflectronic
reflectronic9mo ago
:)
Want results from more Discord servers?
Add your server