在试验CopyMemory时,我遇到了一个奇怪的问题。我有一段从复制过来的代码,只有当我把它放入一个函数中时才能正常工作:Declare PtrSafe Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemoryAs Long, ub As Long, b As Byte ReDim bBuffer(ub) CopyMemory()
Dim
then if (Result > Count) then Result := Count; CopyMemory但是在Win8-64位上,相同的DLL文件将在CopyMemory上抛出访问冲突。在WinAPI.windows单元中实现了CopyMemory。
是这样的。procedure CopyMemory(Destination: Pointer; Source: Pointer; Length: Nati