Solved

Record copied to memory stream

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now