First create your own dll file:
(1)
(2)
(3) Create a new .h file and .cpp file and a module definition inquiry (.def)
where the content of the .h file is:
.cpp file content is:
(4 ) Click Generate Solution to get dll file and lib file
Call the dll file created by yourself
(1) Create a new win32 console application
(2) Configure your dll file path, corresponding lib path, and corresponding header file path in sequence as shown below:
Configure the dll path and
configure the lib file Path The path
where the configuration header file is located:
linker input (ie enter the name of your lib file):
(3) call your dll function in the main function: