Solved

Record copied to memory stream

Posted on 1998-12-05
3
746 Views
Last Modified: 2008-03-06
My program first stores values in a record type which contains integers and strings. Because this record is passed to an ISAPI program, the record is loaded into a memorystream using TMemoryStream.WriteBuffer. This happens on the client size.

On the server side (the ISAPI DLL), the bytes are then stored in a Pointer type :

 lpbData: Pointer;                 // pointer to cbAvailable bytes

I then want to copy what is in lpbData back into a record identical to the one at the client site.

What is the best way to do that to ensure the record at the server is intact ?

0
Comment
Question by:yvesmail
  • 2
3 Comments
 
LVL 10

Expert Comment

by:viktornet
ID: 1349439
YOu can type cast the pointer...something like that would do it ....

NewTMyRecord := TMyRecord(lpbData^);

Something like that...

Cheers,
Viktor
0
 

Author Comment

by:yvesmail
ID: 1349440
Thank you Viktor. It works. You may have the points.
0
 
LVL 10

Accepted Solution

by:
viktornet earned 100 total points
ID: 1349441
Thanks yvesmail :)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question