[TRNSYS-users] New Module with External File
Yoshihiro Yamaguchi
yamaguti at alpha-net.ne.jp
Fri Nov 24 05:26:00 PST 2006
Ken,
Try to the following instead of your definition unless compiler
switch is changed.
extern "C" __declspec(dllimport) char* _cdecl
TRNSYSFUNCTIONS_mp_GETLUFILENAME(int* LU);
I hope somebody(or you) summarize the know-how of writeing TYPE in C/C++.
Yoshihiro
> David and Yoshihiro,
>
> Thank you for your response.
> I tried to use the function getLUFileName, but finished in failure.
>
> Because the function, getLUFileName is not implemented in TRNDLL.dll, I have to
> rebuild TRNDLL.dll.
>
> I added to "TRNSYS.h" the following 2 lines;
> extern "C" __declspec(dllimport) char* _cdecl TRNSYSFUNCTIONS_mp_GETLUFILENAME(int LU);
> #define getLUFileName TRNSYSFUNCTIONS_mp_GETLUFILENAME
>
> And I added the code that David wrote to "TrnsysFunctions.f90".
> Finally, I builded TRNDLL.dll using CVF 6.6B and I suceeded building TRNDLL.dll
> and the TYPE using the function.
>
> But when I tried to run the project, an access vioration occured in DFORRT.dll
> and the TRNSYS project was terminated.
>
> Best regards,
> Ken Hatakeyama
>
More information about the TRNSYS-users
mailing list