Changeset 475 in dev for trunk/ab5.0/abdev/ProjectEditor/FileOperation.cpp
- Timestamp:
- Apr 4, 2008, 7:47:07 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/ProjectEditor/FileOperation.cpp
r99 r475 1 #include "stdafx.h" 2 1 3 #include "Common.h" 2 4 … … 17 19 } 18 20 19 char *ReadBuffer( char *path){21 char *ReadBuffer( const std::string &path ){ 20 22 extern HANDLE hHeap; 21 23 int i; … … 24 26 HANDLE hFile; 25 27 26 hFile=CreateFile(path ,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);28 hFile=CreateFile(path.c_str(),GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 27 29 if(hFile==INVALID_HANDLE_VALUE){ 28 30 //"\"%s\" ファイルの読み込みに失敗しました。" 29 sprintf(temporary,STRING_ERROR_CANT_FILEOPEN,path );31 sprintf(temporary,STRING_ERROR_CANT_FILEOPEN,path.c_str()); 30 32 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 31 33 … … 39 41 return buffer; 40 42 } 41 char *ReadBuffer_NonErrMsg( char *path){43 char *ReadBuffer_NonErrMsg( const std::string &path ){ 42 44 extern HANDLE hHeap; 43 45 int i; … … 46 48 HANDLE hFile; 47 49 48 hFile=CreateFile(path ,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);50 hFile=CreateFile(path.c_str(),GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 49 51 if(hFile==INVALID_HANDLE_VALUE) return 0; 50 52 i=GetFileSize(hFile,0);
Note:
See TracChangeset
for help on using the changeset viewer.