Windows: refactor cm_GetBuffer avoid BIOD construction