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 
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(),
  aFile = ::fopen (theName, theMode);
  return aFile;
TagsNo tags attached.
Test case number
Attached Files

- Relationships

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

There is a similar issue:_wfopen_s doesn't work properly in Windows Phone app [^]
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