C
ConryEi
Guest
i have a compiled Vb .Net Program that have below Arithmetic line when i want to use this line in new App has different result the code is :
Protected Sub MethodOne(ByRef A_1 As UInteger,A_2 As UInteger,A_3 As UInteger,A_4 As UInteger,A_5 As UInteger,A_6 As UShort)
A_1 = A_2 + Class2.Method1(A_1 + ((A_2 And A_3) Or (Not A_2 And A_4)) + 127, A_6)
End Sub
'==================================== method in Class2 definition ====================
Public Shared Function Method1(A_0 As UInteger, A_1 As UShort) As UInteger
Return A_0 >> CInt((32US - A_1)) Or A_0 << CInt(A_1)
End Function
with predefined values as
A_1 = 1732584193UI
A_2 = 4023233417UI
A_3 = 2562383102UI
A_4 = 271733878UI
A_5 = 0
A_6 = 7
A_7 = 0
when i Call MethodOne in Compiled App the Result of MethodOne is
A_1 2770347892 uint
but when i Run Same Code in New App With Same A_1 to A_6 Values the Result is
A_1 4023249673 uint
notice : in both Assembly i have turned on RuntimeCompatibilityAttribute:WrapNonExceptionThrows=true
What i have mistake ?
regards
Continue reading...
Protected Sub MethodOne(ByRef A_1 As UInteger,A_2 As UInteger,A_3 As UInteger,A_4 As UInteger,A_5 As UInteger,A_6 As UShort)
A_1 = A_2 + Class2.Method1(A_1 + ((A_2 And A_3) Or (Not A_2 And A_4)) + 127, A_6)
End Sub
'==================================== method in Class2 definition ====================
Public Shared Function Method1(A_0 As UInteger, A_1 As UShort) As UInteger
Return A_0 >> CInt((32US - A_1)) Or A_0 << CInt(A_1)
End Function
with predefined values as
A_1 = 1732584193UI
A_2 = 4023233417UI
A_3 = 2562383102UI
A_4 = 271733878UI
A_5 = 0
A_6 = 7
A_7 = 0
when i Call MethodOne in Compiled App the Result of MethodOne is
A_1 2770347892 uint
but when i Run Same Code in New App With Same A_1 to A_6 Values the Result is
A_1 4023249673 uint
notice : in both Assembly i have turned on RuntimeCompatibilityAttribute:WrapNonExceptionThrows=true
What i have mistake ?
regards
Continue reading...