Changeset 99 in dev for ProjectEditor/FileOperation.cpp
- Timestamp:
- Apr 19, 2007, 3:09:55 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ProjectEditor/FileOperation.cpp
r80 r99 55 55 return buffer; 56 56 } 57 _int8 WriteBuffer(char *path,char *buffer,int length ){57 _int8 WriteBuffer(char *path,char *buffer,int length, bool isEnableError){ 58 58 HANDLE hFile; 59 59 DWORD dw; … … 62 62 char temporary[MAX_PATH]; 63 63 64 //"\"%s\" ファイルへの書き込みに失敗しました。" 65 sprintf(temporary,STRING_ERROR_CANT_FILESAVE,path); 66 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 64 if( isEnableError ){ 65 //"\"%s\" ファイルへの書き込みに失敗しました。" 66 sprintf(temporary,STRING_ERROR_CANT_FILESAVE,path); 67 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 68 } 67 69 return 0; 68 70 } … … 72 74 } 73 75 _int8 WriteBuffer_NonErrMsg(char *path,char *buffer,int length){ 74 extern HWND hOwnerEditor; 75 HANDLE hFile; 76 DWORD dw; 77 hFile=CreateFile(path,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL); 78 if(hFile==INVALID_HANDLE_VALUE){ 79 return 0; 80 } 81 if(length) WriteFile(hFile,buffer,length,&dw,NULL); 82 CloseHandle(hFile); 83 return 1; 76 return WriteBuffer( path, buffer, length, false ); 84 77 } 85 78 void GetRelationalPath(char *path,char *dir){
Note:
See TracChangeset
for help on using the changeset viewer.