바쁘신 중에 답변 감사합니다.
링크된 Component는 저도 설치를 해보았는데..
델파이용이라서 어떻게 안되더군요..
C++Builder 6.0용으로 변환해서 등록하는 것이 문제이군요.
해본적도 없고..
그게 가능한 지도 잘 모르겠고요.
Visual Program은 초보인지라 깜깜하거든요.
아무튼 이런저런 조언 잘 알아듣겠습니다.
박영목.월천 님이 쓰신 글 :
: 한 10분 찾았는 데.... 이긴 하더군요... 가입해라... 파일을 올려야 다음에 다운 받을 수 있다. 통과
: 그래서 또 하나 찾아는 데... 잠깐 보았는 데... 이것을 기반으로 TEST해 보시던지... 안에 있는 파일을
: 잠깐 보았는 데 유료 같은 데... 데모 버전은 델파이에서만... 이런 내용... 회사도 지금 있는 지 망했는지..
: 알 수 없고... 올려 놓은 곳에서도 언급이 업고... 그냥 사용해도 될 것 같은 느낌.. 더 자세히 알아 보세요.
: 제가 찾는 데.. 10분 정도 밖에 안걸리는 데... 찾았는 데 없다고 하시면... 씁씁합니다... ㅋㅋㅋ
: 꼭 구굴에서 찾으시고... 단어만 딸라 치지 마시고... 단문 하나 정도 쳐보세요 약간 틀려도 잘 찾습니다.
: 구글이 좀 특이합니다. 문장을 약간 이해를 하고 찾는 느낌이 듭니다.
: 물을 때 How to ~~~, 찾을 때 Where is ~~~ 제가 많이 사용하는 방법입니다. 너무 믿지 마시고..
: 제가 아는 것이 이것 밖에 없어서.... ㅋㅋㅋ
:
: 도움말, 주문... 이런 문서들이 있으니 참고하시고... 혹 잘 안되면 사이트를 찾아서... 메일도 함 보내 보시고....
: 저도 요 근래 레이져프로그램 때문에... SDK를 얻으려고 메일을 몇번 주고 받았는 데... 외국 사람이 약속도
: 잘 지키고 참 좋았습니다. 물론 메일 작성할 때는 이것 저것 찾아 짜짓기 해서 보냈는 데... 제가 보낸 내용을
: 충분히 이해를 하고 답변을 주더군요... 중학교 3학년 정도 수준으로 보냈습니다... ㅋㅋㅋ 제 실력이 그것 밖에
: 안되어서..... 아마 님께서는 더 잘하실 수 있을 것입니다.
:
: 받았는 데... 이것 빌더에서 어떻게 설치해요...? 이렇게 물으시면... 힘듭니다... 저는 이것 사용하지 않고 있기
: 때문에... 약간 검색할 때... 포터를 닫을 때 Errror 난다는 내용이 어디에 있더군요... 오늘부터 리포트 해야
: 합니다. 사이버 대학이지만 과제가 많내요... 시험도 쳐야 하고... ㅋㅋㅋ... 어떻게 해보시면 답이 나올 것입니다.
: ..그럼.. 누가 TCOMM 사용하시는 분 있다면 도움을 주시기 바랍니다.
:
: 아~~ 내용을 다시 보니 Delphi용은 찾았는 모양입니다. 이것도 델파이용인데... 그런데... 빌더에서는 델파이용도
: 웬만하면 등록됩니다. 어떻게 등록... 저도 사실... 프로그램보다 처음에 등록 이런 것이 힘들더군요... 밤새도록...
: 설치하고 삭제하고... 수십번을 시도한 컴포넌트도 있고... 어떻게 나도 모르게 등록된 경우도 있고... 너무 피곤해서..
: 정신없이 하다가 보니... 여하튼 하늘은 돕는 자를 돕는다는 사실입니다. 등록 같은 것 잘 찾아보시고... 이 사이트에도
: 충분히 힌트를 얻을 수 있을 것입니다. 등록과정은 거의 동일하기 때문에... 이제 ... 물러갑니다.
:
: 다운 받은 주소는
:
:
http://www.programmersheaven.com/download/14246/download.aspx
:
:
: micomz 님이 쓰신 글 :
: : 간단하게 수정하고 컴파일만 다시하면 되는 상황이라서
: : TComm Component 만 연결되면 되겠는데..
: : 인터넷을 검색해도 C++빌더용 TComm Component 를 찾을 수가 없군요..
: : 어디서 구할 수가 없을까요?
: :
: : 박영목.월천 님이 쓰신 글 :
: : : TComm Component 이것 같네요.... 좀 오랜된 Component 같습니다. 하긴 RS323도 오래 되었으니...
: : : 관계는 없게지만.....
: : :
: : : 에러메세지: [C++ Error] Main.cpp(3329): E2451 Undefined symbol 'Comm1'
: : :
: : : Comm1이 정의 되지 않았다고 하니 헤드파일에 Comm1이 없다는 것이지요.
: : :
: : : 소스가 완벽하지 않은가 봅니다. head 파일이 없으면 없다고 나올 것인데...
: : :
: : : 컴포넌트 설치 된 것인지 아닌지는 보시면 알 것인데.... 답답하군요,,,,
: : :
: : : 설치되어 있으면,,, 그냥 현재 소스 무시하고
: : :
: : : 새로 간단하게 주고 받는 것 하나 만들어서 컴파일 잘 되는지 실행은 되는지 부터 테스트 해보시고 하시죠...
: : :
: : : 그렇게 하는 것이 작업이 훨씬 빨리 끝날 것 같은 데.,,.,,,
: : :
: : : 차근 차근 찾아보십시오,,,, 큰 도움이 못되겠군요.... 감사합니다.
: : :
: : :
: : :
: : :
: : :
: : :
: : :
: : : micomz 님이 쓰신 글 :
: : : : C++Builder로 짜여진 어떤 serial 통신 프로그램을 수정해보려고 하는 중에
: : : : 이 부분에서 컴파일 에러가 나는데..
: : : : 왜그런지 모르겠군요.
: : : : Component 가 설치가 안돼서 그런가요?
: : : : 그렇다면 해당 Component는 어떤 것일까요?
: : : : 아니면, 다른 문제 때문일까요?
: : : :
: : : : 에러메세지: [C++ Error] Main.cpp(3329): E2451 Undefined symbol 'Comm1'
: : : : --------------------------------------
: : : : Comm1->Close(); // <-이 부분
: : : : --------------------------------------
: : : : 아래 코드를 참조 바랍니다.
: : : :
: : : : //---------------------------------------------------------------------------
: : : : 1. 'main.cpp' 의 초기 선언 부분 코드 일부분
: : : : //---------------------------------------------------------------------------
: : : : #include <vcl.h>
: : : : #include <stdio.h>
: : : : #include <string.h>
: : : : #include <stdlib.h>
: : : : #include <math.h>
: : : : #include <Printers.hpp>
: : : : #include <mmsystem.hpp>
: : : : #include <time.h>
: : : : #include <dir.h>
: : : : #include <jpeg.hpp>
: : : :
: : : : #pragma hdrstop
: : : :
: : : : #include "Main.h"
: : : : #define byte unsigned char
: : : : #define word unsigned int
: : : : #define dword unsigned int
: : : :
: : : : #pragma package(smart_init)
: : : : #pragma link "Comm"
: : : : #pragma link "CSPIN"
: : : : #pragma resource "*.dfm"
: : : : ...
: : : : //---------------------------------------------------------------------------
: : : : 2. 'main.h' 코드 일부분
: : : : //---------------------------------------------------------------------------
: : : : #ifndef MainH
: : : : #define MainH
: : : :
: : : : #include <Classes.hpp>
: : : : #include <Controls.hpp>
: : : : #include <StdCtrls.hpp>
: : : : #include <Forms.hpp>
: : : : #include "Comm.h"
: : : : #include "CSPIN.h"
: : : : #include <ComCtrls.hpp>
: : : : #include <Menus.hpp>
: : : : #include <ExtCtrls.hpp>
: : : : #include <Chart.hpp>
: : : : #include <TeEngine.hpp>
: : : : #include <TeeProcs.hpp>
: : : : #include <Series.hpp>
: : : : #include <Dialogs.hpp>
: : : : #include <Buttons.hpp>
: : : : ...
: : : : //---------------------------------------------------------------------------
: : : : 3. 'comm.h' 파일 코드 전부분
: : : : //---------------------------------------------------------------------------
: : : : #ifndef CommH
: : : : #define CommH
: : : :
: : : : #include <SysUtils.hpp>
: : : : #include <Controls.hpp>
: : : : #include <Classes.hpp>
: : : : #include <Forms.hpp>
: : : :
: : : : #include <syncobjs.hpp>
: : : :
: : : : #define sMsgExtention "(Error: %d)"
: : : : #define sOpenError "Error accessing specified device (Error: %d)"
: : : : #define sInvalidHandle "Invalid device handle, access denied (Error: %d)"
: : : : #define sPortAlreadyOpen "Port already assigned (open) (Error: %d)"
: : : : #define sPortNotOpen "Port not open (Error: %d)"
: : : : #define sSetupCommErr "Error initializing Read/Write Buffers (Error: %d)"
: : : : #define sUpdateDCBErr "Error updating DataControlBlock (Error: %d)"
: : : : #define sCommTimeoutsErr "Error updating CommTimeouts (Error: %d)"
: : : : #define sEscFuncError "EscapeCommFunction failure (Error: %d)"
: : : : #define sReadError "Read error (Error: %d)"
: : : : #define sWriteError "Write error (Error: %d)"
: : : : #define PurgeRead PURGE_RXABORT + PURGE_RXCLEAR
: : : : #define PurgeWrite PURGE_TXABORT + PURGE_TXCLEAR
: : : : #define PurgeReadWrite PurgeRead + PurgeWrite
: : : :
: : : : typedef void __fastcall (__closure *TCommEvent)(TObject* Sender,
: : : : DWORD Status);
: : : : typedef void __fastcall (__closure *TCommErrorEvent)(TObject* Sender,
: : : : int Errors);
: : : : typedef void __fastcall (__closure *TCommRxCharEvent)(TObject* Sender,
: : : : DWORD Count);
: : : :
: : : : typedef void __fastcall (__closure *TCommStatEvent)(TObject* Sender,
: : : : DWORD Status,
: : : : COMSTAT ComStat);
: : : :
: : : : enum TCommEventType {evBreak, evCts, evDsr, evError, evRing,
: : : : evRlsd, evRxChar, evRxFlag, evTxEmpty };
: : : : typedef Set<TCommEventType,evBreak , evTxEmpty> TCommEventTypes;
: : : :
: : : : enum TBaudRate {br110, br300, br600, br1200, br2400, br4800, br9600, br14400,
: : : : br19200, br38400, br56000, br57600, br115200, br128000, br256000};
: : : : enum TParity {paNone, paOdd, paEven, paMark, paSpace};
: : : : enum TStopBits { sb10, sb15, sb20};
: : : : enum TDataBits {da4, da5, da6, da7, da8};
: : : : enum TFlowControl {fcNone, fcCTS, fcDTR, fcSoftware, fcDefault};
: : : :
: : : : enum TCommOption {coParityCheck, coDsrSensitivity, coIgnoreXOff,
: : : : coErrorChar, coNullStrip};
: : : : typedef Set<TCommOption,coParityCheck , coNullStrip> TCommOptions;
: : : :
: : : : class TCommEventThread : public TThread
: : : : {
: : : : private :
: : : : HANDLE FCommHandle ;
: : : : DWORD FEventMask ;
: : : : DWORD FSuspendTime ;
: : : : TCommEvent FOnSignal;
: : : : protected :
: : : : virtual void __fastcall Execute(void);
: : : : void __fastcall DoOnSignal(void);
: : : :
: : : : public :
: : : : __fastcall TCommEventThread::TCommEventThread(HANDLE Handle,
: : : : TCommEventTypes MonitorEvents,
: : : : DWORD SuspendTime);
: : : : __property TCommEvent OnSignal= { read=FOnSignal, write=FOnSignal } ;
: : : : } ;
: : : :
: : : : class TThreadComm;
: : : :
: : : : class TCommEventChars : public TPersistent
: : : : {
: : : : private :
: : : : TThreadComm *FOwner ;
: : : : char FXOnChar;
: : : : char FXOffChar;
: : : : char FErrorChar;
: : : : char FEofChar;
: : : : char FEvtChar;
: : : : void __fastcall SetEventChar(int Index, char Value);
: : : : public :
: : : : __fastcall TCommEventChars::TCommEventChars(TThreadComm *Owner);
: : : : virtual void __fastcall Assign(TPersistent *Source);
: : : : __published :
: : : : __property char XOnChar={index=1,read=FXOnChar,write=SetEventChar,default=17};
: : : : __property char XOffChar={index=2,read=FXOffChar,write=SetEventChar,default=19};
: : : : __property char ErrorChar={index=3,read=FErrorChar,write=SetEventChar,default=0};
: : : : __property char EofChar={index=4,read=FEofChar,write=SetEventChar,default=0};
: : : : __property char EvtChar={index=5,read=FEvtChar,write=SetEventChar,default=0};
: : : : } ;
: : : : //---------------------------------------------------------------------------
: : : : class PACKAGE TThreadComm : public TComponent
: : : : {
: : : : private:
: : : : HANDLE FHandle;
: : : : DCB FDCB;
: : : : String FDeviceName;
: : : : TSimpleEvent *FEvent;
: : : : TCriticalSection *FCriticalSection;
: : : : int FReadTimeout;
: : : : int FWriteTimeout;
: : : : WORD FReadBufSize;
: : : : WORD FWriteBufSize;
: : : : DWORD FSuspendTime ;
: : : : TCommEventTypes FMonitorEvents;
: : : : TBaudRate FBaudRate;
: : : : TParity FParity;
: : : : TStopBits FStopBits;
: : : : TDataBits FDataBits;
: : : : bool FConnected ;
: : : : OVERLAPPED WRITE_OS ;
: : : : OVERLAPPED READ_OS ;
: : : : TCommEventThread *FEventThread;
: : : : TCommEventChars *FEventChars;
: : : : TCommOptions FOptions;
: : : : TFlowControl FFlowControl;
: : : : TNotifyEvent FOnBreak;
: : : : TNotifyEvent FOnCts;
: : : : TNotifyEvent FOnDsr;
: : : : TCommErrorEvent FOnError;
: : : : TNotifyEvent FOnRing;
: : : : TNotifyEvent FOnRlsd;
: : : : TCommRxCharEvent FOnRxChar;
: : : : TNotifyEvent FOnRxFlag;
: : : : TNotifyEvent FOnTxEmpty;
: : : : TCommStatEvent FCommStatEvent ;
: : : : void __fastcall SetDeviceName(String Value);
: : : : void __fastcall SetMonitorEvents(TCommEventTypes Value);
: : : : void __fastcall SetReadBufSize(WORD Value);
: : : : void __fastcall SetWriteBufSize(WORD Value);
: : : : void __fastcall SetSuspendTime(DWORD Value);
: : : : void __fastcall SetBaudRate(TBaudRate Value);
: : : : void __fastcall SetParity(TParity Value);
: : : : void __fastcall SetStopBits(TStopBits Value);
: : : : void __fastcall SetDataBits(TDataBits Value);
: : : : void __fastcall SetOptions(TCommOptions Value);
: : : : void __fastcall SetFlowControl(TFlowControl Value);
: : : : bool __fastcall GetModemState(int Index);
: : : : bool __fastcall GetComState(int Index);
: : : : void __fastcall Lock();
: : : : void __fastcall Unlock();
: : : : void __fastcall CheckOpen();
: : : : void __fastcall EscapeComm(int Flag);
: : : : void __fastcall UpdateCommTimeouts();
: : : : protected:
: : : : virtual void __fastcall CreateHandle();
: : : : void __fastcall DestroyHandle();
: : : : void __fastcall HandleCommEvent(TObject *Sender,DWORD Status);
: : : : void __fastcall UpdateDataControlBlockLock();
: : : : __property String DeviceName={ read=FDeviceName,write=SetDeviceName};
: : : : __property int ReadTimeout ={ read=FReadTimeout,write=FReadTimeout,default=1000};
: : : : __property int WriteTimeout ={ read=FWriteTimeout,write=FWriteTimeout,default=1000};
: : : : __property WORD ReadBufSize ={ read=FReadBufSize,write=SetReadBufSize,default=4096};
: : : : __property WORD WriteBufSize ={ read=FWriteBufSize,write=SetWriteBufSize,default=2048};
: : : : __property DWORD SuspendTime ={ read=FSuspendTime,write=SetSuspendTime,default=5};
: : : : __property TCommEventTypes MonitorEvents ={read=FMonitorEvents,write=SetMonitorEvents};
: : : : __property TBaudRate BaudRate ={read=FBaudRate,write=SetBaudRate,default=br9600};
: : : : __property TParity Parity ={ read=FParity,write=SetParity,default=paNone};
: : : : __property TStopBits StopBits ={ read=FStopBits,write=SetStopBits,default=sb10};
: : : : __property TDataBits DataBits ={ read=FDataBits,write=SetDataBits,default=da8};
: : : : __property TCommEventChars* EventChars ={ read=FEventChars };
: : : : __property TCommOptions Options ={ read=FOptions,write=SetOptions};
: : : : __property TFlowControl FlowControl ={ read=FFlowControl,write=SetFlowControl,default=fcDefault};
: : : : __property TNotifyEvent OnBreak ={ read=FOnBreak,write=FOnBreak};
: : : : __property TNotifyEvent OnCts ={ read=FOnCts, write=FOnCts} ;
: : : : __property TNotifyEvent OnDsr ={ read=FOnDsr, write=FOnDsr};
: : : : __property TNotifyEvent OnRing ={ read=FOnRing,write=FOnRing};
: : : : __property TNotifyEvent OnRlsd ={ read=FOnRlsd,write=FOnRlsd};
: : : : __property TCommErrorEvent OnError={ read=FOnError, write=FOnError};
: : : : __property TCommRxCharEvent OnRxChar={ read=FOnRxChar, write=FOnRxChar};
: : : : __property TNotifyEvent OnRxFlag={ read=FOnRxFlag, write=FOnRxFlag};
: : : : __property TNotifyEvent OnTxEmpty={read=FOnTxEmpty, write=FOnTxEmpty};
: : : : __property TCommStatEvent OnComStatEvent={read=FCommStatEvent,write=FCommStatEvent};
: : : : public:
: : : : __fastcall TThreadComm(TComponent* Owner);
: : : : virtual __fastcall ~TThreadComm();
: : : : void __fastcall Open();
: : : : void __fastcall Close();
: : : : bool __fastcall Enabled();
: : : : int __fastcall Write(char Buf[], DWORD Count) ;
: : : : int __fastcall Read(char Buf[] , DWORD Count);
: : : : int __fastcall InQueCount();
: : : : int __fastcall OutQueCount();
: : : : void __fastcall PurgeIn();
: : : : void __fastcall PurgeOut();
: : : : // {Comm escape functions}
: : : : void __fastcall SetDTRState(bool State);
: : : : void __fastcall SetRTSState(bool State);
: : : : void __fastcall SetBREAKState(bool State);
: : : : void __fastcall SetXONState(bool State);
: : : : void __fastcall UpdateDataControlBlock();
: : : : __property bool Connected={ read=FConnected} ;
: : : : // {Comm status flags}
: : : : __property bool CTS={ index=1, read=GetModemState } ;
: : : : __property bool DSR ={ index=2, read=GetModemState} ;
: : : : __property bool RING={ index=3, read=GetModemState } ;
: : : : __property bool RLSD ={ index=4, read=GetModemState} ;
: : : :
: : : : __property bool CtsHold ={ index=1, read=GetComState };
: : : : __property bool DsrHold ={ index=2, read=GetComState };
: : : : __property bool RlsdHold ={ index=3, read=GetComState };
: : : : __property bool XOffHold ={ index=4, read=GetComState };
: : : : __property bool XOffSent ={ index=5, read=GetComState };
: : : :
: : : : __property HANDLE Handle ={ read=FHandle };
: : : : __published:
: : : : };
: : : :
: : : : class PACKAGE TComm : public TThreadComm
: : : : {
: : : : public:
: : : : __fastcall virtual TComm(TComponent* Owner);
: : : : virtual __fastcall ~TComm();
: : : : __published:
: : : : __property DeviceName;
: : : : __property ReadTimeout;
: : : : __property WriteTimeout;
: : : : __property ReadBufSize;
: : : : __property WriteBufSize;
: : : : __property SuspendTime ;
: : : : __property MonitorEvents;
: : : : __property BaudRate;
: : : : __property Parity;
: : : : __property StopBits;
: : : : __property DataBits;
: : : : __property EventChars;
: : : : __property Options;
: : : : __property FlowControl;
: : : : __property OnBreak;
: : : : __property OnCts;
: : : : __property OnDsr;
: : : : __property OnRing;
: : : : __property OnRlsd;
: : : : __property OnError;
: : : : __property OnRxChar;
: : : : __property OnRxFlag;
: : : : __property OnTxEmpty;
: : : : __property OnComStatEvent;
: : : : };
: : : :
: : : : //---------------------------------------------------------------------------
: : : : #endif