|
fprintf(fp, "%s, %s \n", istr.c_str(), DateTimeToStr(Now()));
-> fprintf(fp, "%s %s \n", istr.c_str(), DateTimeToStr(Now()));
aircast 님이 쓰신 글 :
: 안녕하세요?
:
: c++ Builder 초보 입니다.
:
: 회사 업무상, Modify 하는식으로 툴을 하나 만들었는데요,
:
: 이것이 한글 윈도우에서는 이상 없이 돌아가는데,
:
: 영문 윈도에서 Error(Access Violation, "cc3270mt.dll")이 발생을 합니다.
:
: 코드들을 추적 해보았더니, "fprintf()"에서 에러가 발생을 합니다.
:
: 어떻게 해결을 해야 할지 막막해서 질문 드립니다.
:
: 코드는 아래와 같이 되어 있습니다.
:
:
: /****************************************
: FILE *fp;
:
: //Cbx_Model <-- ComboBox
:
: if (!DirectoryExists(ExtractFilePath(Application->ExeName)+"I_Data\\"+Cbx_Model->Text.c_str()))
: {
: CreateDir(ExtractFilePath(Application->ExeName)+"I_Data\\"+Cbx_Model->Text.c_str());
: }
:
: String sPath = ExtractFilePath(Application->ExeName) + "I_Data\\"+Cbx_Model->Text.c_str()+"\\"+ DateToStr(Date())+".CSV";
:
:
: if (!FileExists(sPath.c_str()))
: {
: fp=fopen(sPath.c_str(),"w");
:
: fprintf(fp, "%s, %s \n", "[Number]", "[Date Time]");
: //function is error.
:
: }
: else
: {
: fp=fopen(sPath.c_str(),"a");
: }
:
: //Edt_INUM <-- Edit
:
: String istr=Edt_INUM->Text;
: int sum=0;
: for (int i=1;i<=istr.Length();i++)
: {
: sum=sum+istr[i]-0x30;
: Application->ProcessMessages();
: }
:
: int chksum=sum%10;
:
: //Edt_Checksum <---- Edit
:
: Edt_Checksum->Text = String(chksum);
: istr = Edt_INUM->Text + Edt_Checksum->Text;
:
:
:
: fprintf(fp, "%s, %s \n", istr.c_str(), DateTimeToStr(Now()));
: //function is error.
:
: ***************************************/
:
:
:
: 고수님들 부탁 드립니다.
:
: 감사합니다.
|