User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 455,999 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,794 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 8 of 8
Search took 0.01 seconds.
Posts Made By: rayman341
Forum: Pascal and Delphi May 16th, 2008
Replies: 10
Views: 1,327
Posted By rayman341
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
Posted By rayman341
Re: C++ to Delphi CheckSum code

Thank you so much. This gives me a lot of help with other peaces of code.

Ray
Forum: Pascal and Delphi May 16th, 2008
Replies: 2
Views: 1,093
Posted By rayman341
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
Posted By rayman341
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
Posted By rayman341
Re: Hard C++ to Delphi Conversion

So what is:
memset (((unsigned char*)(pVpnHdr + 1)) + pVpnHdr->m_Length, 0, padding);

converted to Delphi?
Forum: Pascal and Delphi May 16th, 2008
Replies: 10
Views: 1,327
Posted By rayman341
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
Posted By rayman341
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
Posted By rayman341
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...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 9:50 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC