mmioOpen function is deprecated, advised is to use CreateFile. How to continue with other mmio functions?

Tony 96 Reputation points


When I use mmioOpen, all other mmio methods are working fine on Win 11 latest update.

However mmioOpen is deprecated and I should use CreateFile or CreateFile2 instead that's what the documentation says ( .

My issue is that creating a wav file by method CreateFile, all other mmio methods like mmioAscend return code 263 (MMIOERR_CANNOTSEEK). What is the proper way to use CreateFile or CreateFile2 to work correctly with mmio?

The code I use is posted here by Rita Han (

Thank you.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,448 questions
{count} vote

Accepted answer
  1. Castorix31 82,036 Reputation points

    mmioOpen function is deprecated

    It is not deprecated

    It is a bug in documentation

    You would need a lot of code to replace all what mmioOpen does...

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 11,506 Reputation points Microsoft Vendor


    You can refer to the CaptureSharedEventDriven sample, which also Write the captured wave data to an output file using CreateFile and WriteFile or the ApplicationLoopback sample.

    And note that the CaptureSharedEventDriven sample has a flaw after resuming from a breakpoint.