<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QT not recognizing win32 methods]]></title><description><![CDATA[<p dir="auto">I am using functions like readregistryvalue from windows.h<br />
I wanted to know if this is the way it has to be done in Qt too, and I tried including windows.h but I am not able to do that anyideas as to how to include it .<br />
by the way i am using visual studio addin and my workspace is linked with 4.8.0 qt library</p>
]]></description><link>https://forum.qt.io/topic/13208/qt-not-recognizing-win32-methods</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 07:19:38 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/13208.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 18 Jan 2012 10:03:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QT not recognizing win32 methods on Wed, 18 Jan 2012 10:20:33 GMT]]></title><description><![CDATA[<p dir="auto">Have you set Character Set Project Properties?<br />
VS Project Property Page -&gt; General -&gt; Character Set.<br />
&amp;<br />
Vs Property Page -&gt; C/c++ -&gt; Language -&gt; Treat WChar_t As Built in Type should be No.</p>
]]></description><link>https://forum.qt.io/post/124275</link><guid isPermaLink="true">https://forum.qt.io/post/124275</guid><dc:creator><![CDATA[AcerExtensa]]></dc:creator><pubDate>Wed, 18 Jan 2012 10:20:33 GMT</pubDate></item><item><title><![CDATA[Reply to QT not recognizing win32 methods on Wed, 18 Jan 2012 10:18:23 GMT]]></title><description><![CDATA[<p dir="auto">If you use RegGetValue from winapi, you need add library Advapi32.lib see "msdn":<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms724868(v=vs.85).aspx" target="_blank" rel="noopener noreferrer nofollow ugc">http://msdn.microsoft.com/en-us/library/windows/desktop/ms724868(v=vs.85).aspx</a></p>
<p dir="auto">p.s. some my code:<br />
@<br />
QString value(const QString &amp;subKey)<br />
{<br />
TCHAR buff[1024] = {0};<br />
DWORD dwSize = sizeof(buff);</p>
<pre><code>lError = RegQueryValueEx(hHandle, subKey.utf16(), NULL, NULL, (BYTE*)buff, &amp;dwSize);

return QString::fromUtf16(reinterpret_cast&lt;ushort*&gt;(buff));
</code></pre>
<p dir="auto">}<br />
@</p>
]]></description><link>https://forum.qt.io/post/124274</link><guid isPermaLink="true">https://forum.qt.io/post/124274</guid><dc:creator><![CDATA[stima_ua]]></dc:creator><pubDate>Wed, 18 Jan 2012 10:18:23 GMT</pubDate></item><item><title><![CDATA[Reply to QT not recognizing win32 methods on Wed, 18 Jan 2012 10:14:29 GMT]]></title><description><![CDATA[<p dir="auto">actually, I am having an error which says _T identifier not found, I am trying to convert from char * to LPCWSTR and tried including windows.h<br />
apart from that i incuded QString::toUtf8 to achieve from QString to QByteArray and that is also not actually working.</p>
<p dir="auto">I am pretty sure its getting included because it should have thrown me an error which would be like header file not found, that is not the case here,.</p>
]]></description><link>https://forum.qt.io/post/124271</link><guid isPermaLink="true">https://forum.qt.io/post/124271</guid><dc:creator><![CDATA[Kewal]]></dc:creator><pubDate>Wed, 18 Jan 2012 10:14:29 GMT</pubDate></item><item><title><![CDATA[Reply to QT not recognizing win32 methods on Wed, 18 Jan 2012 10:10:25 GMT]]></title><description><![CDATA[<p dir="auto">This usually works without any problems and is used internally in Qt too. What is your error?</p>
]]></description><link>https://forum.qt.io/post/124267</link><guid isPermaLink="true">https://forum.qt.io/post/124267</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Wed, 18 Jan 2012 10:10:25 GMT</pubDate></item><item><title><![CDATA[Reply to QT not recognizing win32 methods on Wed, 18 Jan 2012 10:09:02 GMT]]></title><description><![CDATA[<p dir="auto">You can use QSettings instead of windows registry functions...<br />
And by the way, if you use VS, you can use full power of windows SDK, just ensure what all paths &amp; libs are set in the VS Project Properties...</p>
<p dir="auto">I don't really understand why you can't include windows.h? What does compiler says about that?</p>
]]></description><link>https://forum.qt.io/post/124268</link><guid isPermaLink="true">https://forum.qt.io/post/124268</guid><dc:creator><![CDATA[AcerExtensa]]></dc:creator><pubDate>Wed, 18 Jan 2012 10:09:02 GMT</pubDate></item></channel></rss>