"Attempted to read or write protected memory. This is often an indication that other memory is corrupt" blowfish in vb.net -
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt" blowfish in vb.net -
i using next code
this error occurs :
attempted read or write protected memory. indication other memory corrupted. attempted read or write protected memory. indication other memory corrupted.
public function padbytes(abdata() byte) object dim nlen long dim npad integer dim abpadded() byte dim long 'set error handler empty array on error goto arrayisempty nlen = ubound(abdata) - lbound(abdata) + 1 npad = ((nlen \ 8) + 1) * 8 - nlen redim preserve abpadded(nlen + npad - 1) ' pad # of pads (1-8) if nlen > 0 copymemory(abpadded(0), abdata(0), nlen) end if = nlen nlen + npad - 1 abpadded(i) = cbyte(npad) next arrayisempty: padbytes = abpadded end function declare sub copymemory lib "kernel32" alias "rtlmovememory" (destination byte, source byte, byval length long)
please show me right way.
i think might need re-create following
copymemory(abpadded(0), byval abdata(0), nlen)
i don't have vb6 more you'd need seek self. fingers crossed works.
vb.net vb.net-2010 blowfish
Comments
Post a Comment