<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[_recalloc Crash???]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>unter welchen Umständen kann es dazu kommen, daß ein _recalloc in den Tiefen der ATL zum Absturz führt? Was muss vorher falsch gelaufen sein, daß das passiert?</p>
<p>Der folgende Code stürzt bei uns ab, <strong>aber (!!!) nur AUSSERHALB</strong> einer Debugging-Session. Starten wir das Programm im Debugger, läuft es einwandfrei.</p>
<pre><code class="language-cpp">ATLCOLUMNINFO* CidaFile::GetColumnInfo(void* pThis, ULONG* pcCols)
{

   static ATLCOLUMNINFO _rgColumns[MAX_COLUMNS];

   ULONG ulCols = 0;

   // Check the property flag for bookmarks; if it is set, set the zero 
   // ordinal entry in the column map with the bookmark information.
   CidaRowset* pRowset = (CidaRowset*) pThis;
   CComQIPtr&lt;IRowsetInfo, &amp;IID_IRowsetInfo&gt; spRowsetProps = pRowset;

   CDBPropIDSet set(DBPROPSET_ROWSET);
   set.AddPropertyID(DBPROP_BOOKMARKS); ///// ABSTURZ ///// 

   DBPROPSET* pPropSet = NULL;

   ULONG ulPropSet = 0;

   HRESULT hr;

   if (spRowsetProps)
      hr = spRowsetProps-&gt;GetProperties(1, &amp;set, &amp;ulPropSet, &amp;pPropSet);

   if (pPropSet)
   {
      CComVariant var = pPropSet-&gt;rgProperties[0].vValue;
      CoTaskMemFree(pPropSet-&gt;rgProperties);
      CoTaskMemFree(pPropSet);

      if (SUCCEEDED(hr)/* &amp;&amp; (var.boolVal == VARIANT_TRUE)*/)
      {
		  // Ordinal = 1, nicht Ordinal = 0; dann funktioniert's mit CDynamicAccessor [WIE]
         ADD_COLUMN_ENTRY_EX(ulCols, OLESTR(&quot;Bookmark&quot;), 1, sizeof(DWORD), 
         DBTYPE_BYTES, 0, 0, GUID_NULL, CidaFile, dwBookmark, 
         DBCOLUMNFLAGS_ISBOOKMARK)
      }
   }
   ulCols++;
   USES_CONVERSION;

   while(g_rgpColNames[ulCols]){
		ADD_COLUMN_ENTRY(ulCols, A2OLE(g_rgpColNames[ulCols]), ulCols, 60, DBTYPE_VARIANT, 0xFF, 0xFF, 
			GUID_NULL, CidaFile, m_Values[ulCols-1])
			ulCols;
		ulCols++;
   }

   if (pcCols != NULL)
	   *pcCols = ulCols;

   return _rgColumns;
}
</code></pre>
<p><strong>Wir wären für JEDE Hilfe dankbar!</strong></p>
<p>Danke!</p>
<p>Grüße,<br />
Hendrik</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/190253/_recalloc-crash</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 16:54:21 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/190253.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Aug 2007 08:30:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to _recalloc Crash??? on Tue, 21 Aug 2007 08:30:39 GMT]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>unter welchen Umständen kann es dazu kommen, daß ein _recalloc in den Tiefen der ATL zum Absturz führt? Was muss vorher falsch gelaufen sein, daß das passiert?</p>
<p>Der folgende Code stürzt bei uns ab, <strong>aber (!!!) nur AUSSERHALB</strong> einer Debugging-Session. Starten wir das Programm im Debugger, läuft es einwandfrei.</p>
<pre><code class="language-cpp">ATLCOLUMNINFO* CidaFile::GetColumnInfo(void* pThis, ULONG* pcCols)
{

   static ATLCOLUMNINFO _rgColumns[MAX_COLUMNS];

   ULONG ulCols = 0;

   // Check the property flag for bookmarks; if it is set, set the zero 
   // ordinal entry in the column map with the bookmark information.
   CidaRowset* pRowset = (CidaRowset*) pThis;
   CComQIPtr&lt;IRowsetInfo, &amp;IID_IRowsetInfo&gt; spRowsetProps = pRowset;

   CDBPropIDSet set(DBPROPSET_ROWSET);
   set.AddPropertyID(DBPROP_BOOKMARKS); ///// ABSTURZ ///// 

   DBPROPSET* pPropSet = NULL;

   ULONG ulPropSet = 0;

   HRESULT hr;

   if (spRowsetProps)
      hr = spRowsetProps-&gt;GetProperties(1, &amp;set, &amp;ulPropSet, &amp;pPropSet);

   if (pPropSet)
   {
      CComVariant var = pPropSet-&gt;rgProperties[0].vValue;
      CoTaskMemFree(pPropSet-&gt;rgProperties);
      CoTaskMemFree(pPropSet);

      if (SUCCEEDED(hr)/* &amp;&amp; (var.boolVal == VARIANT_TRUE)*/)
      {
		  // Ordinal = 1, nicht Ordinal = 0; dann funktioniert's mit CDynamicAccessor [WIE]
         ADD_COLUMN_ENTRY_EX(ulCols, OLESTR(&quot;Bookmark&quot;), 1, sizeof(DWORD), 
         DBTYPE_BYTES, 0, 0, GUID_NULL, CidaFile, dwBookmark, 
         DBCOLUMNFLAGS_ISBOOKMARK)
      }
   }
   ulCols++;
   USES_CONVERSION;

   while(g_rgpColNames[ulCols]){
		ADD_COLUMN_ENTRY(ulCols, A2OLE(g_rgpColNames[ulCols]), ulCols, 60, DBTYPE_VARIANT, 0xFF, 0xFF, 
			GUID_NULL, CidaFile, m_Values[ulCols-1])
			ulCols;
		ulCols++;
   }

   if (pcCols != NULL)
	   *pcCols = ulCols;

   return _rgColumns;
}
</code></pre>
<p><strong>Wir wären für JEDE Hilfe dankbar!</strong></p>
<p>Danke!</p>
<p>Grüße,<br />
Hendrik</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348748</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348748</guid><dc:creator><![CDATA[SeveQ]]></dc:creator><pubDate>Tue, 21 Aug 2007 08:30:39 GMT</pubDate></item><item><title><![CDATA[Reply to _recalloc Crash??? on Tue, 21 Aug 2007 09:37:38 GMT]]></title><description><![CDATA[<p>in der debug version wird statt '_recalloc' eine funktion namens '_recalloc_dbg' verwendet. aber ob dir das hilft?<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348816</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348816</guid><dc:creator><![CDATA[Undertaker]]></dc:creator><pubDate>Tue, 21 Aug 2007 09:37:38 GMT</pubDate></item><item><title><![CDATA[Reply to _recalloc Crash??? on Tue, 21 Aug 2007 10:00:26 GMT]]></title><description><![CDATA[<p>Hat sich gerade relativiert. Den Codeblock, der abstürzt, brauchen wir überhaupt nicht, da wir keine Bookmarks verwenden. Das hat mir mein Kollege gerade eröffnet...</p>
<p>... aber wir haben ein weiteres Problem. Dafür möchte ich aber gerne einen neuen Thread aufmachen, wenn's erlaubt ist. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p><a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-190261.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-190261.html</a></p>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348841</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348841</guid><dc:creator><![CDATA[SeveQ]]></dc:creator><pubDate>Tue, 21 Aug 2007 10:00:26 GMT</pubDate></item></channel></rss>