Article ID: 119518 - Last Review: September 30, 2005 - Revision: 4.0

You receive error message when you debug a DLL by using the Visual Workbench debugger or CodeView for Windows

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
This article was previously published under Q119518
Expand all | Collapse all

SUMMARY

When debugging a DLL by using the Visual Workbench debugger or CodeView for Windows, one of the following errors may occur:

In the IDE debugger for Windows:
DEBUG ERROR: Could not load debugee, Attempt to dynamically link to a task[5]
In Codeview for Windows:
Could not load debugee, Attempt to dynamically link to a task[5]
In the 32-bit debugger:
Error loading process
-or-
Unable to locate DLL
-or-
The application failed to initialize properly (0xc0000135)
These error messages may occur when integer 5 is the return value from Windows API LoadLibrary() used by the debugger.

MORE INFORMATION

The error occurs when Windows tries to load a library that it does not recognize as a DLL. Most often it is because the definition file for the DLL does not contain a LIBRARY statement, instead it uses a NAME statement. To avoid the error message, simply changing NAME to LIBRARY in the DLL's .DEF file.

If the DLL is explicitly loaded using LoadLibrary(), failure to specify the .DLL extension in the parameter of LoadLibrary() may also trigger a similar error message.

If the import library of a DLL is linked with the application, verify that the library name matches the DLL's name.

APPLIES TO
  • The Visual Workbench Integrated Debugger, when used with:
    • Microsoft Visual C++ 1.0 Professional Edition
    • Microsoft Visual C++ 1.5 Professional Edition
    • Microsoft Visual C++ 1.51
    • Microsoft Visual C++ 1.52 Professional Edition
    • Microsoft Visual C++ 1.0 Professional Edition
    • Microsoft Visual C++ 2.0 Professional Edition
    • Microsoft Visual C++ 2.1
    • Microsoft Visual C++ 4.0 Standard Edition
    • Microsoft Visual C++ 5.0 Standard Edition
    • Microsoft Visual C++ 6.0 Service Pack 5
Keywords: 
kberrmsg kbtshoot kbbug kbdebug kbide kbinfo KB119518
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.