[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TRNSYS-users] ExtDLL problem
Eduardo,
I've developed a natural ventilation program (COMIS-LIKE) that I would
like to translate into a extdll.dll module for TRNSYS. The software
(developed in Delphi) needs more than 300 fixed input data (description
of position and size of windows, etc) which should be entered by reading
an external file. The problem is when I compile the external DLL and
insert it into TRNSYS, a windows kernel error arises during the
simulation. I know it is due to the file reading procedure because when
I compile the DLL without it, the error disapears. I've then tried to
ASSIGN logical numbers to the INPUT FILE in the deck, but this time new
errors happened. How can I fix that? What are the steps to read some
data from a external file from the DLL? (Like .CIF or .SET in Comis?).
After talking to our in-house Delphi expert, there seems to be some
problems with opening files in Delphi DLL's with Windows 95,98 and ME
(i.e. you can't do it as far as we know). If you are not using those
versions of Windows, it "should" work.
I am not sure at all this applies to you, but we have experienced some
issues when using files in external (Fortran, not Delphi) DLL's. The
bottom line is that in order to share logical units and files between
DLL's, you need to link ALL your projects to the DLL version of Fortran
libraries (in your project settings, in Fortran/Libraries, choose
"Single-threaded DLL" or "Debug Single threaded DLL").
Also, ALL projects must either use the Debug or the release mode (you
cannot mix them). May be this will give you an idea even if it does not
apply directly to your problems.
I hope this helps,
Michaël Kummert
--
_________________________________________________________
Michaël Kummert
Solar Energy Laboratory - University of Wisconsin-Madison
1303 Engr Res Bldg, 1500 Engineering Drive
Madison, WI 53706
Tel: +1 (608) 263-1589
Fax: +1 (608) 262-8464
E-mail: kummert@engr.wisc.edu
SEL Web Site: http://sel.me.wisc.edu
TRNSYS Web Site: http://sel.me.wisc.edu/trnsys