Solved

initialize memory stream to 0

Posted on 2001-06-21
2
251 Views
Last Modified: 2011-04-14
Hi

I have create a large memory stream and want to initialize of bytes to zero.
What is the best way to do that? I could make a loop, but wouldn't that be to slow?
0
Comment
Question by:bnz
2 Comments
 
LVL 20

Accepted Solution

by:
Madshi earned 50 total points
ID: 6215352
A dword loop is quite fast (a byte loop is much slower), but you can also use "ZeroMemory(ms.Memory, ms.Size)". Don't know if that is faster than a dword loop, at least it's shorter...   :-)

Regards, Madshi.
0
 
LVL 5

Expert Comment

by:Gwena
ID: 6217164
listening :-)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

829 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