|
막 c++입문했는데....모르는게 너무 많습니다.
아래 코드인데..
AAA로 Msg값을 보내서 AAA에서 ot에 가격을 써서 보내주면 pMyBuf에 값을 저장하는 코드입니다.
AAA 함수에 값을 호출할때 문제가 있는것 같은데 수정및 설명좀 부탁드리겠습니다.
void AAA(unsigned char *input, short in_len, unsigned char *output, short *out_len) {
//
}
void __fastcall TFORM::BBB(const char* const AID, const char* const Msg)
{
int nTotal = sizeof(A2_PACKET);
char* MyBuf = new char[nTotal];
char* pMyBuf = MyBuf;
short ot_len=0;
unsigned char ot[500];
//AAA로 값을 전송할때 에러가 납니다.
AAA(Msg, strlen(Msg), ot, &ot_len);
strncpy(pMyBuf, ot, 255);
}
|