<?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="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : passing CString arguments to dll functions</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : passing CString arguments to dll functions]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 13:44:01 +0000</pubDate>
  <lastBuildDate>Tue, 11 Feb 2014 13:17:46 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=2824</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[passing CString arguments to dll functions : Wendell,Can you try calling QP.DrawTextA...]]></title>
   <link>http://www.quickpdf.org/forum/passing-cstring-arguments-to-dll-functions_topic2824_post11475.html#11475</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2824<br /><strong>Posted:</strong> 11 Feb 14 at 1:17PM<br /><br />Wendell,<div><br></div><div>Can you try calling QP.DrawTextA &nbsp;- 'A' is for the Ansi string version. &nbsp;It should get you started.</div><div><br></div><div><br></div><div>Have you tried using CStringW ?</div><div><br></div><div>Here is some code that compiles and runs in an VS2010 MFC project.</div><div><br></div><div><span ="Apple-tab-span" style="line-height: 1.4; white-space: pre;">	</span><span style="line-height: 1.4;">if (QP-&gt;UnlockKey(_T("&lt;&lt;&lt; insert license key here &gt;&gt;&gt;")) == 1)</span></div><div><div><span ="Apple-tab-span" style="white-space:pre">	</span>{</div><div><span ="Apple-tab-span" style="white-space:pre">		</span>int ret;</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">		</span>QP-&gt;AddTrueTypeFont(L"Wingdings", 0);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QP-&gt;SetOrigin(1);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QP-&gt;DrawText(100, 20, L"Hello World");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QP-&gt;SetTextSize(18);</div><div><br></div><div><span ="Apple-tab-span" style="line-height: 1.4; white-space: pre;">		</span><span style="line-height: 1.4;">ret = QP-&gt;DrawText(100, 500, _T("Hello world"));</span></div><div><span ="Apple-tab-span" style="white-space:pre">		</span>ret = QP-&gt;SaveToFile(_T("HelloFromDLL.pdf"));</div><div><br></div><div><span ="Apple-tab-span" style="line-height: 1.4; white-space: pre;">		</span><span style="line-height: 1.4;">CStringW &nbsp;filename = L"f:\\downloads\\1.pdf";</span></div><div><span ="Apple-tab-span" style="line-height: 1.4; white-space: pre;">		</span><span style="line-height: 1.4;">ret = QP-&gt;LoadFromFile(filename, L"");</span></div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">		</span>delete QP;</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>}</div></div><div><br></div><div><span style="line-height: 1.4;">Andrew.</span></div>]]>
   </description>
   <pubDate>Tue, 11 Feb 2014 13:17:46 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/passing-cstring-arguments-to-dll-functions_topic2824_post11475.html#11475</guid>
  </item> 
  <item>
   <title><![CDATA[passing CString arguments to dll functions :  Hi Wendel!Microsoft will hel...]]></title>
   <link>http://www.quickpdf.org/forum/passing-cstring-arguments-to-dll-functions_topic2824_post11474.html#11474</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 2824<br /><strong>Posted:</strong> 11 Feb 14 at 7:59AM<br /><br />Hi Wendel!<div>&nbsp;</div><div>Microsoft will help:</div><div><a href="http://msdn.microsoft.com/de-de/library/ms235631.aspx" target="_blank" rel="nofollow">http://msdn.microsoft.com/de-de/library/ms235631.aspx</a></div><div>I think there'll be a similar page in english, too ;-)</div><div>&nbsp;</div><div>Cheers and welcome here,</div><div>Ingo</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Tue, 11 Feb 2014 07:59:27 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/passing-cstring-arguments-to-dll-functions_topic2824_post11474.html#11474</guid>
  </item> 
  <item>
   <title><![CDATA[passing CString arguments to dll functions : I am hoping this is easy -- Is...]]></title>
   <link>http://www.quickpdf.org/forum/passing-cstring-arguments-to-dll-functions_topic2824_post11467.html#11467</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2524">WendellSmith</a><br /><strong>Subject:</strong> 2824<br /><strong>Posted:</strong> 10 Feb 14 at 3:32PM<br /><br />I am hoping this is easy -- Is there an easy way to convert a CString to the type required for the dll calls (wchar_t *)?<div><br></div><div>I have tried a bunch of things but not found the magic code :)</div><div><br></div><div><span ="Apple-tab-span" style="line-height: 1.4; white-space: pre;">		</span><span style="line-height: 1.4;">CString Label = "xx";</span></div><div><span style="line-height: 1.4;"><br></span></div><div><span style="line-height: 1.4;"><span ="Apple-tab-span" style="white-space:pre">		</span>ConvertedLabel = ??; // how to get the CString Label into a format to pass into functions?</span></div><div><span style="line-height: 1.4;"><br></span></div><div><span ="Apple-tab-span" style="white-space:pre">		</span>QP.DrawText(100, 500, &nbsp;ConvertedLabel); // this &nbsp;does not work.</div><div><br></div><div>Does anyone have a suggestion how to do this? &nbsp;&#091;we are using MSVC6&#093;</div><div><br></div><div>Thanks</div><div><br></div>]]>
   </description>
   <pubDate>Mon, 10 Feb 2014 15:32:55 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/passing-cstring-arguments-to-dll-functions_topic2824_post11467.html#11467</guid>
  </item> 
 </channel>
</rss>