• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:

initialize memory stream to 0

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
bnz
Asked:
bnz
1 Solution
 
MadshiCommented:
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
 
GwenaCommented:
listening :-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now