Using DLL with .h header in C ++

I was provided with a small library consisting of a .dll, a .h header, and a .def file. I'm sure the library was written in C, but possibly in C ++.

Is it possible to access library functions without using the LoadLibrary / GetProcAddress / FreeLibrary method, which is usually talked about. I don't have a .lib file - is it usually?

I literally spent the last 2 days looking at this. It seems that since I have been given a header file defining the functions that I want to use from the dll and a .def file, I don’t have to explicitly “load” each function manually (LoadLibrary / GetProAddress / FreeLibrary) - in my case, I will use about 5 or 6 functions from a .dll, but there are about 70 available, and it seems like it will be a ball pain and lead to unnecessary code mess.

Thanks for any advice.

+5
source share
3 answers

Visual C ++ has "lib" - find it in the online help.

Use lib / def to create the .lib file.

+3
source
+7

lib - , DLL.

, , :

.C .DEF. DLL , .lib. DLL lib, DLL , exe, .

, , DLL .

+2