int TTI_EncodeTSQ_Ex( const TTI_TSQ_Ex * pTSQ_Ex,
byte * encodedReq,
size_t * encodedReqLen,
TTI_TransportFormat transportFormat );
function TTI_EncodeTWQ_Ex(pTWQ_Ex: TTI_TSQ_Ex;
encodedReq: PChar;
encodedReqLen: Integer;
transportFormat: TTI_TransportFormat): Integer;
물론 구조체도 델파이로 다 변환해야겠지요.
그리고 c의 .lib 파일은 델파이에서 직접 쓸 수 없으므로 DLL에서 함수를 끌어와야 합니다.
델파이에서 c의 struct 에 해당하는 것은
type
TTI_TransportFormat = record
end;
이런 형태로 변환하면 될거구요.
c의 enum은 다음과 같이 변환합니다.
typedef enum
{
TTI_RAW = 0,
TTI_TCP = 1,
TTI_HTTP = 2,
TTI_SMTP = 3
} TTI_TransportFormat;
type
TTI_TransportFormat = (
TTI_RAW,
TTI_TCP,
TTI_HTTP,
TTI_SMTP
);
XXX 로 물어보셨지만, 이해하기 편하도록 원 함수의 이름을 쓴점은 양해해주세요.
최병련 님이 쓰신 글 :
: C에서 선언된 DLL Function입니다.
:
: int XXX_XXXX( const XXX_Ex * pTSQ_Ex,
: byte * encodedReq,
: size_t * encodedReqLen,
: XXX_TFormat ttFormat );
:
: 델파이에서는 어찌 선언해야 합니까?
:
: 알려 주십시오..
|