<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PROBLEM ABOUT GS::UCHAR_T in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/PROBLEM-ABOUT-GS-UCHAR-T/m-p/261700#M3126</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hi Daiszy,&lt;BR /&gt;&lt;BR /&gt;Someone had the same issue like you have in this topic: &lt;A href="https://Archicad-talk.Graphisoft.com/viewtopic.php?f=23&amp;amp;t=68038" target="_blank" rel="noopener"&gt;https://Archicad-talk.Graphisoft.com/viewtopic.php?f=23&amp;amp;t=68038&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I answered it there:
&lt;BLOCKQUOTE&gt;Tibor wrote:&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;This should work:
&lt;PRE&gt;GS::uchar_t bufferUStr[API_UAddParStrLen];
GS::ucsncpy (bufferUStr, GS::UniString (line.c_str()).ToUStr().Get(), API_UAddParStrLen - 1);
chgParam.uStrValue = bufferUStr;&lt;/PRE&gt;
Just make sure, that bufferUStr will live till you use the chgParam &lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_wink.gif" border="0" /&gt; &lt;BR /&gt;&lt;BR /&gt;A little explanation:&lt;BR /&gt;uStrValue is a simple pointer, it just points to somewhere. That's why you cannot write characters into it and you got crash report immediately. You have to set the pointer to an existing array of characters.&lt;/BLOCKQUOTE&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 29 Sep 2022 08:10:00 GMT</pubDate>
    <dc:creator>Tibor Lorantfy</dc:creator>
    <dc:date>2022-09-29T08:10:00Z</dc:date>
    <item>
      <title>PROBLEM ABOUT GS::UCHAR_T</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/PROBLEM-ABOUT-GS-UCHAR-T/m-p/261700#M3126</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi Daiszy,&lt;BR /&gt;&lt;BR /&gt;Someone had the same issue like you have in this topic: &lt;A href="https://Archicad-talk.Graphisoft.com/viewtopic.php?f=23&amp;amp;t=68038" target="_blank" rel="noopener"&gt;https://Archicad-talk.Graphisoft.com/viewtopic.php?f=23&amp;amp;t=68038&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I answered it there:
&lt;BLOCKQUOTE&gt;Tibor wrote:&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;This should work:
&lt;PRE&gt;GS::uchar_t bufferUStr[API_UAddParStrLen];
GS::ucsncpy (bufferUStr, GS::UniString (line.c_str()).ToUStr().Get(), API_UAddParStrLen - 1);
chgParam.uStrValue = bufferUStr;&lt;/PRE&gt;
Just make sure, that bufferUStr will live till you use the chgParam &lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_wink.gif" border="0" /&gt; &lt;BR /&gt;&lt;BR /&gt;A little explanation:&lt;BR /&gt;uStrValue is a simple pointer, it just points to somewhere. That's why you cannot write characters into it and you got crash report immediately. You have to set the pointer to an existing array of characters.&lt;/BLOCKQUOTE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 29 Sep 2022 08:10:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/PROBLEM-ABOUT-GS-UCHAR-T/m-p/261700#M3126</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2022-09-29T08:10:00Z</dc:date>
    </item>
  </channel>
</rss>

