Solved

Record copied to memory stream

Posted on 1998-12-05
3
745 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

772 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