M
Mystic_Slayer
Guest
Hello All,
ive just upgraded my code from Visual Basic 6 to Visual Basic.net.
But have Some probs with it:
Ive used the following code:
Private Function SwapEndian(ByVal dw As Long) As Long
CopyMemory(VarPtr(SwapEndian) + 3, dw, 1)
CopyMemory(VarPtr(SwapEndian) + 2, VarPtr(dw) + 1, 1)
CopyMemory(VarPtr(SwapEndian) + 1, VarPtr(dw) + 2, 1)
CopyMemory(VarPtr(SwapEndian, VarPtr(dw) + 3, 1)
End Function
Ive got the problem in Visual Basic.net that my VarPtr is not Valid.
What Can I do To Solve This Problem?
Allready thanks
ive just upgraded my code from Visual Basic 6 to Visual Basic.net.
But have Some probs with it:
Ive used the following code:
Private Function SwapEndian(ByVal dw As Long) As Long
CopyMemory(VarPtr(SwapEndian) + 3, dw, 1)
CopyMemory(VarPtr(SwapEndian) + 2, VarPtr(dw) + 1, 1)
CopyMemory(VarPtr(SwapEndian) + 1, VarPtr(dw) + 2, 1)
CopyMemory(VarPtr(SwapEndian, VarPtr(dw) + 3, 1)
End Function
Ive got the problem in Visual Basic.net that my VarPtr is not Valid.
What Can I do To Solve This Problem?
Allready thanks