NS_E_SHARING_VIOLATION 0XC00D0FCF fix: File already in use
Windows Media Player or other apps hit this when a file's locked by another process. Kill the lock, reboot, or use Process Explorer.
The 30-second fix: close the obvious program
What's actually happening here is that Windows Media Player (or whatever media app you're using) can't open the file because another process already has it open with exclusive access. NTFS allows sharing, but only if programs ask for it. Most media players don't share — they lock the file so no one else modifies it mid-play.
Try closing the program that might be holding the file. If you were playing that MP3 or video in another window, shut it down. Right-click the file and see if you can rename it — if Windows says "file in use," you've found your lock. That program's process ID owns the handle.
If that doesn't work, restart Windows Explorer. Open Task Manager (Ctrl+Shift+Esc), find Windows Explorer in the Processes tab, right-click, and choose Restart. This releases any file handles Explorer grabbed while previewing the file in a folder thumbnail or preview pane. That's a common trigger I see on Windows 10/11 with Media Player 12.
Still stuck? Reboot. A full restart clears every handle. If the error goes away after reboot, the lock was from a background process you didn't notice.
The 5-minute fix: find the lock with Process Explorer
If you don't want to reboot (or the error comes back), you need to know what is locking the file. Microsoft's Process Explorer (from Sysinternals) does this better than anything else.
- Download Process Explorer from
https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer. It's a single EXE, no install needed. - Run it as Administrator (right-click > Run as Administrator).
- Press Ctrl+F or click the binoculars icon to open the Find Handle dialog.
- Type the full path of your stuck file, e.g.,
C:\Users\You\Music\song.mp3. - Process Explorer lists every process holding a handle to that file. You'll see the process name (like
wmplayer.exeorexplorer.exe) and its PID. - Double-click that line — it jumps to the process in the tree. Right-click it and choose Close Handle. That forces the handle release.
The reason step 6 works is that Process Explorer calls NtClose on the handle. This can crash the owner process if it wasn't expecting the handle to vanish, but for most media players and Explorer, it just frees the lock. You can then open the file without reboot.
If the process is something you don't recognize, Google the process name before killing it. Some antivirus or backup tools lock files during scans.
The 15+ minute fix: dig into the root cause
If you're seeing this error regularly with the same file or app, it's not a one-off lock. There's a pattern.
Check for background thumbnailing
On Windows 10 and 11, File Explorer's thumbnailing service (searchindexer.exe or explorer.exe itself) can hold a file handle while generating a thumbnail for a video or large image. This is especially common with MKV or HEVC files that require codec parsing.
Turn off thumbnails temporarily: open File Explorer Options, View tab, check "Always show icons, never thumbnails." Apply, then try your file. If the error stops, you've found the conflict. Re-enable thumbnails if you need them, but know that some codec packs (like K-Lite) can cause these locks.
Check for Media Player library scanning
Windows Media Player 12 monitors your monitored folders (Music, Videos, Pictures) and scans new files. If you're trying to play a file right as the library scan grabs it, you get a sharing violation. Open WMP, go to Organize > Options > Library > Monitor folders, and either turn off monitoring or exclude the folder where your file sits. Then rebuild the library manually later.
Third-party shell extensions
Shell extensions (like Dropbox, Google Drive, or old codec packs) can hook into file access and hold locks. Try running sfc /scannow from an admin command prompt to check system file integrity, but that's rarely the fix here. Instead, use ShellExView (NirSoft) to disable non-Microsoft shell extensions one by one and test. The one that calls into a media codec or cloud sync DLL is likely the culprit.
# Check what's holding the handle from command line (no third-party tool)
openfiles /query /v | findstr "filename.mp3"
Note: openfiles requires the legacy "Maintain Objects List" global flag to be enabled (openfiles /local on then reboot). Not practical on most systems, but it's built-in.
Last resort: use Handle from Sysinternals in a script
If you want to automate the kill, you can parse Process Explorer's command-line tool handle.exe:
handle64.exe -accepteula -a -p wmplayer.exe "C:\path\to\file"
This lists handles for that specific process. Pipe it to a script that kills the PID with taskkill /PID <n> /F. Don't do this blindly — only if you understand the process won't corrupt data.
What actually causes 0XC00D0FCF?
The error code NS_E_SHARING_VIOLATION (0XC00D0FCF) comes from Windows Media Foundation, the lower-level media pipeline that Windows Media Player and many other apps use. It's not a generic Windows error — it's a Media Foundation error meaning "the file is not sharable at this time." The underlying Win32 error is usually ERROR_SHARING_VIOLATION (32).
Real-world trigger: You download a podcast MP3, double-click it while it's still being written by the browser. The browser holds a write lock, Media Player tries to open it with read access but no sharing — boom, NS_E_SHARING_VIOLATION. Or you have a video file open in VLC (which locks it), then try to open the same file in Windows Media Player.
The fix is always the same: find the process that won't share, kill the handle or the process. You're now equipped for any flavor of this error, from WMP to Edge to your own code.
Was this solution helpful?