Related
Yunzhi I've been struggling with this issue for a while now, and searching for the query/applicable documentation hasn't yielded any workable results either. Hence posting here. What do I want to accomplish: I have some program written in FORTRAN77 that takes
lightning I'm a novice programmer using ctypes with Python and trying to use functions from a DLL written in C. I've found a lot of similar questions on SO to solve, but none of the answers to this kind of conundrum. I have the DLL loaded just fine, but one of
lightning I'm a novice programmer using ctypes with Python and trying to use functions from a DLL written in C. I've found a lot of similar questions on SO to solve, but none of the answers to this kind of conundrum. I have the DLL loaded just fine, but one of
lightning I'm a novice programmer using ctypes with Python and trying to use functions from a DLL written in C. I've found a lot of similar questions on SO to solve, but none of the answers to this kind of conundrum. I have the DLL loaded just fine, but one of
username I successfully called the dll library in my Python code. All "by value" functions are working correctly. The problem is that my c function needs a pointer to an array of doubles in order to return a result. I can't figure out how to define this array.
username I successfully called the dll library in my Python code. All "by value" functions are working correctly. The problem is that my c function needs a pointer to an array of doubles in order to return a result. I can't figure out how to define this array.
username I successfully called the dll library in my Python code. All "by value" functions are working correctly. The problem is that my c function needs a pointer to an array of doubles in order to return a result. I can't figure out how to define this array.
Taylor I am trying to pass an array into a Fortran DLL using the following DLLImport statement [DllImport("MyFortranDLL.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
static extern void sDTransposeSTDCALL(ref int n1, ref int n2,
Taylor I am trying to pass an array into a Fortran DLL using the following DLLImport statement [DllImport("MyFortranDLL.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
static extern void sDTransposeSTDCALL(ref int n1, ref int n2,
Andres Salas Believe it or not, this title pretty much does it and still describes the problem I'm having! So here's a situation: I'm calling a Fortran DLL from VBA, and the DLL takes a user-defined type or any Fortran name (struct?) of that name as a paramete
Andres Salas Believe it or not, this title pretty much does it and still describes the problem I'm having! So here's a situation: I'm calling a Fortran DLL from VBA, and the DLL takes a user-defined type or any Fortran name (struct?) of that name as a paramete
Andres Salas Believe it or not, this title pretty much does it and still describes the problem I'm having! So here's a situation: I'm calling a Fortran DLL from VBA, and the DLL takes a user-defined type or any Fortran name (struct?) of that name as a paramete
User 3458035 I have a JSON file named "Dev-Env-VNET-vnet-details.json"with the following details, {
"location": "southeastasia",
"name": "Dev-Env-VNET",
"properties": {
"addressSpace": {
"addressPrefixes":
Eddie E Massey III I created a type called waveform in fortran and created a function that reads a file and creates an array of waveform types. I want the function to return an array of waveforms, but can't seem to figure out how to return the final array. Bel
Eddie E Massey III I created a type called waveform in fortran and created a function that reads a file and creates an array of waveform types. I want the function to return an array of waveforms, but can't seem to figure out how to return the final array. Bel
The wizard: string s = "7979, 333, 222, 9999"; I want to convert the above string to int[] con = {7979,333,222,999} and further use this array I just started programming, sorry this question has been repeated many times, but any help would be greatly appreciat
Jedi On my HTML page, I have a script that sends database queries via PHP. Now I need to pass an array (an associative array) with the results back to my HTML page to populate some text areas. Question (I'm new to PHP): 1- Can the array be passed as is or does
The wizard: string s = "7979, 333, 222, 9999"; I want to convert the above string to int[] con = {7979,333,222,999} and further use this array I just started programming, sorry this question has been repeated many times, but any help would be greatly appreciat
The wizard: string s = "7979, 333, 222, 9999"; I want to convert the above string to int[] con = {7979,333,222,999} and further use this array I just started programming, sorry this question has been repeated many times, but any help would be greatly appreciat
King Consider this C-interoperable Fortran subroutine called from Python with a Python callback function as an input parameter, and then calling it, module FortranFunc_mod
! C-interoperable interface for the python callback
abstract interface
king Consider this C-interoperable Fortran subroutine called from Python with a Python callback function as an input parameter, and then calling it, module FortranFunc_mod
! C-interoperable interface for the python callback
abstract interface
Level 0 For our Delphi (XE5) application we are developing an API. In order to pass data from Delphi DLL functions to and from the main program (C based; (console) C or C++ code applications or Matlab and Simulink), the array needs to be filled with doubles al
Level 0 For our Delphi (XE5) application we are developing an API. In order to pass data from Delphi DLL functions to and from the main program (C based; (console) C or C++ code applications or Matlab and Simulink), the array needs to be filled with doubles al
FortCpp I'm having trouble using pointers. Before I do this, I need to focus on performance. Suppose there is a 2D matrix like this: 0.0 0.0 0.0.....
0.0 0.7 0.5.....
0.0 0.5 0.8.....
0.0 0.3 0.8.....
..... I need to calculate the gradient of this thi
Keagansed I want to create a type in Fortran that contains an array of strings without explicitly assigning a length so I can return it from a function. Here are my types: type returnArr
Character (*), dimension(4) :: array
end type returnArr
Here is the
Keagansed I want to create a type in Fortran that contains an array of strings without explicitly assigning a length so I can return it from a function. Here are my types: type returnArr
Character (*), dimension(4) :: array
end type returnArr
Here is the
Keagansed I want to create a type in Fortran that contains an array of strings without explicitly assigning a length so I can return it from a function. Here are my types: type returnArr
Character (*), dimension(4) :: array
end type returnArr
Here is the
Carl Donitz my C code: #include <stdio.h>
#include <stdlib.h>
#include <math.h>
double * Make_A(){
double A[2];
A[0]=0.00001;
double *p=(double *)&A;
return p;
}
And my python code: from ctypes import *
lib_cpp = cdll.LoadLibrary('./test.so
Observer I have a C function int * myfunc()
{
int * ret = (int *) malloc(sizeof(int)*5);
...
return ret;
}
In python I can call it ret = lib.myfunc()
But I can't seem to figure out how to actually use ret in the python code (ie convert it to an int