| Previous | Next |
| WINCODEC_ERR_NOTINITIALIZED | WINCODEC_ERR_PROPERTYNOTFOUND |
WINCODEC_ERR_ALREADYLOCKED
WINCODEC_ERR_ALREADYLOCKED means that an IWICBitmap still has an outstanding lock. WIC uses IWICBitmapLock objects to provide direct pixel access, so a second conflicting read or write lock can be rejected until the previous lock is released.
What to check
- Release every
IWICBitmapLockon all paths, including exceptions and early returns. - Keep the lock scope small; do not pass a lock to asynchronous work that can outlive the caller's intended edit.
- Review concurrent image processing: two threads must not assume that the same writable bitmap can be locked independently.
Use RAII wrappers for COM references so the lock is released deterministically.
Microsoft: WIC bitmap sources and locks
Looking for a different code? Search another status or error code.