Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[5025] [답변] J1025427/ AsyncPro에서 Convert Fax에 대하여
이정욱 [ ] 1129 읽음    1998-10-30 13:26
네.. AWFax.PAS 에 버그가 있군요..
먼저 이렇게 고쳐보세요.
참 그리고 보낼때 사용될 파일이름들은 가능하면 영어로 하시구요..(APF파일들)

먼저 fFaxTransmit 프로시져를 찾으세요.

그래서..

const {!!.56}
    InState : Boolean = False; {!!.56}

  procedure fFaxTransmit(Msg, wParam : Cardinal;
                        lParam : LongInt);
    {-Perform one increment of a fax transmit}

위의 {!!.56} 이 있는 줄을 추가하십시요.

다음..

       end;

        {Preprocess pending modem responses}
        case fState of
          tfGetEntry: if InState then Exit; {!!.56}
          tfInit,
          tfDial,

의 부분도 고쳐주세요...


        {Process the current fax transmit state}
        case fState of
          tfGetEntry :
            if not InState then begin {!!.56}
               InState := True; {!!.56}

            if afNextFax(FP) then begin
              {Assume fax number, name and cover are set}

도 있구요..

            end else
              fState := tfCompleteOK;
            Instate := False; {!!.56}
            end; {!!.56}

          tfInit :
            begin
              {Make sure station ID is all uppercase}
              if Length(aStationID) > 0 then

부분을 고치시면 되구요...

참고로 고치시는 김에 이것도 고치세요...

라인 3083 과 3115에 있는 곳의 버그 입니다.

          tfSendPageHeader :
            begin
              {Select font for title line}
              if PTextFaxData(fConverter^.UserData)^.IsExtended then       {!!.50}
                Res := fcSetFont(fConverter, cEnhSmallFont, (cResC = '1')) {!!.50}
              else                                                         {!!.50}
                Res := fcLoadFont(fConverter, 'APFAX.FNT', SmallFont, (cResC = '1'));
              if Res <> ecOK then begin
                afReportError(FP, Res);
                fState := tfAbort;
                goto ExitPoint;
              end;

              {Convert and send header line}
              if fHeaderLine <> '' then begin
                S := afConvertHeaderString(FP, fHeaderLine);

                {Force a small top margin}
                csSendWhiteRasterLines(FP, PhysicalTopMargin);

                {Add some zeros to give state machine caller some breathing room}
     //         Count := (fBufferMinimum - aPort.OutBuffUsed);         {!!.52}      // Old Code
                Count := (LongInt(fBufferMinimum) - aPort.OutBuffUsed);{!!.52}      // New Code
                if Count > SizeOf(cBufferBlock) then                   {!!.52}
                  Count := SizeOf(cBufferBlock);                       {!!.52}
                if Count > 0 then begin                                {!!.52}
                  FillChar(cBufferBlock, Count, #0);                   {!!.52}
                  aPort.PutBlock(cBufferBlock, Count);                 {!!.52}
                end;                                                   {!!.52}

                {for I := Count to fBufferMinimum do}                  {!!.52}
                {  aPort.PutChar(#0);}                                 {!!.52}

                {Send all raster rows in header}
                with fConverter^, PTextFaxData(UserData)^ do begin
                  if Length(S) <> 255 then
                    S[Length(S)+1] := #0
                  else
                    S[255] := #0;
                  for I := 1 to FontRec.Height do begin
                    {Rasterize, compress and transmit each row}
                    FillChar(cDataBuffer^, DataBufferSize, 0);
                    fcRasterizeText(fConverter, @S[1], I, cDataBuffer^);
                    acCompressRasterLine(fConverter, cDataBuffer^);
                    csPutLineBuffer(FP, DataLine^, ByteOfs);
                  end;
                end;

                {Force the first disk read}
                cBytesRead := 1;
              end else
                csSendWhiteRasterLines(FP, PhysicalTopMargin);

              {Add some zeros to give state machine caller some breathing room}
      //      Count := (fBufferMinimum - aPort.OutBuffUsed);           {!!.52}    // Old Code
              Count := (LongInt(fBufferMinimum) - aPort.OutBuffUsed);  {!!.52}    // New Code
              if Count > SizeOf(cBufferBlock) then                     {!!.52}
                Count := SizeOf(cBufferBlock);                         {!!.52}
              if Count > 0 then begin                                  {!!.52}
                FillChar(cBufferBlock, Count, #0);                     {!!.52}
                aPort.PutBlock(cBufferBlock, Count);                   {!!.52}
              end;                                                     {!!.52}

              {for I := Count to fBufferMinimum do}                    {!!.52}
                {aPort.PutChar(#0);}                                   {!!.52}

              if aCoverFile = '' then
                fState := tfPrepPage
              else
                fState := tfOpenCover;
            end;

이렇게 고쳐서 해보세요.


+ -

관련 글 리스트
5025 [답변] J1025427/ AsyncPro에서 Convert Fax에 대하여 이정욱 1129 1998/10/30
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.