<?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: VC8 - ObjectARX 7 - ACHAR * in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652161#M23547</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
    I am also facing the same kind of problem. I am very new to AutoCad and C++. In my company they used one application. Its work fine on AutoCad 2005 but it will not working in AutoCad 2008. I plan to convert that application. I created a new application in Visual studio environment, download the latest objectarx include and library file. Now i am facing so many error, could you please give solution for my problem.&lt;BR /&gt;
I list out the errors.&lt;BR /&gt;
Error	1	error C2664: 'acedDefun' : cannot convert parameter 1 from 'char *' to 'const ACHAR *'&lt;BR /&gt;
Error	2	error C2664: 'acedUndef' : cannot convert parameter 1 from 'char *' to 'const ACHAR *'&lt;BR /&gt;
Error	3	error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char [12]' to 'const ACHAR *'&lt;BR /&gt;
Error	4	error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char [25]' to 'const ACHAR *'&lt;BR /&gt;
Error	5	error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char [8]' to 'const ACHAR *'&lt;BR /&gt;
Error	6	error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char [8]' to 'const ACHAR *'&lt;BR /&gt;
Error	7	error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char [8]' to 'const ACHAR *'&lt;BR /&gt;
Error	8	error C2440: '=' : cannot convert from 'char [24]' to 'ACHAR *'&lt;BR /&gt;
Error	9	error C2440: '=' : cannot convert from 'char [24]' to 'ACHAR *'&lt;BR /&gt;
Error	10	error C2440: '=' : cannot convert from 'char [24]' to 'ACHAR *'&lt;BR /&gt;
&lt;BR /&gt;
So i try to change that data type as ACHAR the error was retified but it wont work in AutoCad. Please help me...&lt;BR /&gt;
I was stuckup with this problem. I here with attach that code, for your refernce.</description>
    <pubDate>Thu, 27 Nov 2008 01:16:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-11-27T01:16:47Z</dc:date>
    <item>
      <title>VC8 - ObjectARX 7 - ACHAR *</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652155#M23541</link>
      <description>I'm trying to move my ARX application from VC7 and AutoCAD2006 to VC8 and &lt;BR /&gt;
AutoCAD2007&lt;BR /&gt;
&lt;BR /&gt;
In this line (an similar ones):&lt;BR /&gt;
&lt;BR /&gt;
ads_printf( "&amp;lt; %d,%d &amp;gt;\n",n[0],n[1] );&lt;BR /&gt;
&lt;BR /&gt;
I get this error message&lt;BR /&gt;
&lt;BR /&gt;
error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char &lt;BR /&gt;
[11]' to 'const ACHAR *'&lt;BR /&gt;
&lt;BR /&gt;
I know that VC8 and ARX2007 use unicode strings, but how can I fix this &lt;BR /&gt;
problem without changing my code?&lt;BR /&gt;
thanks</description>
      <pubDate>Tue, 23 May 2006 10:21:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652155#M23541</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-23T10:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: VC8 - ObjectARX 7 - ACHAR *</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652156#M23542</link>
      <description>&amp;gt; I know that VC8 and ARX2007 use unicode strings, but how can&lt;BR /&gt;
&amp;gt; I fix this problem without changing my code?&lt;BR /&gt;
&lt;BR /&gt;
  There is no way to fix it without changing your code.  Is there some &lt;BR /&gt;
reason why you can't change your code? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft ==&amp;gt; http://www.manusoft.com&lt;BR /&gt;
VP Americas, CADLock, Inc. ==&amp;gt; http://www.cadlock.com</description>
      <pubDate>Tue, 23 May 2006 10:33:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652156#M23542</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-23T10:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: VC8 - ObjectARX 7 - ACHAR *</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652157#M23543</link>
      <description>I mean not to change every single line, because:&lt;BR /&gt;
&lt;BR /&gt;
a) This problem exists in more that 3000 cases in my project (mainly because&lt;BR /&gt;
of ads_printf, or strcpy, strlen, etc)&lt;BR /&gt;
&lt;BR /&gt;
b) I use the same-common code for building the project for AutoCAD R14 -&lt;BR /&gt;
AutoCAD 2006&lt;BR /&gt;
&lt;BR /&gt;
Perhaps by changing project setings or definitions?&lt;BR /&gt;
thank you&lt;BR /&gt;
&lt;BR /&gt;
ps.. sorry.. i pressed the wrong button and replied in a wrong way...&lt;BR /&gt;
&lt;BR /&gt;
"Owen Wengerd" &lt;OWENW&gt; wrote in message &lt;BR /&gt;
news:5182932@discussion.autodesk.com...&lt;BR /&gt;
&amp;gt; I know that VC8 and ARX2007 use unicode strings, but how can&lt;BR /&gt;
&amp;gt; I fix this problem without changing my code?&lt;BR /&gt;
&lt;BR /&gt;
  There is no way to fix it without changing your code.  Is there some&lt;BR /&gt;
reason why you can't change your code? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft ==&amp;gt; http://www.manusoft.com&lt;BR /&gt;
VP Americas, CADLock, Inc. ==&amp;gt; http://www.cadlock.com&lt;/OWENW&gt;</description>
      <pubDate>Tue, 23 May 2006 10:48:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652157#M23543</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-23T10:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: VC8 - ObjectARX 7 - ACHAR *</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652158#M23544</link>
      <description>I'm afraid you'll have to fix your code.  If you haven't written macros in &lt;BR /&gt;
Visual Studio, this would be a good reason to learn.  Spend an hour or two &lt;BR /&gt;
writing a macro to wrap your constant strings in ACRX_T(), then you will &lt;BR /&gt;
have fixed your code and learned a new trick at the same time.  For &lt;BR /&gt;
targeting previous versions of AutoCAD, just:&lt;BR /&gt;
#define ACRX_T(s) s&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft ==&amp;gt; http://www.manusoft.com&lt;BR /&gt;
VP Americas, CADLock, Inc. ==&amp;gt; http://www.cadlock.com</description>
      <pubDate>Tue, 23 May 2006 11:13:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652158#M23544</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-23T11:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: VC8 - ObjectARX 7 - ACHAR *</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652159#M23545</link>
      <description>Furthermore, there is a whole collection of _t macros provided my Microsoft &lt;BR /&gt;
(e.g., _tcslen()) that (mostly) enable you to write single-source MBCS and &lt;BR /&gt;
UNICODE code.&lt;BR /&gt;
&lt;BR /&gt;
Although IMHO, MBCS is *far* too much trouble, so if you're forced to make &lt;BR /&gt;
changes anyway, do everything in UNICODE (no ugly _t macros) internally and &lt;BR /&gt;
convert at the edges (assuming you can live with the slight performance &lt;BR /&gt;
hit).  Of course, this assumes you want/need a MBCS application (usually for &lt;BR /&gt;
CJK); if you're satisfied with just ISO8859-1 languages (western europe), &lt;BR /&gt;
then you don't need UNICODE.&lt;BR /&gt;
&lt;BR /&gt;
   Dan&lt;BR /&gt;
&lt;BR /&gt;
"Owen Wengerd" &lt;OWENW&gt; wrote in message &lt;BR /&gt;
news:5182955@discussion.autodesk.com...&lt;BR /&gt;
I'm afraid you'll have to fix your code.  If you haven't written macros in&lt;BR /&gt;
Visual Studio, this would be a good reason to learn.  Spend an hour or two&lt;BR /&gt;
writing a macro to wrap your constant strings in ACRX_T(), then you will&lt;BR /&gt;
have fixed your code and learned a new trick at the same time.  For&lt;BR /&gt;
targeting previous versions of AutoCAD, just:&lt;BR /&gt;
#define ACRX_T(s) s&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft ==&amp;gt; http://www.manusoft.com&lt;BR /&gt;
VP Americas, CADLock, Inc. ==&amp;gt; http://www.cadlock.com&lt;/OWENW&gt;</description>
      <pubDate>Tue, 23 May 2006 14:40:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652159#M23545</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-23T14:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: VC8 - ObjectARX 7 - ACHAR *</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652160#M23546</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
We can adapt following two solutions to fix ur problem:&lt;BR /&gt;
Solution 1:&lt;BR /&gt;
1. Change your project settings to UNICODE.&lt;BR /&gt;
2. Wrap every string literals using _T or ACRX_T macro;&lt;BR /&gt;
3. Replace standard string functions with UNICODE string functions&lt;BR /&gt;
e.g strcpy by _tcscpy. Find and replace can do this job easily &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Solution 2:&lt;BR /&gt;
1. Keep previous settings as it is.&lt;BR /&gt;
2. Handle only functions that deal with AutoCAD 2007.&lt;BR /&gt;
e.g  ads_printf" hello") change it to ads_printfACRX_T(" hello"))&lt;BR /&gt;
3. Convert strings to UNICODE for AutoCAD dealing functions.&lt;BR /&gt;
5. Convert strings got from AutoCAD back to ANSI for dealing with your original functions taking ANSI string parameters.&lt;BR /&gt;
&lt;BR /&gt;
It is always advisable to use solution 1.&lt;BR /&gt;
Please let me know if you have any questions further.&lt;BR /&gt;
&lt;BR /&gt;
Thanks and Best Regards,&lt;BR /&gt;
KIMI</description>
      <pubDate>Wed, 24 May 2006 05:54:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652160#M23546</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-24T05:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: VC8 - ObjectARX 7 - ACHAR *</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652161#M23547</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
    I am also facing the same kind of problem. I am very new to AutoCad and C++. In my company they used one application. Its work fine on AutoCad 2005 but it will not working in AutoCad 2008. I plan to convert that application. I created a new application in Visual studio environment, download the latest objectarx include and library file. Now i am facing so many error, could you please give solution for my problem.&lt;BR /&gt;
I list out the errors.&lt;BR /&gt;
Error	1	error C2664: 'acedDefun' : cannot convert parameter 1 from 'char *' to 'const ACHAR *'&lt;BR /&gt;
Error	2	error C2664: 'acedUndef' : cannot convert parameter 1 from 'char *' to 'const ACHAR *'&lt;BR /&gt;
Error	3	error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char [12]' to 'const ACHAR *'&lt;BR /&gt;
Error	4	error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char [25]' to 'const ACHAR *'&lt;BR /&gt;
Error	5	error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char [8]' to 'const ACHAR *'&lt;BR /&gt;
Error	6	error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char [8]' to 'const ACHAR *'&lt;BR /&gt;
Error	7	error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char [8]' to 'const ACHAR *'&lt;BR /&gt;
Error	8	error C2440: '=' : cannot convert from 'char [24]' to 'ACHAR *'&lt;BR /&gt;
Error	9	error C2440: '=' : cannot convert from 'char [24]' to 'ACHAR *'&lt;BR /&gt;
Error	10	error C2440: '=' : cannot convert from 'char [24]' to 'ACHAR *'&lt;BR /&gt;
&lt;BR /&gt;
So i try to change that data type as ACHAR the error was retified but it wont work in AutoCad. Please help me...&lt;BR /&gt;
I was stuckup with this problem. I here with attach that code, for your refernce.</description>
      <pubDate>Thu, 27 Nov 2008 01:16:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652161#M23547</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-27T01:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: VC8 - ObjectARX 7 - ACHAR *</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652162#M23548</link>
      <description>&lt;DIV id="jive-html-wrapper-div"&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;You need to do some research on UNICODE.&amp;nbsp; &lt;BR /&gt;
UNICODE characters are 2-byte characters.&amp;nbsp; Starting with AutoCAD 2007, &lt;BR /&gt;
AutoCAD is now fully UNICODE compatible.&amp;nbsp; That means that all of your &lt;BR /&gt;
strings and characters need to be defined as such.&amp;nbsp; For example, if you &lt;BR /&gt;
include "tchar.h" into your project you can then replace your char definitions &lt;BR /&gt;
with TCHAR definitions;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;char szName[21];&amp;nbsp; becomes TCHAR &lt;BR /&gt;
szName[21];&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Your literal strings would be wrapped with the _T() &lt;BR /&gt;
macro;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;acutPrintf( "Command finished successfully\n" ); &lt;BR /&gt;
becomes acutPrintf( _T("Command finished successfully\n"));&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;It's fairly straight forward, but beware ... if you &lt;BR /&gt;
are storing old char variables in a binary format somewhere, then you will need &lt;BR /&gt;
to extract it as a char and use "mbstowcs()" to convert to a wide character &lt;BR /&gt;
string (that's what both ACHAR and TCHAR are) if you are going to use it with &lt;BR /&gt;
any of the AutoCAD API calls.&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Joe&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;BR /&gt;
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"&amp;gt;&lt;BR /&gt;
  &lt;DIV&gt;&amp;lt;travimca&amp;gt; wrote in message &lt;A&gt;&lt;BR /&gt;
  href="news:6080388@discussion.autodesk.com"&amp;gt;news:6080388@discussion.autodesk.com&lt;/A&gt;...&lt;/DIV&gt;Hi, &lt;BR /&gt;
  I am also facing the same kind of problem. I am very new to AutoCad and C++. &lt;BR /&gt;
  In my company they used one application. Its work fine on AutoCad 2005 but it &lt;BR /&gt;
  will not working in AutoCad 2008. I plan to convert that application. I &lt;BR /&gt;
  created a new application in Visual studio environment, download the latest &lt;BR /&gt;
  objectarx include and library file. Now i am facing so many error, could you &lt;BR /&gt;
  please give solution for my problem. I list out the errors. Error 1 error &lt;BR /&gt;
  C2664: 'acedDefun' : cannot convert parameter 1 from 'char *' to 'const ACHAR &lt;BR /&gt;
  *' Error 2 error C2664: 'acedUndef' : cannot convert parameter 1 from 'char *' &lt;BR /&gt;
  to 'const ACHAR *' Error 3 error C2664: 'acutPrintf' : cannot convert &lt;BR /&gt;
  parameter 1 from 'const char [12]' to 'const ACHAR *' Error 4 error C2664: &lt;BR /&gt;
  'acutPrintf' : cannot convert parameter 1 from 'const char [25]' to 'const &lt;BR /&gt;
  ACHAR *' Error 5 error C2664: 'acutPrintf' : cannot convert parameter 1 from &lt;BR /&gt;
  'const char [8]' to 'const ACHAR *' Error 6 error C2664: 'acutPrintf' : cannot &lt;BR /&gt;
  convert parameter 1 from 'const char [8]' to 'const ACHAR *' Error 7 error &lt;BR /&gt;
  C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char [8]' to &lt;BR /&gt;
  'const ACHAR *' Error 8 error C2440: '=' : cannot convert from 'char [24]' to &lt;BR /&gt;
  'ACHAR *' Error 9 error C2440: '=' : cannot convert from 'char [24]' to 'ACHAR &lt;BR /&gt;
  *' Error 10 error C2440: '=' : cannot convert from 'char [24]' to 'ACHAR *' So &lt;BR /&gt;
  i try to change that data type as ACHAR the error was retified but it wont &lt;BR /&gt;
  work in AutoCad. Please help me... I was stuckup with this problem. I here &lt;BR /&gt;
  with attach that code, for your refernce. &lt;/BLOCKQUOTE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Nov 2008 21:35:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/vc8-objectarx-7-achar/m-p/1652162#M23548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-11-27T21:35:18Z</dc:date>
    </item>
  </channel>
</rss>

