<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : CXTPControl not saving with _XTP_SCHEMA_CURRENT</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTPControl not saving with _XTP_SCHEMA_CURRENT]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 20 Apr 2026 08:31:28 +0000</pubDate>
  <lastBuildDate>Fri, 17 May 2013 12:01:53 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=21650</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[CXTPControl not saving with _XTP_SCHEMA_CURRENT : Hi,So I found that if I detect...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=21650&amp;PID=70950&amp;title=cxtpcontrol-not-saving-with-xtp-schema-current#70950</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5354">johnmichael</a><br /><strong>Subject:</strong> 21650<br /><strong>Posted:</strong> 17 May 2013 at 12:01pm<br /><br /><div>Hi,</div><div><br></div><div>So I found that if I detect the borqued schema number at the point is serialises the runtime class, I can tweak that back to the correct version and then serialise without error. Everything works great. However this is not a good fix because it would inevitably break if someone had the old schema version and serialised it with my new code.&nbsp;</div><div><br></div><div><br></div><div><br></div>BOOL CXTPPropExchangeArchive::ExchangeRuntimeClass(LPCTSTR /*pszPropName*/, CRuntimeClass*&amp; pClass, CRuntimeClass* pDefaultClass)<div>{</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>if (!OnBeforeExchange())</div><div><span ="Apple-tab-span" style="white-space:pre">		</span>return FALSE;</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>if (!IsLoading())</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>{</div><div><span ="Apple-tab-span" style="white-space:pre">		</span>m_ar.WriteClass(pClass);</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>}</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>else</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>{</div><div><span ="Apple-tab-span" style="white-space:pre">		</span>pClass = m_ar.ReadClass(pDefaultClass, &amp;m_nSchema);</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">		</span>if (m_nSchema == 37)</div><div><span ="Apple-tab-span" style="white-space:pre">			</span>m_nSchema = _XTP_SCHEMA_CURRENT;</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">		</span>if (!pClass)</div><div><span ="Apple-tab-span" style="white-space:pre">			</span>return FALSE;</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>}</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>return TRUE;</div><div>}</div><div><br></div><div>Q: How and Why is the schema ending up as a 'hardcoded' 37 when from my debugging _XTP_SCHEMA_CURRENT and those controls m_nSchema &nbsp;is 40 when the objects are saved to the archive?</div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Fri, 17 May 2013 12:01:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=21650&amp;PID=70950&amp;title=cxtpcontrol-not-saving-with-xtp-schema-current#70950</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPControl not saving with _XTP_SCHEMA_CURRENT : Hi,So I think I found out why...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=21650&amp;PID=70949&amp;title=cxtpcontrol-not-saving-with-xtp-schema-current#70949</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5354">johnmichael</a><br /><strong>Subject:</strong> 21650<br /><strong>Posted:</strong> 17 May 2013 at 11:00am<br /><br />Hi,<div><br></div><div>So I think I found out why this&nbsp;<a href="http://forum.codejock.com/forum_posts.asp?TID=21649&amp;title=cxtpc&#111;ntrol-causing-carchiveexcepti&#111;n" rel="nofollow">http://forum.codejock.com/forum_posts.asp?TID=21649&amp;title=cxtpcontrol-causing-carchiveexception</a></div><div><br></div><div>Is blowing up, so the control that is serialised to the registry when being loaded back in still has<br><br>_XTP_SCHEMA_1340<br><br>instead of my new schema<br><br>_XTP_SCHEMA_1350</div><div><br></div><div>even thought&nbsp;<br><br>#define _XTP_SCHEMA_CURRENT _XTP_SCHEMA_1350</div><div><br></div><div>So I decided to do some digging I changed the actual value for&nbsp;<br><br>#define _XTP_SCHEMA_1340 (0x25)</div><div><br></div><div>to&nbsp;</div><div><br></div><div>#define _XTP_SCHEMA_1340 (0x27)</div><div><br></div><div>and my new define to&nbsp;<br><br><div><br></div><div>#define _XTP_SCHEMA_1350 (0x28)</div><div><br></div><div><br></div><div>#define _XTP_SCHEMA_CURRENT _XTP_SCHEMA_1350<br><br>resaved a clean registry and reloaded&nbsp;<br><br>on save the m_nSchema is definitly 40 = 0x28</div></div><div><br></div><div>however on loading the control back from the registry it still = 37 even though I changed the old&nbsp;<br><br>#define _XTP_SCHEMA_1340 (0x25) to be 39&nbsp;</div><div><br></div><div>What have I missed? why is the schema value not the new schema number when I load from the registry? What is changing it?</div><div><br></div><div>If I ignore the schema being wrong or hard code it back to my correct schema number it serialises my new data value correctly and doesnt throw any issues.</div><div><br></div><div>Looks like there is a hard coded issue somewhere?</div><div><br></div><div>Any help?</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Fri, 17 May 2013 11:00:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=21650&amp;PID=70949&amp;title=cxtpcontrol-not-saving-with-xtp-schema-current#70949</guid>
  </item> 
 </channel>
</rss>