10/04/20 11:58:58
こんな感じで
void __fastcall TADataModule::NMUDP1DataReceived(TComponent *Sender, int NumberBytes, AnsiString FromIP, int Port)
{
scoped_array<char> buf(new char[NumberBytes+1]);
int s = 0;
TNMUDP& aNMUDP = dynamic_cast<TNMUDP&>(*Sender);
aNMUDP.ReadBuffer(buf.get(), NumberBytes+1, s);
buf[s] = 0;
// ...
}