On Mon, 28 Aug 2006 05:13:47 +0100, "Joao Tomas" <xx@xx.comwrote:
>
"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn**********************************@127.0.0 .1...
>"Joao Tomas" <xx@xx.comwrote in news:ec**********@news.datemas.de:
>>Please, can someone help me to translate this single function to VB.NET ?
Which part are you having trouble with?
CopyMemory
VB.net doesn't support it anymore
vb.net is bad for memory pointers
Maybe this might be helpful.
(VB2005)
I have an app that uses this declare for CopyMemory:
Public Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" _
(ByVal Destination As Byte(), ByVal Source As Int32, ByVal Length As Int32)
I use it in conjunction with the API's "GlobalLock", "GlobalSize", "GlobalFree", "GlobalUnlock"
Dim bBlob() As Byte
Dim hBuffer As System.Int32 = sHandle 'handle to a memory buffer
Dim bData As Int32 = GlobalLock(hBuffer)
Dim bSize As Int32 = GlobalSize(hBuffer)
ReDim bBlob(bSize)
CopyMemory(bBlob, bData, bSize)
GlobalUnlock(bData)
GlobalFree(bData)
Gene