I have been trying to use the freeware (dll) version of Qcard32 in visual c++6 on a single document program. I cannot get the functions to work or complie properly. I have been reading about using the __declspec (dllexport) and __declspec(dllimport) keywords
I feel that if I can get the program to work with one of the functions that I should be able to use the rest. I have never tried to use an external function in visual c++ and the blogs I have seen seem confusing. The qcard 32 dll comes with a .lib file for use in c++.
I found this page on the web
DLL Lab
Creating and using Win32 *.DLL files By Chris Satterthwaite
which gives a pretty good discription but is not clear in some respects.
I tried his program but it wouldn't compile.
PROBLEM 1:
I'm confused about using the __declspec (dllexport) keyword. He talks about using it in the dll program itself and then he talks about using it in the function Call. Where do you use it???? Do you use it in the exe or the dll?
Microsoft says the __declspec (dllimport) keyword is not necessary but makes the code more efficient. Microsoft doesn't give you a clue about where to put these commands either.
PROBLEM 2:
the instructions are not clear about which files to include in the exe program that utilizes the dll functions. It talks about linking to the file but it doesn't explain which files to link (the dll or the lib or both) I also copied the contents of Qcard32.h to a new(Qcard32.h) file I created for the project. This file declares the dll functions.
PROBLEM 3:
One more problem with the Qcard32 functions is that they ask for a HWND (window handle). I don't know how to obtain this information and place it in an acceptable format for the function to utilize.