<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>logic involved &#187; win32</title> <atom:link href="http://www.coliena.com/blog/tag/win32/feed/" rel="self" type="application/rss+xml" /><link>http://www.coliena.com/blog</link> <description>... more often than not ...</description> <lastBuildDate>Sat, 21 Jan 2012 18:09:36 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Comparing Binary Files</title><link>http://www.coliena.com/blog/2010/11/comparing-binary-files/</link> <comments>http://www.coliena.com/blog/2010/11/comparing-binary-files/#comments</comments> <pubDate>Mon, 15 Nov 2010 20:02:28 +0000</pubDate> <dc:creator>niels</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[win32]]></category><guid
isPermaLink="false">http://coliena.com/blog/?p=434</guid> <description><![CDATA[Getting a diff from two binary files isn&#8217;t that easy. While there are loads of tools for comparing text files, there are only a few for binaries. A very nice &#8211; and free &#8211; utility for Windows is HxD. It&#8217;s not just a very fine hex editor, but pretty good at comparing binary files as [...]]]></description> <content:encoded><![CDATA[<p>Getting a diff from two binary files isn&#8217;t that easy. While there are loads of tools for comparing text files, there are only a few for binaries.</p><p>A very nice &#8211; and free &#8211; utility for Windows is <a
href="http://www.mh-nexus.de/" target="_blank">HxD</a>. It&#8217;s not just a very fine hex editor, but pretty good at comparing binary files as well.<br
/> <a
href="http://coliena.com/blog/wp-content/uploads/hxd_compare1.png"> <img
class="alignleft size-thumbnail wp-image-437" title="hxd_compare1" src="http://coliena.com/blog/wp-content/uploads/hxd_compare1-150x150.png" alt="" width="150" height="150" /></a><a
href="http://coliena.com/blog/wp-content/uploads/hxd_compare2.png"><img
class="alignleft size-thumbnail wp-image-440" title="hxd_compare2" src="http://coliena.com/blog/wp-content/uploads/hxd_compare2-150x150.png" alt="" width="150" height="150" /></a></p> ]]></content:encoded> <wfw:commentRss>http://www.coliena.com/blog/2010/11/comparing-binary-files/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Fighting Windows Sockets Legacy Troubles</title><link>http://www.coliena.com/blog/2010/05/winsock-troubles/</link> <comments>http://www.coliena.com/blog/2010/05/winsock-troubles/#comments</comments> <pubDate>Fri, 14 May 2010 19:00:31 +0000</pubDate> <dc:creator>niels</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[sockets]]></category> <category><![CDATA[win32]]></category> <category><![CDATA[windows]]></category><guid
isPermaLink="false">http://coliena.com/blog/?p=290</guid> <description><![CDATA[I came across a really annoying problem while using win32 sockets one of my bigger projects. In short, the VisualC compiler complained about redefinitions of basic Windows socket macros: C:\sdk\windows\v6.0a\include\ws2def.h&#40;91&#41; : warning C4005: 'AF_IPX' : macro redefinition C:\sdk\windows\v6.0a\include\winsock.h&#40;460&#41; : see previous definition of 'AF_IPX' C:\sdk\windows\v6.0a\include\ws2def.h&#40;124&#41; : warning C4005: 'AF_MAX' : macro redefinition C:\sdk\windows\v6.0a\include\winsock.h&#40;479&#41; : see [...]]]></description> <content:encoded><![CDATA[<p>I came across a really annoying problem while using win32 sockets one of my bigger projects. In short, the VisualC compiler complained about redefinitions of basic Windows socket macros:</p><div
class="wp_syntax"><div
class="code"><pre class="c" style="font-family:monospace;">C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\ws2def.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">91</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> warning C4005<span style="color: #339933;">:</span> <span style="color: #ff0000;">'AF_IPX'</span> <span style="color: #339933;">:</span> macro redefinition
C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\winsock.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">460</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> see previous definition of <span style="color: #ff0000;">'AF_IPX'</span>
C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\ws2def.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">124</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> warning C4005<span style="color: #339933;">:</span> <span style="color: #ff0000;">'AF_MAX'</span> <span style="color: #339933;">:</span> macro redefinition
C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\winsock.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">479</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> see previous definition of <span style="color: #ff0000;">'AF_MAX'</span>
C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\ws2def.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">163</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> warning C4005<span style="color: #339933;">:</span> <span style="color: #ff0000;">'SO_DONTLINGER'</span> <span style="color: #339933;">:</span> macro redefinition
C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\winsock.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">402</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> see previous definition of <span style="color: #ff0000;">'SO_DONTLINGER'</span>
C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\ws2def.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">206</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> error C2011<span style="color: #339933;">:</span> <span style="color: #ff0000;">'sockaddr'</span> <span style="color: #339933;">:</span> <span style="color: #ff0000;">'struct'</span> type redefinition
C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\winsock.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">485</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> see declaration of <span style="color: #ff0000;">'sockaddr'</span>
C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\ws2def.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">384</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> error C2143<span style="color: #339933;">:</span> syntax error <span style="color: #339933;">:</span> missing <span style="color: #ff0000;">'}'</span> before <span style="color: #ff0000;">'constant'</span>
C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\ws2def.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">384</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> error C2143<span style="color: #339933;">:</span> syntax error <span style="color: #339933;">:</span> missing <span style="color: #ff0000;">';'</span> before <span style="color: #ff0000;">'constant'</span>
C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\ws2def.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">384</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> error C2059<span style="color: #339933;">:</span> syntax error <span style="color: #339933;">:</span> <span style="color: #ff0000;">'constant'</span>
C<span style="color: #339933;">:</span>\sdk\windows\v6.0a\include\ws2def.<span style="color: #202020;">h</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">437</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> error C2143<span style="color: #339933;">:</span> syntax error <span style="color: #339933;">:</span> missing <span style="color: #ff0000;">';'</span> before <span style="color: #ff0000;">'}
(...)</span></pre></div></div><p><span
id="more-290"></span><br
/> After some digging in the code I noticed that <em>windows.h</em> had been included before <em>winsock2.h</em>. And that <em>windows.h</em> includes <em>winsock.h</em>. When digging deeper, I found <a
href="http://msdn.microsoft.com/en-us/library/ms738562.aspx">an article in the MSDN</a> describing what had happened here:<br
/> actually, this is a legacy problem. In Windows versions <= Windows 98, WinSock 1.1 had been used. The current win32 socket implementation, Windows Sockets 2 (WinSock 2.0), is backwards compatible to Windows Sockets 1.1. Additionally, the <em>winsock2.h</em> header files prevents the inclusion of the legacy <em>winsock.h</em> header file. But once you include <em>winsock.h</em>, you can not include <em>winsock2.h</em> later on.<br
/> Unfortunately, <em>windows.h</em> still includes <em>winsock.h</em>.<br
/> Fortunately, you can disable the legacy parts of the Windows SDK easily:</p><div
class="wp_syntax"><div
class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#define WIN32_LEAN_AND_MEAN</span></pre></div></div><p>You will not be able to build Windows 95/Windows 98 applications when using this definition. But if you were targeting those OS versions, you wouldn&#8217;t be using Windows Sockets 2 anyway.</p> ]]></content:encoded> <wfw:commentRss>http://www.coliena.com/blog/2010/05/winsock-troubles/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Sending win32 Messages to Windows Applications</title><link>http://www.coliena.com/blog/2010/03/sending-win32-messages-to-windows-applications/</link> <comments>http://www.coliena.com/blog/2010/03/sending-win32-messages-to-windows-applications/#comments</comments> <pubDate>Wed, 03 Mar 2010 18:43:53 +0000</pubDate> <dc:creator>niels</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[win32]]></category><guid
isPermaLink="false">http://coliena.com/blog/?p=253</guid> <description><![CDATA[TortoiseSVN itself is a very cool tool. And it&#8217;s developers have created a nice collection of very helpful utilities as well. So, if you ever need to send a single win32 message to a running application, you might try SendMessage. Small size, works as advertised, free.]]></description> <content:encoded><![CDATA[<p><a
href="http://www.tortoisesvn.net">TortoiseSVN</a> itself is a very cool tool. And it&#8217;s developers have created a nice collection of very helpful utilities as well.<br
/> So, if you ever need to send a single win32 message to a running application, you might try <a
href="http://tools.tortoisesvn.net/SendMessage">SendMessage</a>.<br
/> Small size, works as advertised, free. <img
src='http://www.coliena.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://www.coliena.com/blog/2010/03/sending-win32-messages-to-windows-applications/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: www.coliena.com @ 2012-02-06 00:01:34 by W3 Total Cache -->
