<?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 : Empty PX_String - strange behaviour on load</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Empty PX_String - strange behaviour on load]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 Apr 2026 23:36:15 +0000</pubDate>
  <lastBuildDate>Mon, 11 Aug 2008 02:11:12 +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=11688</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[Empty PX_String - strange behaviour on load : Shouldn&amp;#039;t ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39687&amp;title=empty-px-string-strange-behaviour-on-load#39687</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 11688<br /><strong>Posted:</strong> 11 August 2008 at 2:11am<br /><br />Shouldn't ]]>
   </description>
   <pubDate>Mon, 11 Aug 2008 02:11:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39687&amp;title=empty-px-string-strange-behaviour-on-load#39687</guid>
  </item> 
  <item>
   <title><![CDATA[Empty PX_String - strange behaviour on load : Hi Oleg;Shouldn&amp;#039;t it also...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39679&amp;title=empty-px-string-strange-behaviour-on-load#39679</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 11688<br /><strong>Posted:</strong> 10 August 2008 at 11:10am<br /><br />Hi Oleg;<br><br>Shouldn't it also work with non compact mode and/or formatted XML?<br>Is this a bug of the MSXML implementation?<br>]]>
   </description>
   <pubDate>Sun, 10 Aug 2008 11:10:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39679&amp;title=empty-px-string-strange-behaviour-on-load#39679</guid>
  </item> 
  <item>
   <title><![CDATA[Empty PX_String - strange behaviour on load : Hi,  Please remove px.SetCompactMode(FALSE);...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39609&amp;title=empty-px-string-strange-behaviour-on-load#39609</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 11688<br /><strong>Posted:</strong> 08 August 2008 at 6:19am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Please remove px.SetCompactMode(FALSE); line. or don't format XML: </DIV><DIV>px.SaveToFile(pszPath, <strong>FALSE</strong>);</DIV>]]>
   </description>
   <pubDate>Fri, 08 Aug 2008 06:19:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39609&amp;title=empty-px-string-strange-behaviour-on-load#39609</guid>
  </item> 
  <item>
   <title><![CDATA[Empty PX_String - strange behaviour on load : Hi Oleg;Here is my code to store...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39592&amp;title=empty-px-string-strange-behaviour-on-load#39592</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 11688<br /><strong>Posted:</strong> 07 August 2008 at 5:29pm<br /><br />Hi Oleg;<br><br>Here is my code to store the settings into the XML file:<br><br><table width="99%"><tr><td><pre class="BBcode">bool StoreEventConfigSettings(struct _EventConfigOptions&amp; gSettings, DWORD&amp; dwError) {<br>&nbsp;&nbsp;&nbsp; TCHAR pszPath&#091;MAX_PATH&#093;;<br>&nbsp;&nbsp;&nbsp; if (SHGetFolderPath(0, CSIDL_COMMON_APPDATA, 0, SHGFP_TYPE_CURRENT, pszPath)==S_OK) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _tcscat(pszPath, _T("\\XRangeEye EventConfig 1.5"));<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPPropExchangeXMLNode px(FALSE, 0, _T("EventConfigSettings"));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; px.SetCompactMode(FALSE);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (px.OnBeforeExchange()) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; VERIFY(PX_String(&amp;px, _T("DBConnect"), gSettings.EventConfigGeneralOptions.strService));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPPropExchangeSection pxSubNode1(px.GetSection(_T("Service")));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; VERIFY(PX_String(&amp;pxSubNode1, _T("User"),&nbsp;&nbsp;&nbsp; gSettings.EventConfigServiceOptions.strUser));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; VERIFY(PX_Blob(&amp;pxSubNode1, _T("Security"), gSettings.EventConfigServiceOptions.lpPassword, gSettings.EventConfigServiceOptions.dwLen));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <strong>VERIFY(PX_String(&amp;pxSubNode1, _T("Domain"),&nbsp;&nbsp;&nbsp; gSettings.EventConfigServiceOptions.strDomain));</strong><br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _tcscat(pszPath, _T("\\Options.xml"));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return (px.SaveToFile(pszPath)==S_OK)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp; return false;<br>}</pre></td></tr></table><br><br>And here is the counterpart...<br><br><table width="99%"><tr><td><pre class="BBcode">bool LoadEventConfigSettings(struct _EventConfigOptions&amp; gSettings)<br>{<br>&nbsp;&nbsp;&nbsp; TCHAR pszPath&#091;MAX_PATH&#093;;<br>&nbsp;&nbsp;&nbsp; if (SHGetFolderPath(0, CSIDL_COMMON_APPDATA, 0, SHGFP_TYPE_CURRENT, pszPath)==S_OK)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _tcscat(pszPath, _T("\\XRangeEye EventConfig 1.5\\Options.xml"));<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPPropExchangeXMLNode px(TRUE, 0, _T("EventConfigSettings"));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (px.LoadFromFile(pszPath))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; VERIFY(PX_String(&amp;px, _T("DBConnect"),&nbsp;&nbsp;&nbsp; gSettings.EventConfigGeneralOptions.strService));<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPPropExchangeSection pxSubNode1(px.GetSection(_T("Service")));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; VERIFY(PX_String(&amp;pxSubNode1, _T("User"),&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gSettings.EventConfigServiceOptions.strUser));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (gSettings.EventConfigServiceOptions.lpPassword!=0) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; free(gSettings.EventConfigServiceOptions.lpPassword);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gSettings.EventConfigServiceOptions.lpPassword=0;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gSettings.EventConfigServiceOptions.dwLen=0;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <strong>VERIFY(PX_String(&amp;pxSubNode1, _T("Domain"),&nbsp;&nbsp;&nbsp; gSettings.EventConfigServiceOptions.strDomain));</strong><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; VERIFY(PX_Blob(&amp;pxSubNode1, _T("Security"), gSettings.EventConfigServiceOptions.lpPassword, gSettings.EventConfigServiceOptions.dwLen));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return true;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; XREventConfigOptions=XREventConfigDefaultOptions;<br><br>&nbsp;&nbsp;&nbsp; return false;<br>}</pre></td></tr></table><br><br>In my case, most of the time the parameter "Domain" is an empty string. So storing the empty string and afterwards loading it results in a string with <strong><font color=blue>\n</font></strong> three times<br><br>]]>
   </description>
   <pubDate>Thu, 07 Aug 2008 17:29:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39592&amp;title=empty-px-string-strange-behaviour-on-load#39592</guid>
  </item> 
  <item>
   <title><![CDATA[Empty PX_String - strange behaviour on load : Hi, Show code lines ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39356&amp;title=empty-px-string-strange-behaviour-on-load#39356</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 11688<br /><strong>Posted:</strong> 03 August 2008 at 4:16am<br /><br /><P>Hi,</P><DIV>Show code lines </DIV>]]>
   </description>
   <pubDate>Sun, 03 Aug 2008 04:16:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39356&amp;title=empty-px-string-strange-behaviour-on-load#39356</guid>
  </item> 
  <item>
   <title><![CDATA[Empty PX_String - strange behaviour on load : Hi;I&amp;#039;m using Toolkit 12.0.1...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39303&amp;title=empty-px-string-strange-behaviour-on-load#39303</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 11688<br /><strong>Posted:</strong> 01 August 2008 at 5:47am<br /><br />Hi;<br><br>I'm using Toolkit 12.0.1 and CXTPPropExchangeXMLNode to store/load settings into/from XML files.<br>When calling PX_String to store empty CString values (GetLength() returns 0) and afterwards calling PX_String to load the empty string from the XML file, I get a string with three newline ASCII code 10 characters in it!<br><br>Is this a BUG or do I miss something?<br>]]>
   </description>
   <pubDate>Fri, 01 Aug 2008 05:47:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11688&amp;PID=39303&amp;title=empty-px-string-strange-behaviour-on-load#39303</guid>
  </item> 
 </channel>
</rss>