I am working on porting C++ code to Delphi and I am only having a problem with the correct conversion of memmove() statements in the C++ code.
If you or any one you know could help me to convert this C++ code to Delphi I would be thankful.
// Move TCP packet body by sizeof(VPNSEC_HEADER) bytes
memmove(((unsigned char*)pTcpHdr) + sizeof (VPNSEC_HEADER), pTcpHdr, PacketBuffer.m_Length - (sizeof(ether_header) + sizeof(DWORD)*pIpHeader->ip_hl));
// Initialize the injected header
pVpnHdr = (PVPNSEC_HEADER)pTcpHdr;
pVpnHdr->m_Length = (unsigned short)(PacketBuffer.m_Length - (sizeof(ether_header) + sizeof(DWORD)*pIpHeader->ip_hl));
memcpy (pVpnHdr->m_Key, EncKey, 8);
// Calculate padding
padding = 8 - (pVpnHdr->m_Length%8);
// Zero initialize padding
memset (((unsigned char*)(pVpnHdr + 1)) + pVpnHdr->m_Length, 0, padding);
Ray