But i think copy data into buffer should change the writeposition
There is only one position that buffer tracks for you and it is "current position", the position at which hardware playback is taking place, returned to you approximately because it keeps changing with time.
Your data manipulation obviously does not affect this position. Instead, you typically want to keep throwing more and more data ahead of the current position so that playback does not hit buffer underrun and plays data smoothly. So you track your own additional "write position" internally: you add data at this position and you advance this pointer yourself.
The write position returned to you in second argument of GetCurrentPosition
call is only informational for you to know which position is still safe to write to (it is late to modify data between play and write positions because this data is already buffered for playback):
The write cursor indicates the position at which it is safe to write new data to the buffer. The write cursor always leads the play cursor, typically by about 15 milliseconds' worth of audio data.