D
Daimy
how to do this by C# ?
byte[] buffer=new byte[8192];
memset(buffer, 'U', 8192);
Thanks!
byte[] buffer=new byte[8192];
memset(buffer, 'U', 8192);
Thanks!
byte[] buffer=new byte[8192];
memset(buffer, 'U', 8192);
Mike D Sutton said:how to do this by C# ?
byte[] buffer=new byte[8192];
memset(buffer, 'U', 8192);
Have a look at the RtlFillMemory() API call (which AFAIK simply calls
memset() or the equivalent of):
'***
Private Declare Function RtlFillMemory Lib "Kernel32.dll" ( _
ByRef Destination As Any, ByVal Length As Long, ByVal Fill As Byte) As
Long
...
Const BufSize As Long = 8192
Dim buffer(0 to (BufSize - 1)) As Byte
Call RtlFillMemory(buffer(0), BufSize, Asc("U"))
'***
Note; this is a VB (Classic) solution, if you're after a VB.NET solution
then you're in the wrong place; try the groups here:
Http://EDais.mvps.org/DotNet/
Hope this helps,
Mike
- Microsoft Visual Basic MVP -
E-Mail: (e-mail address removed)
WWW: Http://EDais.mvps.org/