You have to get the address of the function with
GetProcAddress
for your code to work, see below (assuming MD5 is a function in the library loaded) :
int __cdecl main(int argc, char *argv[])
{
HINSTANCE hinstLib = LoadLibrary(TEXT("libssl32.dll"));
if(hinstLib != NULL)
{
FARPROC MD5;
unsigned char *input = "abc";
unsigned char *md5;
size_t n = 3;
MD5 = GetProcAddress ( hinstLib , "MD5" ) ;
MD5(input, n, md5);
}
}
Check the following links :
http://en.wikipedia.org/wiki/Dynamic-link_library[
^]
http://forum.pellesc.de/index.php?topic=3257.0[
^]