What does NTSTATUS 0xC000019D (STATUS_IMAGE_ALREADY_LOADED_AS_DLL) mean?

 
Previous Next
STATUS_FS_DRIVER_REQUIRED STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING

STATUS_IMAGE_ALREADY_LOADED_AS_DLL

Existing DLL loader state conflicts with the new image request

The Windows loader records how an image entered the process. An image already loaded as a DLL has module bookkeeping, reference counts, initialization state, and section protections associated with DLL loading. A later request that expects another role cannot simply reinterpret that existing mapping.

This often appears in unusual low-level loading, debugging, or compatibility code rather than normal LoadLibrary use. Mapping a second copy manually can split global state and cause callbacks, TLS, imports, or unload operations to act on the wrong instance.

What to inspect

  • Record the original load method, module base, full path, reference count, and requested new image role.
  • Check whether the caller should query or reuse the existing module instead of requesting another image mapping.
  • Avoid mixing native loader calls with custom PE mapping for the same file inside one process.
  • Confirm that cleanup code does not unload a loader-owned module through a separately maintained reference model.

References


Looking for a different code? Search another status or error code.