Created
January 24, 2019 15:56
-
-
Save greatbody/e8754c2a7375597f7f69af0d742e5ee2 to your computer and use it in GitHub Desktop.
VB6使用CopyMemory逐字节设置Long型变量
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub m_SetBytes(ByRef DestValue As Long, ByVal SourceValue As Long, ByVal Offset As Long, ByVal Length As Long) | |
m_CopyMemory DestValue, SourceValue, Offset, 0, Length | |
End Sub | |
Private Sub m_CopyMemory(ByRef DestValue As Long, ByVal SourceValue As Long, ByVal DestOffset As Long, ByVal SourceOffset As Long, ByVal Length As Long) | |
CopyMemory ByVal VarPtr(DestValue) + DestOffset, ByVal VarPtr(SourceValue) + SourceOffset, Length | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment