only set buffer on msvc