Click here to Skip to main content
15,503,491 members

Comments by TheMrProgrammer (Top 3 by date)

TheMrProgrammer 28-Apr-11 11:48am View    
thanks for the hints guys and pardon me for replying late!

actually i am not yet "allowed" to run the code, so i can't be sure my code will work or not, but I've
written two possible alternatives.

1.
<pre>Dim increment% = System.IntPtr.Size
i = i.ToInt32() + increment<pre/>


2.
<pre>Dim temp%
temp = Marshal.ReadInt32(i)
temp += System.IntPtr.Size
Marshal.WriteInt32(i, temp)<pre/>

which of them is correct?
can anyone of you tell me?

thanks!
TheMrProgrammer 27-Apr-11 7:00am View    
thanks for the hints guys and pardon me for replying late!

actually i am not yet "allowed" to run the code, so i can't be sure my code will work or not, but I've
written two possible alternatives.

1.
<pre>Dim increment% = System.IntPtr.Size
i = i.ToInt32() + increment<pre/>


2.
<pre>Dim temp%
temp = Marshal.ReadInt32(i)
temp += System.IntPtr.Size
Marshal.WriteInt32(i, temp)<pre/>

which of them is correct?
can anyone of you tell me?

thanks!
TheMrProgrammer 26-Apr-11 10:36am View    
:)