Commit c795e872 authored by Ivan.Shulga's avatar Ivan.Shulga Committed by Alexander Trofimov

win build

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58509 954022d7-b5bf-4e40-9824-e11837661b57
parent b989aab7
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
#include "../Base/ASCString.h" #include "../Base/ASCString.h"
#endif #endif
#include "FileSystem/FileSystem.h" #include "FileSystem/FileSystem.h"
//#include "AVSUtils.h" //#include "AVSUtils.h"
...@@ -100,6 +103,19 @@ namespace OOX ...@@ -100,6 +103,19 @@ namespace OOX
{ {
bool CSystemUtility::CreateFile(const CString& strFileName) bool CSystemUtility::CreateFile(const CString& strFileName)
{ {
#ifdef _WIN32
BSTR strPath = strFileName.AllocSysString();
HANDLE hResult = ::CreateFile(strPath, GENERIC_READ, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
SysFreeString(strPath);
if (hResult == INVALID_HANDLE_VALUE)
return false;
if (!CloseHandle(hResult))
return false;
return true;
#else
std::string path_string = stringWstingToUtf8String(strFileName); std::string path_string = stringWstingToUtf8String(strFileName);
FILE * pFile = fopen (path_string.c_str(), "wb"); FILE * pFile = fopen (path_string.c_str(), "wb");
if (NULL != pFile) if (NULL != pFile)
...@@ -109,7 +125,7 @@ namespace OOX ...@@ -109,7 +125,7 @@ namespace OOX
} }
return false; return false;
#endif
} }
bool CSystemUtility::IsFileExist(const CString& strFileName) bool CSystemUtility::IsFileExist(const CString& strFileName)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment