I have created C# wrapper for refprop manager studying python and c++ wrapper code. I am able to create handle successfully using
int handle = construct_handle(ref refpropBaseDirectoryPath, ref refpropMainDllFileName, ref ierr, ref herr, ref herrLen);
but when I try to call any function using the handle getting errCode = 1. Example below:
var methodPtr = LoadMethodInDll(this.dllPtr, "SETPATHdll");
// convert "pointer" to delegate
delegateSETPATHDll setPath = (delegateSETPATHDll)Marshal.GetDelegateForFunctionPointer(methodPtr, typeof(delegateSETPATHDll));
// use function
setPath(ref this.handle, ref errCode, path, ref size);
I am getting errCode =1 for every function called using handle.
I have created C# wrapper for refprop manager studying python and c++ wrapper code. I am able to create handle successfully using int handle = construct_handle(ref refpropBaseDirectoryPath, ref refpropMainDllFileName, ref ierr, ref herr, ref herrLen);
but when I try to call any function using the handle getting errCode = 1. Example below: var methodPtr = LoadMethodInDll(this.dllPtr, "SETPATHdll"); // convert "pointer" to delegate delegateSETPATHDll setPath = (delegateSETPATHDll)Marshal.GetDelegateForFunctionPointer(methodPtr, typeof(delegateSETPATHDll));
I am getting errCode =1 for every function called using handle.