Displaying 1 result from an estimated 1 matches for "m_hrdll".
2015 Feb 05
0
How to unload R.dll successfully by FreeLibrary
...code, used in a Visual Studio 2012 Console Application
#define ORAPI__cdecl
typedefBOOL(ORAPI*PFN_Rf_initEmbeddedR)(int argc, char *argv[]);
typedefvoid(ORAPI*PFN_Rf_endEmbeddedR)(int fatal);
staticvoid_simple_test()
{
#define STR_R_DLL_PATH_T("D:\\R\\R-3.1.2\\bin\\i386\\R.dll")
HMODULEm_hRDll = LoadLibrary(STR_R_DLL_PATH);
if ( m_hRDll )
{
PFN_Rf_initEmbeddedR pfnInit = (PFN_Rf_initEmbeddedR)GetProcAddress(m_hRDll, "Rf_initEmbeddedR");
PFN_Rf_endEmbeddedR pfnEnd = (PFN_Rf_endEmbeddedR)GetProcAddress(m_hRDll, "Rf_endEmbeddedR");
char*szArgs[] = {"REmbeddedPostg...