Some knowledge about DLL

xiaoxiao2021-03-06  20

A two-dimensional visual program framework has been made, only the frame of the acquisition of the video stream is very real, and the image processing section is the true double visual part, it is virtual. However, due to the collection of video streams, if you compile the program, you need to install SDK on your computer. Therefore, when the image processing is compiled, the entire program must be restored on my computer. once. However, because another SDK is not installed on the computer that I work together, I can only compile on my computer, which is inconvenient.

Because, when doing this program framework, the separable problem between the code, the collection of video streams and the double visual visual is actually implemented in different classes, so it is considered separate vision Separate, make a DLL. In this way, I can use the frame of compilation only to the program that collects the video stream collection to the girl. The girl can add the part of the code to the part of the image to the DLL, and recompile the DLL on her own computer. It is possible to replace the old DLL with a newly generated DLL.

It is easy to make the class as a DLL, as long as in the statement, it is possible to match the following mode.

Class AFX_EXT_CLASS CMYCLASS

However, it should be noted that the DLL is used to extend the DLL with the MFC, and Win32 DLL cannot be used. And to turn the header file (that is, the file you want to call the function that is called in other programs) Copy, put it in the program to call the DLL, and in this program. And add libName.lib in the configuration properties of the properties page of the project, add Libname.lib. This lib and DLL are generated when compiled by your DLL project, don't forget to copy them to the folder where they need to call their programs.

转载请注明原文地址:https://www.9cbs.com/read-39891.html

New Post(0)