|
-
May 16th, 2002, 08:05 AM
#5
Are you exporting your functions from the DLL? For instance, do your function definitions look like this:
Code:
_API void myFunc();
or
__declspec(dllexport) void myFunc();
? If not, that could be your problem.
Are you using LoadLibrary()? If that is the case, you need a .def file. Lets say that you have a function, void X(). When compiling, this will become mangled, and GetProcAddress() wont find the function. You need to create a .def file with the name of your project, with the following lines in it:
Code:
LIBRARY MyLib
EXPORTS
X
Assume that your DLL will be called MyLib. The EXPORTS line says to export the following functions from the Library, as the Name specified. So, our X function will export as X, and not as it's mangled form. When using GetProcAddress, you then just specify X as the function to find.
Z.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|