debugging and viewing of VC + + dynamic link library (DLL) programming Library

Source: Internet
Author: User

It is necessary to introduce the debugging and viewing methods of the library files before entering into the detailed elaboration of various kinds of DLLs, because we will face a large number of examples from the next section.

Because the library file cannot be executed separately, it pops up the dialog shown in Figure 3 when F5 (Start debug mode execution) or CTRL+F5 (run) executes, requiring the user to enter the path of the executable file to start the execution of the library function. This time we enter to call the library's EXE file path can be debugging the library, its debugging skills and general application engineering debugging.

There is usually a better way to debug than the above approach, that is, the library engineering and application Engineering (call Library Engineering) placed in the same VC work area, only to the application engineering debugging, in the application project call library functions in the statement to set breakpoints, after the execution of press F11, so that one step into the library function. The Libtest and Libcall works in section 2nd are in the same working area, and their engineering structure is shown in Figure 4.

The above debugging methods are consistent with the static link library and the dynamic link library. So all the source code that this article downloads contains the engineering of library engineering and call library, both of which are included in a workspace, which is the author's intention to provide this package download.

The export interface in the dynamic link library can be viewed using the Depends tool in Visual C + +, so let's open the User32.dll in the system directory with depends, see? The red circle is a few versions of the MessageBox! So it's really here, It's right here!

Of course the depends tool can also display the hierarchy of DLLs, and if you open an executable file with it, you can see which DLLs the executable called.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.