A dynamic link library (DLL) initialization routine failed.

First I apologize if the topics is somehow already solved. But anyway.
I have quite an issue with initializing standalone dll (coolprop) in R Studio rev. higher than 1.1.463.
When I try to initialize CoolProp.dll
dyn.load(paste("C:\Users\xxx\Documents\!R\CoolProp", .Platform$dynlib.ext, sep=""))

in later R Studios I got this Error:

*Error in inDL(x, as.logical(local), as.logical(now), ...) : *

  • unable to load shared object 'C:/Users/xxx/Documents/!R/CoolProp.dll':*
  • LoadLibrary failure: A dynamic link library (DLL) initialization routine failed.*

The issue does not happen in R Studio 1.1.463 or in pure R console (version 3.6.2 64bit) all under Windows 10.
Would you please be so kind and advise how can I load this dll ?
Please note, there is no way how to reinstall CoolProp - it is only standalone .dll downloaded separately + wrapper (r script) calling loaded .dll routines.

DLLs are typically used with compilers to produce executable programs (,exe). This is from the dyn.load documentation:

"The creation of DLLs and the runtime linking of them into executing programs is very platform dependent."

There are so many things that can wrong here.

I do understand this, but there must be some basic change in R Studio code in area of loading .dlls between version 1.1.463 and later.
The platform dependency can't be blamed because the .dll is loaded perfectly in pure R console. The problem is really in R Studio - the compatibility of dlls changed and some approach is no longer supported in R Studio, whilst pure R (and old RStudio) work OK.

Would somebody point out the issue please, so I can address it into the Cooolprop developers group and resolve the incompatibility of latest R Studio and coolprop.dll

Would we do a list of possible issues please?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.