hello,
i want to use a function from a dll program. Here is my code:
The problem that the program call iteratively the dllfunction and it should be call it only once.
The dll is writen in C. Here is the C function that it should be used.
Any idea because call the function all the time?
Thanks
i want to use a function from a dll program. Here is my code:
Code:
character :: infile,outfile
interface
subroutine dllFunction(infile, outfile) bind(C, name="main")
use iso_c_binding, only: C_CHAR, C_NULL_CHAR
character(1,c_char) :: infile
character(1,c_char) :: outfile
end subroutine dllFunction
end interface
call dllFunction(infile, outfile)
The problem that the program call iteratively the dllfunction and it should be call it only once.
The dll is writen in C. Here is the C function that it should be used.
C:
#ifdef DLLCONFIG
#define DLL_API __declspec(dllexports)
#else
#define DLL_API
#endif
DLL_API int main(char *infile, char *outfile) {
}
Thanks