DISM API Troubleshooting

The Deployment Image Servicing and Management (DISM) API allows you to build customized solutions on the DISM platform. You can troubleshoot your solution in development by reviewing the errors and warnings in the DISM API log file. You can change the location and the level of information you want to receive for the log file during your call to the DismInitialize Function.

For more information about best practices when coding with the DISMAPI, see Using the DISM API.

DISMAPI Error Messages

The following DISMAPI messages may be reported in the log files when an error occurs.

Message ID Message Text


DISM API was already initialized for this process


DISM API was not initialized for this process


A DismSession was being shutdown when another operation was called on it


A DismShutdown was called while there were open DismSession handles


An invalid DismSession handle was passed into a DISMAPI function


An invalid image index was specified


An invalid image name was specified


An image that is not a mounted WIM or mounted VHD was attempted to be unmounted


Failed to gain access to the log file user specified. Logging has been disabled

Windows Error Messages

Standard Windows errors may also be reported during a DISMAPI process. You can obtain more information about any listed Win32® system error codes by typing net helpmsg on the command line and, then typing the error code number. For more information about System Error Codes, see System Error Codes (0-499).

Using the DISM API