User Name Password Register
DaniWeb IT Discussion Community
All
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 423,637 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,193 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: Programming Forums

Hard C++ to Delphi Conversion

Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,876
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Rep Power: 11
Solved Threads: 193
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: Hard C++ to Delphi Conversion

  #11  
May 16th, 2008
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: pTcpHdr^.Options := 42;

Hope this helps.
Last edited by Duoas : May 16th, 2008 at 5:47 pm.
Reply With Quote  
All times are GMT -4. The time now is 10:08 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC