Development work using DLLs and APIs

T

Tanuki

Hi All:

I am doing some development in VC++ using some llibraries downloaded
from the web. The library comes in 3 files
<mylib.dll>, <mylib.lib>, <mylib.exp>
and I also have <mylib.h>.

As stated in the readme guide provided, to use the library, we need to
call APIs defined inside the library. In the <mylib.h> file,
there are defined APIs as follows:

XYZHandle XYZAPI_CALL
XYZOpen( const char * XYZFile, const char * XYZAccess );

I am at a lost as to how can I include the dll into my application and
at the same time called the APIs.

I must apologise if this sounds too easy as I have no experience using
such things before. I have tried searching the web but to no avail.

Thank you for all helps.
 
V

Victor Bazarov

Tanuki said:
I am doing some development in VC++ using some llibraries downloaded
from the web. The library comes in 3 files
<mylib.dll>, <mylib.lib>, <mylib.exp>
and I also have <mylib.h>.

As stated in the readme guide provided, to use the library, we need to
call APIs defined inside the library. In the <mylib.h> file,
there are defined APIs as follows:

XYZHandle XYZAPI_CALL
XYZOpen( const char * XYZFile, const char * XYZAccess );

I am at a lost as to how can I include the dll into my application and
at the same time called the APIs.

Usually including the library (.lib) during linking is enough.
I must apologise if this sounds too easy as I have no experience using
such things before. I have tried searching the web but to no avail.

Please post further DLL questions to a newsgroup where they are on
topic. I recommend comp.os.ms-windows.programmer.win32.

V
 
J

JKop

Tanuki posted:
Hi All:

I am doing some development in VC++ using some llibraries downloaded
from the web. The library comes in 3 files
<mylib.dll>, <mylib.lib>, <mylib.exp> and I also have <mylib.h>.

As stated in the readme guide provided, to use the library, we need to
call APIs defined inside the library. In the <mylib.h> file,
there are defined APIs as follows:

XYZHandle XYZAPI_CALL
XYZOpen( const char * XYZFile, const char * XYZAccess );

I am at a lost as to how can I include the dll into my application and
at the same time called the APIs.

I must apologise if this sounds too easy as I have no experience using
such things before. I have tried searching the web but to no avail.

Thank you for all helps.


That is the linker's job! Go to your linker's settings, look somewhere for
"Libraries" and add the libraries. Then, when your project is linked, the
library files will be thrown in with your own object files and they'll all
get linked together into one executable!


-JKop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top