Solved

initialize memory stream to 0

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 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