View Issue Details

IDProjectCategoryView StatusLast Update
0030770CommunityOCCT:Foundation Classespublic2019-07-08 14:08
ReporterVico Liang Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionno change required 
PlatformUWP 
Target Version7.4.0 
Summary0030770: Foundation Classes - 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

Relationships

related to 0030769 closedbugmaster OSD_FileNode::Exists () doesn't work properly on uwp 

Activities

Vico Liang

2019-06-05 18:57

developer   ~0084900

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

Vico Liang

2019-06-06 05:40

developer   ~0084904

Last edited: 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.

kgv

2019-06-24 09:24

developer   ~0085240

Dear Bugmaster,

please close the issue.

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
2019-06-24 09:24 kgv Note Added: 0085240
2019-06-24 09:24 kgv Assigned To abv => bugmaster
2019-06-24 09:24 kgv Status new => feedback
2019-06-24 09:24 kgv Resolution open => no change required
2019-06-24 09:24 kgv Platform => UWP
2019-06-24 09:24 kgv Summary OSD_OpenFile always fails to open file on uwp => Foundation Classes - OSD_OpenFile always fails to open file on UWP
2019-06-24 09:25 kgv Relationship added related to 0030769
2019-07-08 14:08 bugmaster Status feedback => closed