<div>Dear <span style="FONT-SIZE: 11pt; COLOR: #1f497d">Werner:</span></div>
<div><font color="#1f497d">Thank you for your help so much,Your solution is that to provide a dll which is programmed by fortran,then I can build a C++ class to read the file content according to the logical unit number,this is very smart.</font></div>

<div><font color="#1f497d">However,what I just want to get the file path which is assigned in the specail cards in the new type.That is to say,I would like to get the path of the file in my type,not the content.</font></div>

<div><font color="#1f497d">Can you provide me more advices? Thanks a lot!</font></div>
<div><font color="#1f497d">Xingbin Lin</font><br><br></div>
<div class="gmail_quote">2010/6/4 keilholz, werner <span dir="ltr"><<a href="mailto:werner.keilholz@cstb.fr">werner.keilholz@cstb.fr</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="FR" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d">Hi Xingbin,</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="FONT-SIZE: 11pt; COLOR: #1f497d">I once proposed this solution :</span></p>
<p class="MsoNormal"><a href="https://www-old.cae.wisc.edu/pipermail/trnsys-users/2010/005500.html" target="_blank"><span lang="EN-US">https://www-old.cae.wisc.edu/pipermail/trnsys-users/2010/005500.html</span></a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d">It does not use the special cards, but the external file tab, like FORTRAN components. </span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="FONT-SIZE: 11pt; COLOR: #1f497d">In TRNSYS 17, there is a special FILE keyword, which solves this problem. I attach a sample component with source code using it (but this requires Trnsys 17, does not work with 16).</span></p>

<p class="MsoNormal"><span lang="EN-US" style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d">Werner</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="FONT-SIZE: 11pt; COLOR: #1f497d"> </span></p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<p class="MsoNormal"><b><span style="FONT-SIZE: 10pt">De :</span></b><span style="FONT-SIZE: 10pt"> xingbin lin [mailto:<a href="mailto:lynxingbin@gmail.com" target="_blank">lynxingbin@gmail.com</a>] <br><b>Envoyé :</b> vendredi 4 juin 2010 15:31<br>
<b>À :</b> <a href="mailto:TRNSYS-users@cae.wisc.edu" target="_blank">TRNSYS-users@cae.wisc.edu</a><br><b>Objet :</b> [TRNSYS-users] Call external file through special cards with C++</span></p></div>
<div>
<div></div>
<div class="h5">
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">Hello everyone,</p></div>
<div>
<p class="MsoNormal"> </p></div>
<div>
<p class="MsoNormal">I built a new type in which I need call external file through special cards in trnsys 16,and I exported it as C++,in this type,I wanted to get the path of external file by using the access  function getLabel(int,int) which was defined in TRNSYS.h header file.</p>
</div>
<div>
<p class="MsoNormal"> </p></div>
<div>
<p class="MsoNormal">But when I runned the simulation,it  prompted "Access  violation at address ###### in module 'dforrt.dll'".The function getLabel(int,int)  defined in "TRNSYS.h" is that "extern "C" __declspec(dllimport) char* _cdecl  TRNSYSFUNCTIONS_mp_GETLABEL(int , int );#define getLabel       TRNSYSFUNCTIONS_mp_GETLABEL".</p>
</div>
<div>
<p class="MsoNormal"> </p></div>
<div>
<p class="MsoNormal">I searched this problem in internet,somebody said maybe the reason existed in the process of calling the dll between  C++ and Fortran. <br>Please tell me how can I solve this exception and any suggestions.</p>
</div>
<div>
<p class="MsoNormal"> </p></div>
<div>
<p class="MsoNormal">Thanks.</p></div>
<div>
<p class="MsoNormal"> </p></div>
<div>
<p class="MsoNormal">Xingbin Lin </p></div>
<div>
<p class="MsoNormal"> </p></div>
<div>
<p class="MsoNormal"> </p></div></div></div></div></div></blockquote></div><br>