dll, explict.
: evp.h DLL OpenSSL
, .h DLL .
- :
- LoadLibrary ( "libeay32.dll" );/* : */
- , , .
,
Let your libeay32.dll have an exported function: int add(int x, int y);
Then, to call it in your project, declare a pointer to a function, and then call the add method as follows:
typedef int (*AddfnPtr)(int num1, int num2);
int num1 = 2, num2 = 3 ;
HMODULE handle = NULL;
handle = LoadLibrary("libeay32.dll");
if (handle != NULL)
{
AddfnPtr addfnptr = (AddfnPtr)GetProcAddr(handle, NULL);
if (addfnptr != NULL)
{
int res = addfnptr(num1,num2);
cout << "res = "<<res;
}
}
source
share