[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] (no subject)



Dear Javier,

As I checked declarations of Trnsys.h, functions, which require
some arguments, have errors in the declarations.

For example,

In Trnsys.h,

extern "C" __declspec(dllimport) char* _cdecl TRNSYSFUNCTIONS_mp_GETLABEL(int, int);

should be replaced as below.

extern "C" __declspec(dllimport) char* _cdecl TRNSYSFUNCTIONS_mp_GETLABEL(int*, int*);

If you want to use the function, you have to use like below.

int arg1 = 1;
int arg2 = 2;
TRNSYSFUNCTIONS_mp_GETLABEL( &arg1, &arg2 );

If you changed some compiler options, it is different.

And, 'C++ bool' has no compatiblity with 'Fortran logical'.

In the case of logicalUnitIsOpen,
You should rewrite the definition like below.

extern "C" __declspec(dllimport) char	_cdecl TRNSYSFUNCTIONS_mp_LOGICALUNITISOPEN(int*);

-1 means 'true', on the other hand, 0 means 'false'.

Yoshihiro

> Dear all;I エm javier Mota from 3i,Madrid
> I am trying to use Access functions in type programmed by me.
> The problem is that when I call a function like getDeckFileName or others 
> function with get...
> TRNSYS shows mw an error which says "error aceess violation...".But when I 
> build the dll all look OK.
> What may be the problem.Must I configure something in an special way.
> Thank you in advance.
> 

=====================================
  Yoshihiro Yamaguchi    山口 芳弘  
  yamaguti@alpha-net.ne.jp
=====================================