[TRNSYS-users] functions get.. type char
javier mota
fjmi_3i at hotmail.com
Wed Aug 10 00:58:13 PDT 2005
Dear all:
I´m Javier mota from 3i, Madrid;once more.
I have a problem with the functions get... which returns a character type
like
(e.g. getDeckFileName).
I am using trnsys16 and I would like use this functions in c++
I have among other lines in Trnsys.h
extern "C" __declspec(dllimport) char*_cdecl
TRNSYSFUNCTIONS_mp_GETDECKFILENAME(void);
and
#define getDeckFileName TRNSYSFUNCTIONS_mp_GETDECKFILENAME
and in TRNSYSFUNCTIONS.f90 something like
function getTrnsysInputFileDir()
!dec$ attributes dllexport, c, reference, nomixed_str_len_arg ::
getTrnsysInputFileDir
!dec$ attributes alias:"TRNSYSFUNCTIONS_mp_GETTRNSYSINPUTFILEDIR",
decorate :: getTrnsysInputFileDir
use TrnsysData
character (len=maxPathLength) :: getTrnsysInputFileDir
getTrnsysInputFileDir = TrnsysInputFileDir
end function getTrnsysInputFileDir
so I write in my program:
char *gg;
gg= getTrnsysInputFileDir();
I don´t have problem in making dll but when I run the program in trnys I get
an access violation error
You mus be sure I would like solve this problem,
Thank you
_________________________________________________________________
Móviles, DVD, cámaras digitales, coleccionismo... Con unas ofertas que ni te
imaginas. http://www.msn.es/Subastas/
_______________________________________________
TRNSYS-users mailing list
TRNSYS-users at engr.wisc.edu
https://www.cae.wisc.edu/mailman/listinfo/trnsys-users
More information about the TRNSYS-users
mailing list