Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
264 views
in Technique[技术] by (71.8m points)

C++ UWP Storage Access

After rescap capability configuration and privacy setting File system allow still we cannot access File system and other drives to read file and configure model path for open pose in c++. I have tried many possibilities i cant access assets folder *.png file also.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Even with the broadFileSystemAccess capability you won't be able to access an arbitrary path on the file system with ordinary APIs, you have to use the StorageFile/StorageFolder APIs instead. From the screenshot I see you are trying to read the image using OpenCV, so instead of using a path, you will need to read the image using a StorageFile and use a different imread overload which accepts a byte array or stream. Alternatively, you could copy the file from the given path to ApplicationData.Current.LocalFolder which is accessible using any API, including imread


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...