Solved

initialize memory stream to 0

Posted on 2001-06-21
2
243 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

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

Suggested Solutions

Title # Comments Views Activity
How to convert wav to mp3 in delphi 9 169
When I am typing into a TEdit last word repeats 7 116
Magic Software info 18 124
Dev Express grid collapse 2 39
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

930 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