MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030770Community[OCCT] OCCT:Foundation Classespublic2019-06-05 18:552019-06-06 05:40
ReporterVico Liang 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0030770: OSD_OpenFile always fails to open file on uwp
DescriptionBelow function always return null file on uwp whatever file is given.

FILE* OSD_OpenFile(const char* theName,
                   const char* theMode)
{
  FILE* aFile = 0;
#if defined(_WIN32)
  // file name is treated as UTF-8 string and converted to UTF-16 one
  const TCollection_ExtendedString aFileNameW (theName, Standard_True);
  const TCollection_ExtendedString aFileModeW (theMode, Standard_True);
  aFile = ::_wfopen (aFileNameW.ToWideString(),
                     aFileModeW.ToWideString());
#else
  aFile = ::fopen (theName, theMode);
#endif
  return aFile;
}
TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
(0084900)
Vico Liang (developer)
2019-06-05 18:57

There is a similar issue:_wfopen_s doesn't work properly in Windows Phone app
http://answers.flyppdevportal.com/MVC/Post/Thread/1dd11083-d750-4ac5-b5ed-b617318916f5?category=wpdevelop [^]
(0084904)
Vico Liang (developer)
2019-06-06 05:40
edited on: 2019-06-06 05:40

This is not a occt issue, it's about UWP file accessing restriction. UWP don't allow file accessing outside sandbox. If the file inside sandbox, it will work. so this issue can be closed.


- Issue History
Date Modified Username Field Change
2019-06-05 18:55 Vico Liang New Issue
2019-06-05 18:55 Vico Liang Assigned To => abv
2019-06-05 18:57 Vico Liang Note Added: 0084900
2019-06-06 05:40 Vico Liang Note Added: 0084904
2019-06-06 05:40 Vico Liang Note Edited: 0084904 View Revisions


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker