I have problems with these issues below and need your help to solve them. I used default mkl_rt.dll, I do not build any custom DLL currently.
1. Are there any documents that give the instruction on how to use ByVal or ByRef for each type of variable in LAPACK/BLAS function in mkl_rt.dll? (DGETRF/DGETR for example)
2. How can I define which functions are the STDCALL version?
3. The codes below worked on Excel 64 bit and Windows 64 bit, however, they cannot work on Excel 32 bit and Windows 64 bit. Could you help me with this issue? (I deleted "PtrSafe" in Excel 32 bit). Sometimes, The "Bad DLL calling convention (Error 49)" appears, most of time the excel just crash.
Private Declare PtrSafe Function dgetrf Lib "mkl_rt.dll" _ (ByRef M As Integer, _ ByRef N As Integer, _ ByRef A As Double, _ ByRef LDA As Integer, _ ByRef IPIV As Integer, _ ByRef INFO As Integer) Private Declare PtrSafe Function dgetri Lib "mkl_rt.dll" _ (ByRef N As Integer, _ ByRef A As Double, _ ByRef LDA As Integer, _ ByRef IPIV As Integer, _ ByRef WORK As Double, _ ByRef LWORK As Integer, _ ByRef INFO1 As Integer)
4. Should I continue research this issue or I have to build my custom DLL which includes all needed LAPACK/BLAS function to use in VBA?
Please let me know if you need more information.
Thank you for your understanding.