- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
I'm having difficulties to translate the following fortan function interface to the corresponding vb.net pinvoke statement:
recursive function MatMerge(iNum, haMatrices, faWeights ) result( pResult ) !DIR$ ATTRIBUTES STDCALL, REFERENCE, NOMIXED_STR_LEN_ARG, ALIAS:'V3MatMerge' :: MatMerge !DIR$ ATTRIBUTES VALUE :: iNum USE, INTRINSIC :: ISO_C_BINDING implicit none type(T_MATRIX), pointer :: pResult integer(4) :: iNum integer(c_intptr_t), intent(in) :: haMatrices(iNum) real(4), intent(in) :: faWeights(iNum) ! ... end
The declaration I've tried so far looks like this.
<DllImport(dllfile, CallingConvention:=CallingConvention.StdCall, CharSet:=CharSet.Ansi)>
Friend Function V3MatMerge(ByVal numMatrices As Integer, _
<[In]()> hMatrix As IntPtr(), _
<[In]()> faWeights As Single()) As IntPtr
End Function
I'm getting "EntryPointNotFound" exceptions, though dumpbin clearly lists the function in the DLL that is loaded.
TIA
Felix Obermaier
Ссылка скопирована
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
VB will give this error if a dependent DLL is not found. Do you have Intel Fortran installed on the system where you're running the VB code? Are you running from inside Visual Studio or outside? Is the Fortran DLL a Debug or Release configuration?
In the examples I have seen, VB arrays have to be passed to fortran ByVal otherwise you get a SafeArray descriptor. There's examples of doing it either way in the compiler_f\MixedLanguage folder of the Intel Parallel Studio XE for Windows Samples Bundle.
- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати