if you want to change such a variable (that is normally not used and thus not implemented in the wrapper.. things are not that easy.. for example to change the finalbits member of the NativeBMAP struct you would have to do the following :
Code:
IntPtr newFinalBitsValue = (IntPtr)234234;
IntPtr positionOfFinalBitsInStruct =
System.Runtime.InteropServices.Marshal.OffsetOf(typeof(AcknexWrapper.Native.NativeBMAP), "finalbits");
// destination to write to = the pointer to the struct in unmanaged memory + the offset of the finalbits variable in the struct
IntPtr positionToWriteTo =
(IntPtr)(
(int)someBmap.getIntPtr() +
(int)positionOfFinalBitsInStruct);
// write the new value to the position in the memory where the finalbit part of the
// struct is stored
System.Runtime.InteropServices.Marshal.WriteIntPtr(positionToWriteTo, newFinalBitsValue);
P.S.: this of course only works for IntPtr in this example, there are several other cases where you have to do conversions etc...