Forum: Pascal and Delphi May 16th, 2008 |
| Replies: 10 Views: 1,327 Re: Hard C++ to Delphi Conversion So after the fillchar() do I ref pTcpHdr or bp.
if I understand this correctly pTcpHdr is still used since bp only help change the contants of pTcpHdr.
Ray |
Forum: Pascal and Delphi May 16th, 2008 |
| Replies: 2 Views: 1,093 |
Forum: Pascal and Delphi May 16th, 2008 |
| Replies: 2 Views: 1,093 C++ to Delphi CheckSum code typedef struct iphdr
{
u_char ip_hl:4, /* header length */
ip_v:4; /* version */
u_char ip_tos; /* type of service */
short ip_len; /* total length */
u_short ip_id; /*... |
Forum: Pascal and Delphi May 16th, 2008 |
| Replies: 1 Views: 491 more C++ to Delphi // Size of the encrypted buffer should be
void XOREncrypt (unsigned char* buffer, unsigned long length, unsigned char* key)
{
for (unsigned i = 0; i < length/8; ++i)
for (unsigned j = 0; j < 8;... |
Forum: Pascal and Delphi May 16th, 2008 |
| Replies: 10 Views: 1,327 |
Forum: Pascal and Delphi May 16th, 2008 |
| Replies: 10 Views: 1,327 Re: Hard C++ to Delphi Conversion //
// Custom VPN information header
//
type
TVPNSecHeaderPtr = ^TVPNSecHeader;
TVPNSecHeader = packed record
h_KeyId: array [1..8] of Byte;
h_Length: Word;
h_IpProto: Byte;
end; |
Forum: Pascal and Delphi May 15th, 2008 |
| Replies: 10 Views: 1,327 Re: Hard C++ to Delphi Conversion Thank you, but how do I handle the offset:
memmove(((unsigned char*)pTcpHdr) + sizeof (VPNSEC_HEADER), pTcpHdr, PacketBuffer.m_Length - (sizeof(ether_header) + sizeof(DWORD)*pIpHeader->ip_hl));
Ray |
Forum: Pascal and Delphi May 15th, 2008 |
| Replies: 10 Views: 1,327 Hard C++ to Delphi Conversion 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... |