<?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 Re: ARCHICAD 12 . how to allocate Memory for [uchar_t*] in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/ARCHICAD-12-how-to-allocate-Memory-for-uchar-t/m-p/183784#M6057</link>
    <description>&lt;BLOCKQUOTE&gt;ALFREDMAN wrote:&lt;BR /&gt;I used to do this:&lt;BR /&gt;
chgParam.uStrValue=BMAllocatePtr(strlen(strValue)+1,ALLOCATE_CLEAR,0);	&lt;BR /&gt;
However, in Archicad 12, (chgParam.uStrValue) became a type of [uchar_t* ] and I cant use BMAllocatePtr to allocate the correct size of memory&lt;/BLOCKQUOTE&gt;
Continue to use &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;BMAllocatePtr&lt;E&gt;&lt;/E&gt; for allocation and then cast the result as required with &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;reinterpret_cast&lt;E&gt;&lt;/E&gt;.</description>
    <pubDate>Wed, 04 Aug 2010 11:34:04 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2010-08-04T11:34:04Z</dc:date>
    <item>
      <title>ARCHICAD 12 . how to allocate Memory for [uchar_t*]</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ARCHICAD-12-how-to-allocate-Memory-for-uchar-t/m-p/183783#M6056</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I am trying to convert an API from Archicad 9 to Arhicad 12. &lt;BR /&gt;&lt;BR /&gt;When I was trying to write some data into a GDL's string parameter. I used to do this:&lt;BR /&gt;&lt;BR /&gt;chgParam.uStrValue=BMAllocatePtr(strlen(strValue)+1,ALLOCATE_CLEAR,0); &lt;BR /&gt;CHCopyC(strValue,chgParam.uStrValue);&lt;BR /&gt;&lt;BR /&gt;where (chgParam )is of type [API_ChangeParamType]&lt;BR /&gt;and (strValue )is of type [char*] which is dynamically created from XML&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;However, in Archicad 12, (chgParam.uStrValue) became a type of [uchar_t* ] and I cant use BMAllocatePtr to allocate the correct size of memory to it before copying the data across through CHCopyC. &lt;BR /&gt;&lt;BR /&gt;What function should I use in the lastest API to assign memory for (chgParam.uStrValue), or simply, what is the alternative way to make ArchiCAD12 works with the above 2 statements.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Alfred&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Sep 2024 08:53:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ARCHICAD-12-how-to-allocate-Memory-for-uchar-t/m-p/183783#M6056</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-09T08:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: ARCHICAD 12 . how to allocate Memory for [uchar_t*]</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ARCHICAD-12-how-to-allocate-Memory-for-uchar-t/m-p/183784#M6057</link>
      <description>&lt;BLOCKQUOTE&gt;ALFREDMAN wrote:&lt;BR /&gt;I used to do this:&lt;BR /&gt;
chgParam.uStrValue=BMAllocatePtr(strlen(strValue)+1,ALLOCATE_CLEAR,0);	&lt;BR /&gt;
However, in Archicad 12, (chgParam.uStrValue) became a type of [uchar_t* ] and I cant use BMAllocatePtr to allocate the correct size of memory&lt;/BLOCKQUOTE&gt;
Continue to use &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;BMAllocatePtr&lt;E&gt;&lt;/E&gt; for allocation and then cast the result as required with &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;reinterpret_cast&lt;E&gt;&lt;/E&gt;.</description>
      <pubDate>Wed, 04 Aug 2010 11:34:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ARCHICAD-12-how-to-allocate-Memory-for-uchar-t/m-p/183784#M6057</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2010-08-04T11:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: ARCHICAD 12 . how to allocate Memory for [uchar_t*]</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ARCHICAD-12-how-to-allocate-Memory-for-uchar-t/m-p/183785#M6058</link>
      <description>Many thanks Ralph! I will try to keep going with my version conversion with this advice. Thanks. I now ran into problem of launching ArchiCAD from visualStudio 2005 in debug mode. Apart from setting "C:\Program Files\Graphisoft\ArchiCAD 13\ArchiCAD.exe" in the [Command] column inside  the Debugging Tab of the Project Property Page, what else I need to do? &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Alfred</description>
      <pubDate>Wed, 04 Aug 2010 12:09:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ARCHICAD-12-how-to-allocate-Memory-for-uchar-t/m-p/183785#M6058</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-04T12:09:34Z</dc:date>
    </item>
  </channel>
</rss>

