Ignore:
Timestamp:
Jun 17, 2007, 1:45:13 PM (17 years ago)
Author:
dai_9181
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler_Common/BasicCompiler.cpp

    r140 r165  
     1#include <jenga/include/common/logger.h>
     2#include <jenga/include/common/Environment.h>
     3
    14#include "BasicCompiler.h"
    25
     
    221224            }
    222225
    223             sprintf(temporary,"%spgm.tmp",BasicSystemDir);
    224             hFile=CreateFile(temporary,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_TEMPORARY,NULL);
     226            hFile=CreateFile(
     227                ( Jenga::Common::Environment::GetAppDir() + "\\pgm.tmp" ).c_str(),
     228                GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_TEMPORARY,NULL);
    225229            WriteFile(hFile,FileName,lstrlen(FileName),&dw,NULL);
    226230            CloseHandle(hFile);
     
    750754        HANDLE hFile;
    751755        DWORD dwAccessBytes;
    752         sprintf(temporary,"%spgm.tmp",BasicSystemDir);
    753         hFile=CreateFile(temporary,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
     756        hFile=CreateFile(
     757            ( Jenga::Common::Environment::GetAppDir() + "\\pgm.tmp" ).c_str(),
     758            GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
    754759        if(hFile!=INVALID_HANDLE_VALUE){
    755760            ReadFile(hFile,temporary,MAX_PATH,&dwAccessBytes,NULL);
Note: See TracChangeset for help on using the changeset viewer.