•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 375,214 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 2,278 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.
Please support our Pascal and Delphi advertiser:
Views: 859 | Replies: 10
![]() |
•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,738
Reputation:
Rep Power: 10
Solved Threads: 173
I think he wants to know how to access the struct/record elements.
As Micheus explained, both reference the same memory. The only difference is how they treat that memory.
bp thinks the memory is just a list of bytes.
pTcpHdr thinks the memory is a record containing information about a Tcp Packet (and it would be right). I was careful in the example not to change the pTcpHdr variable, so you can still access the packet header by dereferencing it:
Hope this helps.
As Micheus explained, both reference the same memory. The only difference is how they treat that memory.
bp thinks the memory is just a list of bytes.
pTcpHdr thinks the memory is a record containing information about a Tcp Packet (and it would be right). I was careful in the example not to change the pTcpHdr variable, so you can still access the packet header by dereferencing it:
pTcpHdr^.Options := 42;Hope this helps.
Last edited by Duoas : May 16th, 2008 at 5:47 pm.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Pascal and Delphi Marketplace
Other Threads in the Pascal and Delphi Forum
- Previous Thread: more C++ to Delphi
- Next Thread: System.DateTime to TDateTime



Linear Mode