[Rd] How to unload R.dll successfully by FreeLibrary

2015-02-08 Thread 暮如雪
hi, I write some code to check the R.dll reference count, and find after LoadLibrary, the R.dll reference count is 3 instead of 1, and after call pfnInit, the reference count is 19, means the R.dll got loaded many times after call pfnInit, even after call LoadLibrary, I assume the reference

[Rd] How to unload R.dll successfully by FreeLibrary

2015-02-05 Thread 暮如雪
hi, I've some C++ code which try to load R.dll and execute some R command, then unload R.dll, yet it seems fail to unload it, so second time to call the function hangs since it is trying to Initialize R again(this is not allowed as documented). Anyone can tell me why, thanks. //the following