Hi,

I have a third party dll file and i want to call and to run that dll file using c program. Could anyone explain how to do this?

Recommended Answers

All 2 Replies

Do you have a *.h file and/or *.lib that does along with the dll?

There are two ways to do this, implicitly and explicitly.

Implicit means you just link with the xxx.lib or use the -lxxx (depending on windows and linux).

Explicit means using LoadLibrary, GetProcAddress (dlopen,dlsym on linux) to load the libs and get function pointers to the functions in the shared object.

There is a windows tutorial below for explicit and implicit linking.

Windows dll tutorial

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.