<?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: arx+ado+acad2004 crash in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/arx-ado-acad2004-crash/m-p/2193063#M19675</link>
    <description>I had a similar problem when developing for 2005 and 2006 build. &lt;BR /&gt;
&lt;BR /&gt;
I ended up with the following in my header file wher I utilized the code.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
#include &lt;TCHAR.H&gt;	// Needed for _T() macro.&lt;BR /&gt;
&lt;BR /&gt;
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "adoEOF")&lt;BR /&gt;
#define CATCHCOM(hr)  if ( FAILED( hr ) ) throw( _com_error( hr, NULL ) );&lt;BR /&gt;
// The BSTR's&lt;BR /&gt;
_bstr_t connStrSQL("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=");&lt;BR /&gt;
// The Coinitialize ( with out this struct it gets a invalid pointer error I don't know why)&lt;BR /&gt;
struct HandleCOM&lt;BR /&gt;
{&lt;BR /&gt;
   HandleCOM()  { ::CoInitialize(NULL); }&lt;BR /&gt;
   ~HandleCOM() { ::CoUninitialize();   }&lt;BR /&gt;
} _HandleCOM_;&lt;/TCHAR.H&gt;</description>
    <pubDate>Fri, 14 Mar 2008 02:32:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-03-14T02:32:49Z</dc:date>
    <item>
      <title>arx+ado+acad2004 crash</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/arx-ado-acad2004-crash/m-p/2193062#M19674</link>
      <description>I use VS2002 objectArx Acad2004 build arx.&lt;BR /&gt;
when use ado open,Acad2004 or Acad2006 all crash.&lt;BR /&gt;
the code:&lt;BR /&gt;
//stdafx.h&lt;BR /&gt;
#pragma warning(disable:4146)  &lt;BR /&gt;
#import "C:\Program Files\Common Files\System\ado\msado15.dll" rename_namespace("ARXADO") rename("EOF","adoEOF"),rename("BOF","adoBOF"),rename("EOS","AdoEOS")&lt;BR /&gt;
using   namespace ARXADO;&lt;BR /&gt;
#pragma warning(default:4146)&lt;BR /&gt;
//myfuntion ado open and acad2004  crash&lt;BR /&gt;
if(FAILED(::CoInitialize(NULL))) &lt;BR /&gt;
 {&lt;BR /&gt;
  AfxMessageBox("CoInitialize失败!");&lt;BR /&gt;
  return;&lt;BR /&gt;
 }&lt;BR /&gt;
  _ConnectionPtr m_pConnection;&lt;BR /&gt;
  _RecordsetPtr   m_pRecordset;  &lt;BR /&gt;
 &lt;BR /&gt;
 m_pConnection.CreateInstance(__uuidof(Connection));&lt;BR /&gt;
 m_pRecordset.CreateInstance(__uuidof(Recordset));   &lt;BR /&gt;
   &lt;BR /&gt;
 CString m_strConnection;&lt;BR /&gt;
 try&lt;BR /&gt;
 {&lt;BR /&gt;
  m_strConnection.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s",strMDBFileName);&lt;BR /&gt;
  m_pConnection-&amp;gt;Open((_bstr_t)m_strConnection,"","",adModeUnknown);//ACAD crash&lt;BR /&gt;
 }&lt;BR /&gt;
 catch(_com_error &amp;amp;e)&lt;BR /&gt;
 {&lt;BR /&gt;
  strError.Format("connection open error:%s",e.ErrorMessage());&lt;BR /&gt;
    return;&lt;BR /&gt;
 }&lt;BR /&gt;
&lt;BR /&gt;
someone can tell me why?</description>
      <pubDate>Fri, 29 Feb 2008 14:57:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/arx-ado-acad2004-crash/m-p/2193062#M19674</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-02-29T14:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: arx+ado+acad2004 crash</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/arx-ado-acad2004-crash/m-p/2193063#M19675</link>
      <description>I had a similar problem when developing for 2005 and 2006 build. &lt;BR /&gt;
&lt;BR /&gt;
I ended up with the following in my header file wher I utilized the code.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
#include &lt;TCHAR.H&gt;	// Needed for _T() macro.&lt;BR /&gt;
&lt;BR /&gt;
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "adoEOF")&lt;BR /&gt;
#define CATCHCOM(hr)  if ( FAILED( hr ) ) throw( _com_error( hr, NULL ) );&lt;BR /&gt;
// The BSTR's&lt;BR /&gt;
_bstr_t connStrSQL("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=");&lt;BR /&gt;
// The Coinitialize ( with out this struct it gets a invalid pointer error I don't know why)&lt;BR /&gt;
struct HandleCOM&lt;BR /&gt;
{&lt;BR /&gt;
   HandleCOM()  { ::CoInitialize(NULL); }&lt;BR /&gt;
   ~HandleCOM() { ::CoUninitialize();   }&lt;BR /&gt;
} _HandleCOM_;&lt;/TCHAR.H&gt;</description>
      <pubDate>Fri, 14 Mar 2008 02:32:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/arx-ado-acad2004-crash/m-p/2193063#M19675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-14T02:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: arx+ado+acad2004 crash</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/arx-ado-acad2004-crash/m-p/2193064#M19676</link>
      <description>I use VC6+ado+acad2002 code is right;&lt;BR /&gt;
use VS2003+ado+acad2006(or acad2004) also right;&lt;BR /&gt;
but VS2002+ado+acad2004(or acad2006) crash;&lt;BR /&gt;
mybe vs2002 have some wrong.&lt;BR /&gt;
I have update vs2002 sp1.</description>
      <pubDate>Sun, 16 Mar 2008 15:14:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/arx-ado-acad2004-crash/m-p/2193064#M19676</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-16T15:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: arx+ado+acad2004 crash</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/arx-ado-acad2004-crash/m-p/2193065#M19677</link>
      <description>My environment is VS 2002 with SP1 I believe. Idon't have that machine near me at the time though. I compiled for 2005 and 2006 with Object ARX 2005 though. I'm not sure if that made a difference though.&lt;BR /&gt;
&lt;BR /&gt;
I've been looking into othe ways to tie to a database, sinc eI can't seemt o get this method to work with ObjectARX 2008 and VS 2005. I've managed to get some things to work but not sure about how efficient it is just yet. Have you looked into other methods?</description>
      <pubDate>Mon, 17 Mar 2008 11:14:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/arx-ado-acad2004-crash/m-p/2193065#M19677</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-17T11:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: arx+ado+acad2004 crash</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/arx-ado-acad2004-crash/m-p/2193066#M19678</link>
      <description>there is no error!!!!</description>
      <pubDate>Thu, 20 Mar 2008 01:34:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/arx-ado-acad2004-crash/m-p/2193066#M19678</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-20T01:34:52Z</dc:date>
    </item>
  </channel>
</rss>

