<?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>Tamir Khason - Just code &#187; Windows 7</title>
	<atom:link href="http://khason.net/tag/windows-7/feed/" rel="self" type="application/rss+xml" />
	<link>http://khason.net</link>
	<description>Take care of the sense, and the sounds will take care of themselves.</description>
	<lastBuildDate>Sun, 08 Nov 2009 18:24:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Quick IT tip: How to build bootable USB stick</title>
		<link>http://khason.net/itpro/quick-it-tip-how-to-build-bootable-usb-stick/</link>
		<comments>http://khason.net/itpro/quick-it-tip-how-to-build-bootable-usb-stick/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 11:55:12 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[ITPRO]]></category>
		<category><![CDATA[DEV]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Embedded]]></category>
		<category><![CDATA[Work process]]></category>

		<guid isPermaLink="false">http://khason.net/itpro/quick-it-tip-how-to-build-bootable-usb-stick/</guid>
		<description><![CDATA[Because of my main job and lack of human resources there, I invest less and less in community. Thus I lost my MVP title. Sorry, guys. Also a ton of management tasks in big company prevents me from actual coding. However I am still able to find some time for doing “real” things such as [...]

<p/>]]></description>
			<content:encoded><![CDATA[<p>Because of my main job and <a href="/tag/better-place/" target="_blank">lack of human resources</a> there, I invest less and less in community. Thus I <a href="http://twitter.com/tamir/status/4638500894" target="_blank">lost my MVP title</a>. Sorry, guys. Also a ton of management tasks in big company prevents me from actual coding. However I am still able to find some time for doing “real” things such as <a href="http://connect.microsoft.com/windowsembedded" target="_blank">Windows Embedded Standard 2011</a> image building. Thus today I will explain how to build <a href="http://www.bootdisk.com/pendrive.htm" target="_blank">bootable flash USB disk</a> with a couple of simple commands and without <a href="http://www.askvg.com/a-bootable-usb-utility-to-create-bootable-usb-drive-to-install-windows-vista-server-2008-and-7/" target="_blank">using special utilities</a>. </p>
<p>&#160;<img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="World first USB drive by Trek Technology" border="0" alt="World first USB drive by Trek Technology" src="http://khason.net/images/2009/10/image.png" width="186" height="150" /> </p>
<p>Why to use bootable USB instead of regular <a href="http://en.wikipedia.org/wiki/Polycarbonate" target="_blank">CD or DVD ROM</a>? Well, it is more convenience, takes less storage, faster and fully recycle. So let’s start.</p>
<p>1. Insert USB flash drive <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />     <br />2. Run command prompt shell as Administrator (just in case the keyboard shortcut for “Run as Administrator” is Ctrl+Alt+Shift)     <br />3. Type “<strong>diskpart</strong>” to run Microsoft DiskPart utility. </p>
<blockquote><p>C:\Windows\system32&gt;diskpart </p>
<p>Microsoft DiskPart version 6.1.7600      <br />Copyright (C) 1999-2008 Microsoft Corporation.       <br />On computer: TAMIRK-DEV</p>
</blockquote>
<p>4. List your disks by typing in “<strong>list disk</strong>” or for those who like it shorter (like me) “<strong>list dis</strong>”</p>
<blockquote><p>DISKPART&gt; lis dis </p>
<p>&#160; Disk ###&#160; Status&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Size&#160;&#160;&#160;&#160; Free&#160;&#160;&#160;&#160; Dyn&#160; Gpt      <br />&#160; &#8212;&#8212;&#8211;&#160; &#8212;&#8212;&#8212;&#8212;-&#160; &#8212;&#8212;-&#160; &#8212;&#8212;-&#160; &#8212;&#160; &#8212;       <br />&#160; Disk 0&#160;&#160;&#160; Online&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 149 GB&#160; 1024 KB       <br />&#160; Disk 1&#160;&#160;&#160; Online&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 75 GB&#160;&#160;&#160;&#160; 2 GB       <br />&#160; Disk 2&#160;&#160;&#160; Online&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3814 MB&#160;&#160;&#160;&#160;&#160; 0 B       <br />&#160; Disk 3&#160;&#160;&#160; No Media&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0 B&#160;&#160;&#160;&#160;&#160; 0 B       <br />&#160; Disk 4&#160;&#160;&#160; No Media&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0 B&#160;&#160;&#160;&#160;&#160; 0 B       <br />&#160; Disk 5&#160;&#160;&#160; Online&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 14 GB&#160;&#160;&#160;&#160;&#160; 0 B</p>
</blockquote>
<p>5. Identify your flash drive (in my case it is Disk 5)    <br />6. Select this drive to mark it for work by using “<strong>select disk</strong> 5” or “<strong>sel dis</strong> 5” command</p>
<blockquote><p>DISKPART&gt; sel dis 5</p>
<p>Disk 5 is now the selected disk.</p>
</blockquote>
<p>7. Clean it (this will delete everything on your disk drive, so be careful) by using “<strong>clean</strong>” or “<strong>cle</strong>” command.</p>
<blockquote><p>DISKPART&gt; cle</p>
<p>DiskPart succeeded in cleaning the disk.</p>
</blockquote>
<p>8. Create primary partition &#8211; “<strong>create partition primary</strong>” or “<strong>cre par pri</strong>”</p>
<blockquote><p>DISKPART&gt; cre par pri</p>
<p>DiskPart succeeded in creating the specified partition.</p>
</blockquote>
<p>9. Select new partition &#8211; “<strong>select partition 1</strong>” or “<strong>sel par 1</strong>”</p>
<blockquote><p>DISKPART&gt; sel par 1</p>
<p>Partition 1 is now the selected partition.</p>
</blockquote>
<p>10. Mark it as Active partition &#8211; “<strong>active</strong>” or “<strong>act</strong>”</p>
<blockquote><p>DISKPART&gt; act</p>
<p>DiskPart marked the current partition as active.</p>
</blockquote>
<p>11. Format &#8211; “<strong>format fs=ntfs quick</strong>” or “<strong>for fs=ntfs quick</strong>”</p>
<blockquote><p>DISKPART&gt; for fs=ntfs quick</p>
<p>&#160; 100 percent completed </p>
<p>DiskPart successfully formatted the volume.</p>
</blockquote>
<p>12. And finally my favorite command &#8211; “<strong>assign</strong>” or “<strong>ass</strong>” to mark it ready and create mount point</p>
<blockquote><p>DISKPART&gt; ass</p>
<p>DiskPart successfully assigned the drive letter or mount point.</p>
</blockquote>
<p>13. Exit &#8211; “exit” or “exi” to return to command shell</p>
<blockquote><p>DISKPART&gt; exi</p>
<p>Leaving DiskPart&#8230;</p>
</blockquote>
<p>Now your thumb drive is ready and bootable. So you can start copying files from ISO image into it.</p>
<p>Other option is to work with volumes rather than with disks. The all difference is in steps 4-6. Instead of “<strong>lis dis</strong>” use “<strong>lis vol</strong>” and instead of “<strong>sel dis</strong>” use “<strong>sel vol</strong>”. Maybe it is more convenience way of work because in this case you can identify partitions by labels and sizes rather than by sizes only.</p>
<blockquote><p>DISKPART&gt; lis vol </p>
<p>&#160; Volume ###&#160; Ltr&#160; Label&#160;&#160;&#160;&#160;&#160;&#160;&#160; Fs&#160;&#160;&#160;&#160; Type&#160;&#160;&#160;&#160;&#160;&#160;&#160; Size&#160;&#160;&#160;&#160; Status&#160;&#160;&#160;&#160; Info      <br />&#160; &#8212;&#8212;&#8212;-&#160; &#8212;&#160; &#8212;&#8212;&#8212;&#8211;&#160; &#8212;&#8211;&#160; &#8212;&#8212;&#8212;-&#160; &#8212;&#8212;-&#160; &#8212;&#8212;&#8212;&#160; &#8212;&#8212;&#8211;       <br />&#160; Volume 0&#160;&#160;&#160;&#160; E&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DVD-ROM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0 B&#160; No Media       <br />&#160; Volume 1&#160;&#160;&#160;&#160; G&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DVD-ROM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0 B&#160; No Media       <br />&#160; Volume 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System Rese&#160; NTFS&#160;&#160; Partition&#160;&#160;&#160; 100 MB&#160; Healthy&#160;&#160;&#160; System       <br />&#160; Volume 3&#160;&#160;&#160;&#160; C&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; NTFS&#160;&#160; Partition&#160;&#160;&#160;&#160; 68 GB&#160; Healthy&#160;&#160;&#160; Boot       <br />&#160; Volume 4&#160;&#160;&#160;&#160; D&#160;&#160; DATA&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; NTFS&#160;&#160; Partition&#160;&#160;&#160;&#160; 80 GB&#160; Healthy       <br />&#160; Volume 5&#160;&#160;&#160;&#160; F&#160;&#160; READYBOOST&#160;&#160; FAT&#160;&#160;&#160; Removable&#160;&#160; 3812 MB&#160; Healthy       <br />&#160; Volume 6&#160;&#160;&#160;&#160; H&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Removable&#160;&#160;&#160;&#160;&#160;&#160; 0 B&#160; No Media       <br />&#160; Volume 7&#160;&#160;&#160;&#160; I&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Removable&#160;&#160;&#160;&#160;&#160;&#160; 0 B&#160; No Media       <br />&#160; Volume 8&#160;&#160;&#160;&#160; K&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; NTFS&#160;&#160; Removable&#160;&#160;&#160;&#160; 14 GB&#160; Healthy</p>
</blockquote>
<p>If you already copied your image into disk, you can mark MBR by using special utility called <a href="http://technet.microsoft.com/en-us/library/cc749177(WS.10).aspx" target="_blank">BootSect.exe</a> shipped with WAIK. In our case (with Windows 7 embedded), you’ll have to update master boot code to use BOOTMGR (Vista and up) rather than NTLDR (XP and down)</p>
<blockquote><p>BOOTSECT.EXE /NT60 K: /mbr</p>
</blockquote>
<p>We done, have a good day and be good people. Additional information regarding USB core guys from MS can be archived from <a href="http://blogs.msdn.com/usbcoreblog/" target="_blank">their brand new blog</a> (hope it will be up to date).</p>
<p>At the end, just you to know how are CDs make by Discovery Channel    </p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/O3FQzwNzUE4&amp;hl=en&amp;fs=1&amp;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/O3FQzwNzUE4&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>


<p/>]]></content:encoded>
			<wfw:commentRss>http://khason.net/itpro/quick-it-tip-how-to-build-bootable-usb-stick/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows 7 &#8211; dry run or how things should be done to correct old mistakes</title>
		<link>http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/</link>
		<comments>http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 20:47:23 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[TECH]]></category>
		<category><![CDATA[VIDEO]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/</guid>
		<description><![CDATA[I have not write for a while (if you’re following me on Twitter, you know why). Even so, today it will not be very informative post. This all about my expression about latest builds of Windows 7 and one job proposal. Have a fun.
January 13rd, I expressed rather bad opinion about Windows 7 (beta those [...]


Related posts:<ol><li><a href='http://khason.net/itpro/tfs-licensing-model-demystification-or-what-should-i-buy-for-my-company-in-order-not-to-step-on-the-licensing-mine/' rel='bookmark' title='Permanent Link: TFS licensing model demystification or what should I buy for my company in order not to step on the licensing mine?'>TFS licensing model demystification or what should I buy for my company in order not to step on the licensing mine?</a></li>
<li><a href='http://khason.net/blog/how-to-pass-technical-interview-in-better-place/' rel='bookmark' title='Permanent Link: How to pass technical interview in Better Place'>How to pass technical interview in Better Place</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I have not write for a while (if you’re <a href="http://twitter.com/tamir" target="_blank">following me on Twitter</a>, you know why). Even so, today it will not be very informative post. This all about my expression about latest builds of Windows 7 and one job proposal. Have a fun.</p>
<p><a href="http://khason.net/itpro/windows-7-dry-run-or-why-intel-does-not-like-microsoft/">January 13rd, I expressed rather bad opinion about</a> <a href="http://khason.net/tag/windows-7/">Windows 7</a> (beta those days). Today, after most of post-RC builds (currently with 7260) on work machine I would way with big confidence – <strong>Microsoft learned from beta errors and now it works almost like it should work for RTM</strong>.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="6.1.7260.0.win7_rtm.090612-2110" border="0" alt="6.1.7260.0.win7_rtm.090612-2110" src="http://khason.net/images/2009/06/image.png" width="469" height="409" /> </p>
<h3>Installation</h3>
<p>Installation takes less and less from build to build (this is 7th I’m checking). With 7260 it took about 15 minutes. All hardware devices (including Intel AMT, PM45 and LM5) were found and installed correctly. Shortly after the installation it installed a bunch of security and device driver updates. Looks like Microsoft has no issues with Intel anymore (or they just decided to build drivers by itself).</p>
<p>Hybrid graphic cards still not supported. Also it not seemed that it will be supported toward RTW. However Windows 7 correctly decided to use discrete card, rather then on-board once BIOS settings were set to prioritize it.</p>
<h3>Taskbar</h3>
<p>It still sucks, but you will accustom to it. From the beginning it looks like it takes all valuable space on your desktop, but shortly after you’ll see that it somehow comfortable to use it (it is really depends how you working. Lately I changed a bit a way I’m doing things [this why you cannot see me in Live Messenger anymore], thus it become rather good for me). Here how it looks for me now</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="My taskbar - in battery save mode of couse" border="0" alt="My taskbar - in battery save mode of couse" src="http://khason.net/images/2009/06/image1.png" width="77" height="542" /> </p>
<p>Yes, it is Chome on this bar and this why:</p>
<h3>‘Coz Internet Explorer become worse and worse</h3>
<p>The only good thing I found about IE8 shipped with W7 is it has support for Windows 7 taskbar. However even this fact cannot defense against its suckness. It slow, buggy, has not enough functionality and absolutely annoying. I love Firefox, but it has too much functionality for me those days. Once I used to open it, I loss at least a half of hour <a href="http://khason.net/blog/line-of-business-vs-beautifulness-or-two-dogmas-comparison-as-exemplified-by-two-twitter-applications/">for twittering</a>, reading rss, etc. With Google Chrome is it not an issue, because this is nimble program with only one functionality – browse internet pages.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:329cfe93-ef30-4387-bbea-4b94d7e9cc0a" class="wlWriterEditableSmartContent">
<div><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/o4MwTvtyrUQ&amp;hl=en"></param><embed src="http://www.youtube.com/v/o4MwTvtyrUQ&amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"></embed></object></div>
</div>
<h3>My last BSoD</h3>
<p>Since the last time, I had no BSoDs. Also WDM not eating 999.9 CPU hours anymore (like it did in idle Vista). Also I had no compatibility issues. Everything worked as expected on my machine. The only issue I had is IE, that decided not to die and stuck as running windowless process. You know how it is when any icon on taskbar stops to do anything, just becoming red when you click on it.</p>
<h3>Conclusion</h3>
<p>Do it. Upgrade your OS as soon as possible and have a fun.</p>
<p>&#160;</p>
<h2>We’re hiring! (Israel residents only)</h2>
<h3>Lead Software Development Engineer in Test</h3>
<p>We are looking for strong Software Development Engineer in Test who is passionate about UI and internal API usage to test rich client applications. Responsibilities would include developing test strategies, writing unit tests, UI automation, custom msbuild scripts, performing problem isolation and analysis, communicating with developers in support of debugging and investigation.</p>
<p>My group takes both individuals and teams success seriously, and looking for the right person to join our team, which is development, rather than test team. What my group is doing?</p>
<p>The AutOS group is responsible for delivering of the system you’ll have inside your next electric vehicle, one of the most important applications we have at <a href="http://betterplace.com" target="_blank">Better Place</a> for providing a consistent, transparent and fluent experience for a driver every day. Currently the application is used for energy management, navigation, infotainment, road safety and many other aspects of enhancing your future driving. Come explore the exciting opportunities on AutOS team developing cutting edge tools, facing all customers for all Better Place EVs. Become a member of the outstanding team that strives for engineering excellence in improving the life of all of us. AutOS team is using latest technologies and innovations to make sure delivery of the best possible experience for a driver.</p>
</p>
<h4>Qualification</h4>
<p>Solid programming ability in managed programming using the .NET Framework (C#) with some experience in WPF or Silverlight.   <br />Solid technical knowledge in Information Technology field, including hardware capabilities and performance evaluation and tests.    <br />Strong problem solving and troubleshooting skills.    <br />Knowledge of Team Foundation Server and MSBUILD scripting.    <br />2+ years experience in software testing, including designing and developing automation infrastructure.    <br />Strong test aptitude.    <br />Good communication skills and ability to work closely in a development team environment.    <br />BA/BS or MS degree in Computer Science or equivalent field experience is required.</p>
<p><strong>You think, that you want such job? Send me your CV, couple of word about yourself and why you want and able to work with me at Better Place to </strong><a href="mailto:tamir@khason.biz"><strong>tamir@khason.biz</strong></a><strong> with “Lead SDET application” in subject. </strong><em>(if you do get get an answer from me within a week, your mail is in spam, so you should resent it by using <a href="http://khason.net/tamir/" target="_blank">contact form here</a>)</em></p>
<p>Have a nice day and be good people.</p>


<p>Related posts:<ol><li><a href='http://khason.net/itpro/tfs-licensing-model-demystification-or-what-should-i-buy-for-my-company-in-order-not-to-step-on-the-licensing-mine/' rel='bookmark' title='Permanent Link: TFS licensing model demystification or what should I buy for my company in order not to step on the licensing mine?'>TFS licensing model demystification or what should I buy for my company in order not to step on the licensing mine?</a></li>
<li><a href='http://khason.net/blog/how-to-pass-technical-interview-in-better-place/' rel='bookmark' title='Permanent Link: How to pass technical interview in Better Place'>How to pass technical interview in Better Place</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Windows 7 &#8211; dry run or why Intel does not like Microsoft</title>
		<link>http://khason.net/itpro/windows-7-dry-run-or-why-intel-does-not-like-microsoft/</link>
		<comments>http://khason.net/itpro/windows-7-dry-run-or-why-intel-does-not-like-microsoft/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 18:01:57 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[ITPRO]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Lenovo]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[soft]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Live]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://khason.net/itpro/windows-7-dry-run-or-why-intel-does-not-like-microsoft/</guid>
		<description><![CDATA[Finally, I got a couple of free minutes to install Windows 7 x64 on my work machine. I have to admin, that installation was extremely fast. I just put DVD and keep talking with one of our architects near whiteboard. We enough to close only one issue, while Windows was installed and running.&#160; 
 
There [...]


Related posts:<ol><li><a href='http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/' rel='bookmark' title='Permanent Link: Windows 7 &ndash; dry run or how things should be done to correct old mistakes'>Windows 7 &ndash; dry run or how things should be done to correct old mistakes</a></li>
<li><a href='http://khason.net/itpro/quick-it-tip-how-to-build-bootable-usb-stick/' rel='bookmark' title='Permanent Link: Quick IT tip: How to build bootable USB stick'>Quick IT tip: How to build bootable USB stick</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Finally, I got a couple of free minutes to install Windows 7 x64 on my work machine. I have to admin, that installation was extremely fast. I just put DVD and keep talking with one of our architects near whiteboard. We enough to close only one issue, while Windows was installed and running.&#160; </p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Windows 7 beta fish" border="0" alt="Windows 7 beta fish" src="http://khason.net/images/2009/01/image5.png" width="446" height="330" /> </p>
<p>There are number of visual glitches, but it’s beta after all. Next thing is to install drivers. Everything was great (it even find and install fingerprint reader), except three strange drivers on my Lenovo W500, that Windows 7 refused to find:</p>
<ul>
<li>PCI Serial Port </li>
<li>PCI Simple Communications Controller </li>
<li>SM Bus Controller </li>
</ul>
<p>What can be those drivers? The clue was in SM Bus. It something related to board chipset. So, just checked <a href="http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&amp;lndocid=MIGR-70313" target="_blank">Intel AMT</a>, <a href="http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&amp;lndocid=MIGR-70315" target="_blank">Intel PM45</a> and <a href="http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&amp;lndocid=MIGR-70595" target="_blank">Intel LMS</a>. My approximation was right, Windows 7 (and Microsoft Windows Update service) has no information regarding Intel stuff while all other (more rare drivers were installed fluently). I also need to install three of those drivers in Windows Vista compatibility mode in order to make it works. </p>
<p>Why this happen? Why it’s so hard to two huge conglomerates to work together in order to bring customers better installation experience? It seemed, that Lenovo did huge work with Microsoft to adopt its hardware drivers for Windows 7. Even switchable graphic cards worked perfect without additional drivers. So why Lenovo can, while Intel cannot? </p>
<p>I believe, that the problem is with Intel, who self fighting not to loss high end (and cost) processors, when the market requests low cost Atom-based machines with low power, yet good performing graphic processors. </p>
<p>Regarding biometric devices and switchable graphics. If you want to be able to login to domain with your fingerprint, be sure, that you visited Control Panel\Hardware and Sound\Biometric Devices\Change settings and check this option. By default it’s off.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Login to domain with fingerprint on Windows 7" border="0" alt="Login to domain with fingerprint on Windows 7" src="http://khason.net/images/2009/01/image15.png" width="501" height="322" /> </p>
<p>Also it not seemed, that Windows 7 supports hybrid graphic cards. So unless I’ll find a way to get rid of this issue, I have to use Lenovo switchable graphics utility…</p>
<p>Next thing was to install gentlemen&#8217;s assembly:</p>
<ul>
<li><font size="3">Windows Live Essentials</font> </li>
<li>Microsoft Office 2007 + SPs </li>
<li>Total Commander </li>
<li>Skype </li>
<li>Virtual PC 2008 SP1 </li>
<li>Visual Studio 2008 + SP1 </li>
</ul>
<p>All installations were fine, except small problem with business edition of Skype. Newly introduced Action Center advised me to install 4.0 beta version of Skype to prevent compatibility issues.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Windows 7 Action Center" border="0" alt="Windows 7 Action Center" src="http://khason.net/images/2009/01/image6.png" width="798" height="295" /> </p>
<p>Another problem (not really Windows, but Microsoft related) is a time, that takes to install Visual Studio. For some reason installation of Office (which is not smaller, then VS) takes about 5 minutes on my machine, when for Visual Studio it takes more, then 40 minutes to be installed.Devdiv guys, please do something with this installer.</p>
<p>So two restarts and here we go. Windows 7 with all necessary software installed. Now issues started.</p>
<p>The only disappointment was because of Windows Experience Index (140GB 7200RPM hard disk is not big and fast enough for this version of OS). If this not, what is?</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://khason.net/images/2009/01/image7.png" width="655" height="195" /> </p>
<p>But it can be fixed easily by disabling cache on disk Device Manager –&gt; Disk Drives –&gt; Uncheck “Disk write caching policy”.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://khason.net/images/2009/01/image13.png" width="493" height="312" /> </p>
<p>After doing this your system will run much faster and score will be increased.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://khason.net/images/2009/01/image14.png" width="624" height="177" /> </p>
<p>I cannot understand the reason it checked by default for non solid state drives, which unsuitable for fast caching.</p>
<p>Switchable graphic cards are also seemed, to be an issue for Windows 7. It does not supported by now to switch graphic cards. All you can do is to pitch BIOS for denying OS from display driver detection and set the card you want. Here how my machine scores looks like with second graphic card enabled.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://khason.net/images/2009/01/image16.png" width="605" height="178" /> </p>
<h3>Taskbar is for fun, not for work</h3>
<p>First of all new branded taskbar. How I supposed to distinct what running and what don’t? Shinny borders and backgrounds? Cool, but not really helpful for me. Just for test try to set “Hide when minimized” option for Outlook 2007 and then detect whether it running or not. Ah, yes, I have to go via tinny arrow to configure taskbar icons – too bad. </p>
<p>Another issue with this bar is configuration of shortcuts. Just in case, sometimes I want to run programs minimized or maximized or set start keys (right click on shortcut and Properties). How should I do it for pinned items?</p>
<p>&#160;<img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://khason.net/images/2009/01/image8.png" width="336" height="481" /> </p>
<p>I understand, that for 5 years Microsoft tried somehow to prevent from developers to junk users notification area on taskbar, by hiding, swapping and moving things there. Finally, they managed to solve it by putting all trash into big shiny icons? Just take a look on Microsoft Messenger appearance in tasksbar. You <a href="http://blogs.msdn.com/tims/archive/2009/01/12/the-bumper-list-of-windows-7-secrets.aspx" target="_blank">have to run it in Vista compatibility mode</a> in order to prevent it putting icon in this area? Too bad! This not called “feature complete” for sure.</p>
<h3>Software compatibility</h3>
<p>Yes, not everything perfect. For example drag and drop (DragonDrop) for Virtual PC will not work in regular mode in Windows 7. You have to create shared folder to workaround it. All programs, required elevated permission (those which triggered UAC on Vista all the time) will ask you for run only once, but if you accidently pressed anything else, then Allow, you’ll never be able to run it again (unless resetting UAC credentials in Windows). Also all those great programs, not required installations or any registry changes (for example Notepad++ or WinSCP will always treated as suspicious by Windows Defender, thus will start very slow all the time and some times required to be sent “for inspection”. This is general fail of Defender. Why me (as user) should wait you (as service provider) to check something. Do it on background, if you want to…</p>
<h3>My first BSoD</h3>
<p>Yes, I did it. I never was able to get Blue Screen of Death on Windows Vista. Here it happened after another restart. The reason was very funny: I did not closed Outlook before restarted Windows 7 (this fade screen with your applications will be forcibly closed). Yes, it was not really major BSoD. Windows made memory dump to prevent future crashes and send information. BTW, if you want to be able to report problems, you should use keys from Connect website, rather, then from MSDN. Beta reporting services is sensitive to product key.</p>
<h3>Background services or what is really missing</h3>
<p>My overall experience of Windows 7 is 7 of 10. It is major improvement of Windows Vista, but it still far from being perfect. I would advice to add OS foreground task dispatching. There are too many developers (also Microsoft’s, who trying to perform long tasks in UI thread). I think, that operation system should handle such cases and dispatch jobs to background to prevent UI freeze. </p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://khason.net/images/2009/01/image9.png" width="409" height="173" /> </p>
<p>Another thing, is to find good compromise between annoying user and smart operations. Other words, do not try to assume what customer want to do, let him to decide (or at least enable such option). Good example for this is very odd Clear Type wizard. What would you answer to such question?</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Click whatever it looks the same, just fix it!" border="0" alt="Click whatever it looks the same, just fix it!" src="http://khason.net/images/2009/01/image10.png" width="624" height="411" /> </p>
<p>Why I need to see the same stuff three times, when all I want it file manager?</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="You have a lot of documents, misics, pictures and videos" border="0" alt="You have a lot of documents, misics, pictures and videos" src="http://khason.net/images/2009/01/image11.png" width="301" height="442" /> </p>
<p>Stop trying to replace software. You already screwed with Microsoft Valet.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://khason.net/images/2009/01/image12.png" width="621" height="522" /> </p>
<p>ISO file burn directly from Windows is really great feature, but an ability to mount iso images as virtual disks would be much better.</p>
<p>Other words, if you, Microsoft, want to create great operation system – do operation system, do not try to complete OS issues with another nice to have features. But no words – great work. Thank you.</p>
<p>Ah, and do not forget to fire everybody in IE dev team… It awful and has no future.</p>
<p>Next time we’ll speak about developer point of view to Windows 7.</p>


<p>Related posts:<ol><li><a href='http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/' rel='bookmark' title='Permanent Link: Windows 7 &ndash; dry run or how things should be done to correct old mistakes'>Windows 7 &ndash; dry run or how things should be done to correct old mistakes</a></li>
<li><a href='http://khason.net/itpro/quick-it-tip-how-to-build-bootable-usb-stick/' rel='bookmark' title='Permanent Link: Quick IT tip: How to build bootable USB stick'>Quick IT tip: How to build bootable USB stick</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/itpro/windows-7-dry-run-or-why-intel-does-not-like-microsoft/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Windows 7 beta is available for download</title>
		<link>http://khason.net/itpro/windows-7-beta-is-available-for-download/</link>
		<comments>http://khason.net/itpro/windows-7-beta-is-available-for-download/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 07:27:48 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[ITPRO]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[soft]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://khason.net/itpro/windows-7-beta-is-available-for-download/</guid>
		<description><![CDATA[Shortly after latest beta version of Windows 7 (build 7000) leaked, Microsoft released this build officially via MSDN. Currently this build is only available for MSDN subscribers (including product key), thus I believe, that it will be available for public download really soon.
Also, if you’re planning to install this build on your working machine, be [...]


Related posts:<ol><li><a href='http://khason.net/tech/some-new-in-mix-downloads/' rel='bookmark' title='Permanent Link: Some new in-mix downloads'>Some new in-mix downloads</a></li>
<li><a href='http://khason.net/itpro/tfs-licensing-model-demystification-or-what-should-i-buy-for-my-company-in-order-not-to-step-on-the-licensing-mine/' rel='bookmark' title='Permanent Link: TFS licensing model demystification or what should I buy for my company in order not to step on the licensing mine?'>TFS licensing model demystification or what should I buy for my company in order not to step on the licensing mine?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Shortly after latest beta version of <a target="_blank" href="http://arstechnica.com/journals/microsoft.ars/2008/12/29/the-windows-7-build-7000-leak-and-microsofts-reaction">Windows 7 (build 7000) leaked</a>, Microsoft released this build officially via MSDN. Currently this build is only <a target="_blank" href="https://msdn.microsoft.com/en-us/subscriptions/securedownloads/default.aspx">available for MSDN subscribers</a> (including product key), thus I believe, that it will be available for public download really soon.</p>
<p>Also, if you’re planning to install this build on your working machine, be sure, to install KB961367 in order to prevent <a target="_blank" href="http://windows7news.com/2009/01/02/windows-7-beta-damages-some-mp3/">corruption of MP3 files</a>.</p>
<p>&#160;<img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://khason.net/images/2009/01/image2.png" width="692" height="155" /> </p>
<p>In addition to Windows 7, there are few other downloads are available: new beta of Windows Sever 2008 R2, new version of WDK for Windows 7 (7.0.7000.1), updated WDK for Windows Vista (6001.18002) + WDK for SP2.</p>
<p>So charge your downloaders and notify IT managers about extremely high traffic expected <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://khason.net/tech/some-new-in-mix-downloads/' rel='bookmark' title='Permanent Link: Some new in-mix downloads'>Some new in-mix downloads</a></li>
<li><a href='http://khason.net/itpro/tfs-licensing-model-demystification-or-what-should-i-buy-for-my-company-in-order-not-to-step-on-the-licensing-mine/' rel='bookmark' title='Permanent Link: TFS licensing model demystification or what should I buy for my company in order not to step on the licensing mine?'>TFS licensing model demystification or what should I buy for my company in order not to step on the licensing mine?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/itpro/windows-7-beta-is-available-for-download/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Read and use FM radio (or any other USB HID device) from C#</title>
		<link>http://khason.net/blog/read-and-use-fm-radio-or-any-other-usb-hid-device-from-c/</link>
		<comments>http://khason.net/blog/read-and-use-fm-radio-or-any-other-usb-hid-device-from-c/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 20:42:18 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DEV]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Interop]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Work process]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[WPF crossbow]]></category>

		<guid isPermaLink="false">http://khason.net/blog/read-and-use-fm-radio-or-any-other-usb-hid-device-from-c/</guid>
		<description><![CDATA[Last time we spoke about reading and decoding RDS information from FM receivers. Also we already know how to stream sound from DirectSound compatible devices. However, before we can do it, we should be able to “speak” with such devices. So, today we’ll spoke about detection and reading information from Radio USB adapters (actually from [...]


Related posts:<ol><li><a href='http://khason.net/itpro/quick-it-tip-how-to-build-bootable-usb-stick/' rel='bookmark' title='Permanent Link: Quick IT tip: How to build bootable USB stick'>Quick IT tip: How to build bootable USB stick</a></li>
<li><a href='http://khason.net/dev/inotifypropertychanged-auto-wiring-or-how-to-get-rid-of-redundant-code/' rel='bookmark' title='Permanent Link: INotifyPropertyChanged auto wiring or how to get rid of redundant code'>INotifyPropertyChanged auto wiring or how to get rid of redundant code</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Last time <a href="http://khason.net/blog/reading-and-decoding-rds-radio-data-system-in-c/">we spoke about reading and decoding RDS information from FM receivers</a>. Also <a href="http://khason.net/blog/capturing-and-streaming-sound-by-using-directsound-with-c/">we already know how to stream sound from DirectSound compatible devices</a>. However, before we can do it, we should be able to “speak” with such devices. So, today we’ll spoke about detection and reading information from Radio USB adapters (actually from any Human Input Devices). Let’s start.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="USB FM HID" border="0" alt="USB FM HID" src="http://khason.net/images/2008/12/image-460dcf0b.png" width="240" height="211" /> </p>
<p>First, if you want to do it, go and buy such device. The are not a lot of alternatives, but if you’ll seek, you’ll find it very quickly.</p>
<p>So, let’s start. First of all, we’ll use platform invoke to get and set the information. Also, we have to preserve handle of the device from being collected by GC. After we’ll finish using the device, we’ll have to dispose it. Thus it makes sense to inherit from SafeHandle and IDisposable.</p>
<blockquote><p>[SecurityPermission(SecurityAction.InheritanceDemand, UnmanagedCode = true)]     <br />[SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]      <br />public class USBDevice : SafeHandleZeroOrMinusOneIsInvalid, IDisposable {</p>
</blockquote>
<p>Next, we’ll set a number of arguments, that will be in use during the device lifetime.</p>
<blockquote><p>public uint ProductID { get; private set; }     <br />public uint VendorID { get; private set; }      <br />public uint VersionNumber { get; private set; }      <br />public string Name { get; private set; }      <br />public string SerialNumber { get; private set; }      <br />public override bool IsInvalid { get { return !isValid; } } </p>
<p>internal ushort FeatureReportLength { get; private set; }     <br />internal ushort[] Registers { get; set; }</p>
</blockquote>
<p>Now, we have to find it. The best way of detection human input devices is by product and vendor IDs. Those values are always unique for certain device type.</p>
<blockquote><p>[SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]     <br />internal USBDevice(uint pid, uint vid) : base(true) { findDevice(pid, vid); }</p>
</blockquote>
<p>Next step is to find a device. To do this, we have to provide extern interfaces to methods of hid.dll and setupapi.dll. Here all methods we will use in our class</p>
<blockquote><p>[SuppressUnmanagedCodeSecurity()]     <br />internal static class Native {      <br />&#160;&#160; #region methods      <br />&#160;&#160; [DllImport(&quot;hid.dll&quot;, SetLastError = true)]      <br />&#160;&#160; internal static extern void HidD_GetHidGuid(      <br />&#160;&#160;&#160;&#160;&#160; ref Guid lpHidGuid); </p>
<p>&#160;&#160; [DllImport(&quot;hid.dll&quot;, SetLastError = true)]     <br />&#160;&#160; internal static extern bool HidD_GetAttributes(      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hDevice,      <br />&#160;&#160;&#160;&#160;&#160; out HIDD_ATTRIBUTES Attributes); </p>
<p>&#160;&#160; [DllImport(&quot;hid.dll&quot;, SetLastError = true)]     <br />&#160;&#160; internal static extern bool HidD_GetPreparsedData(      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hDevice,      <br />&#160;&#160;&#160;&#160;&#160; out IntPtr hData); </p>
<p>&#160;&#160; [DllImport(&quot;hid.dll&quot;, SetLastError = true)]     <br />&#160;&#160; internal static extern bool HidD_FreePreparsedData(      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hData); </p>
<p>&#160;&#160; [DllImport(&quot;hid.dll&quot;, SetLastError = true)]     <br />&#160;&#160; internal static extern bool HidP_GetCaps(      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hData,      <br />&#160;&#160;&#160;&#160;&#160; out HIDP_CAPS capabilities); </p>
<p>&#160;&#160; [DllImport(&quot;hid.dll&quot;, SetLastError = true, CallingConvention = CallingConvention.StdCall)]     <br />&#160;&#160; internal static extern bool HidD_GetFeature(      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hDevice,      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hReportBuffer,      <br />&#160;&#160;&#160;&#160;&#160; uint ReportBufferLength); </p>
<p>&#160;&#160; [DllImport(&quot;hid.dll&quot;, SetLastError = true, CallingConvention = CallingConvention.StdCall)]     <br />&#160;&#160; internal static extern bool HidD_SetFeature(      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hDevice,      <br />&#160;&#160;&#160;&#160;&#160; IntPtr ReportBuffer,      <br />&#160;&#160;&#160;&#160;&#160; uint ReportBufferLength); </p>
<p>&#160;&#160; [DllImport(&quot;hid.dll&quot;, SetLastError = true, CallingConvention = CallingConvention.StdCall)]     <br />&#160;&#160; internal static extern bool HidD_GetProductString(      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hDevice,       <br />&#160;&#160;&#160;&#160;&#160; IntPtr Buffer,       <br />&#160;&#160;&#160;&#160;&#160; uint BufferLength); </p>
<p>&#160;&#160; [DllImport(&quot;hid.dll&quot;, SetLastError = true, CallingConvention = CallingConvention.StdCall)]     <br />&#160;&#160; internal static extern bool HidD_GetSerialNumberString(      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hDevice,      <br />&#160;&#160;&#160;&#160;&#160; IntPtr Buffer,      <br />&#160;&#160;&#160;&#160;&#160; uint BufferLength); </p>
<p>&#160;&#160; [DllImport(&quot;setupapi.dll&quot;, SetLastError = true)]     <br />&#160;&#160; internal static extern IntPtr SetupDiGetClassDevs(      <br />&#160;&#160;&#160;&#160;&#160; ref Guid ClassGuid,      <br />&#160;&#160;&#160;&#160;&#160; [MarshalAs(UnmanagedType.LPTStr)] string Enumerator,      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hwndParent,      <br />&#160;&#160;&#160;&#160;&#160; UInt32 Flags); </p>
<p>&#160;&#160; [DllImport(&quot;setupapi.dll&quot;, SetLastError = true)]     <br />&#160;&#160; internal static extern bool SetupDiEnumDeviceInterfaces(      <br />&#160;&#160;&#160;&#160;&#160; IntPtr DeviceInfoSet,      <br />&#160;&#160;&#160;&#160;&#160; int DeviceInfoData,      <br />&#160;&#160;&#160;&#160;&#160; ref&#160; Guid lpHidGuid,      <br />&#160;&#160;&#160;&#160;&#160; uint MemberIndex,      <br />&#160;&#160;&#160;&#160;&#160; ref&#160; SP_DEVICE_INTERFACE_DATA lpDeviceInterfaceData); </p>
<p>&#160;&#160; [DllImport(&quot;setupapi.dll&quot;, SetLastError = true)]     <br />&#160;&#160; internal static extern bool SetupDiGetDeviceInterfaceDetail(      <br />&#160;&#160;&#160;&#160;&#160; IntPtr DeviceInfoSet,      <br />&#160;&#160;&#160;&#160;&#160; ref SP_DEVICE_INTERFACE_DATA lpDeviceInterfaceData,      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hDeviceInterfaceDetailData,      <br />&#160;&#160;&#160;&#160;&#160; uint detailSize,      <br />&#160;&#160;&#160;&#160;&#160; out uint requiredSize,      <br />&#160;&#160;&#160;&#160;&#160; IntPtr hDeviceInfoData); </p>
<p>&#160;&#160; [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]     <br />&#160;&#160; [DllImport(&quot;kernel32.dll&quot;, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)]      <br />&#160;&#160; internal static extern IntPtr CreateFile(      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; string lpFileName,      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; uint dwDesiredAccess,      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; uint dwShareMode,      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IntPtr SecurityAttributes,      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; uint dwCreationDisposition,      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; uint dwFlagsAndAttributes,      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IntPtr hTemplateFile); </p>
<p>&#160;&#160; [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]     <br />&#160;&#160; [DllImport(&quot;kernel32.dll&quot;, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)]      <br />&#160;&#160; internal static extern bool CloseHandle(IntPtr hHandle);</p>
</blockquote>
<p>Also, we will need a number of structures, such as device attributes and capabilities.</p>
<blockquote><p>[StructLayout(LayoutKind.Sequential)]     <br />internal struct SP_DEVICE_INTERFACE_DATA {      <br />&#160;&#160; public int cbSize;      <br />&#160;&#160; public Guid InterfaceClassGuid;      <br />&#160;&#160; public int Flags;      <br />&#160;&#160; public int Reserved;      <br />} </p>
<p>[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]     <br />internal class PSP_DEVICE_INTERFACE_DETAIL_DATA {      <br />&#160;&#160; public int cbSize;      <br />&#160;&#160; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]      <br />&#160;&#160; public string DevicePath;      <br />} </p>
<p>[StructLayout(LayoutKind.Sequential)]     <br />internal struct HIDD_ATTRIBUTES {      <br />&#160;&#160; public int Size; // = sizeof (struct _HIDD_ATTRIBUTES) = 10      <br />&#160;&#160; public UInt16 VendorID;      <br />&#160;&#160; public UInt16 ProductID;      <br />&#160;&#160; public UInt16 VersionNumber;      <br />}      <br />[StructLayout(LayoutKind.Sequential)]      <br />internal struct HIDP_CAPS {      <br />&#160;&#160; public UInt16 Usage;      <br />&#160;&#160; public UInt16 UsagePage;      <br />&#160;&#160; public UInt16 InputReportByteLength;      <br />&#160;&#160; public UInt16 OutputReportByteLength;      <br />&#160;&#160; public UInt16 FeatureReportByteLength;      <br />&#160;&#160; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)]      <br />&#160;&#160; public UInt16[] Reserved;      <br />&#160;&#160; public UInt16 NumberLinkCollectionNodes;      <br />&#160;&#160; public UInt16 NumberInputButtonCaps;      <br />&#160;&#160; public UInt16 NumberInputValueCaps;      <br />&#160;&#160; public UInt16 NumberInputDataIndices;      <br />&#160;&#160; public UInt16 NumberOutputButtonCaps;      <br />&#160;&#160; public UInt16 NumberOutputValueCaps;      <br />&#160;&#160; public UInt16 NumberOutputDataIndices;      <br />&#160;&#160; public UInt16 NumberFeatureButtonCaps;      <br />&#160;&#160; public UInt16 NumberFeatureValueCaps;      <br />&#160;&#160; public UInt16 NumberFeatureDataIndices;      <br />}</p>
</blockquote>
<p>And a number of system constants</p>
<blockquote><p>internal const uint DIGCF_PRESENT = 0&#215;00000002;     <br />internal const uint DIGCF_DEVICEINTERFACE = 0&#215;00000010;      <br />internal const uint GENERIC_READ = 0&#215;80000000;      <br />internal const uint GENERIC_WRITE = 0&#215;40000000;      <br />internal const uint FILE_SHARE_READ = 0&#215;00000001;      <br />internal const uint FILE_SHARE_WRITE = 0&#215;00000002;      <br />internal const int OPEN_EXISTING = 3;      <br />internal const int FILE_FLAG_OVERLAPPED = 0&#215;40000000;      <br />internal const uint MAX_USB_DEVICES = 16;</p>
</blockquote>
<p>Now, we are ready to start. So let’s find all devices and get its information</p>
<blockquote><p>Native.HidD_GetHidGuid(ref _hidGuid);     <br />hHidDeviceInfo = Native.SetupDiGetClassDevs(ref _hidGuid, null, IntPtr.Zero, Native.DIGCF_PRESENT | Native.DIGCF_DEVICEINTERFACE);</p>
</blockquote>
<p>Now, if a handle we get is valid, we should search our specific device. For this purpose, we have to read device interface information and then get details info about this device.</p>
<blockquote><p>if (hHidDeviceInfo.ToInt32() &gt; -1) {     <br />&#160;&#160; uint i = 0;      <br />&#160;&#160; while (!isValid &amp;&amp; i &lt; Native.MAX_USB_DEVICES) {      <br />&#160;&#160;&#160;&#160;&#160; var hidDeviceInterfaceData = new Native.SP_DEVICE_INTERFACE_DATA();      <br />&#160;&#160;&#160;&#160;&#160; hidDeviceInterfaceData.cbSize = Marshal.SizeOf(hidDeviceInterfaceData);      <br />&#160;&#160;&#160;&#160;&#160; if (Native.SetupDiEnumDeviceInterfaces(hHidDeviceInfo, 0, ref _hidGuid, i, ref hidDeviceInterfaceData)) {</p>
</blockquote>
<p>Once we have all this and information is valid, let’s detect its capabilities</p>
<blockquote><p>bool detailResult;     <br />uint length, required;      <br />Native.SetupDiGetDeviceInterfaceDetail(hHidDeviceInfo, ref hidDeviceInterfaceData, IntPtr.Zero, 0, out length, IntPtr.Zero);      <br />var hidDeviceInterfaceDetailData = new Native.PSP_DEVICE_INTERFACE_DETAIL_DATA();      <br />hidDeviceInterfaceDetailData.cbSize = 5; //DWORD cbSize (size 4) + Char[0] (size 1) for 32bit only!      <br />var hDeviceInterfaceDetailData = Marshal.AllocHGlobal(Marshal.SizeOf(hidDeviceInterfaceDetailData));      <br />Marshal.StructureToPtr(hidDeviceInterfaceDetailData, hDeviceInterfaceDetailData, true);      <br />detailResult = Native.SetupDiGetDeviceInterfaceDetail(hHidDeviceInfo, ref hidDeviceInterfaceData, hDeviceInterfaceDetailData, length, out required, IntPtr.Zero);      <br />Marshal.PtrToStructure(hDeviceInterfaceDetailData, hidDeviceInterfaceDetailData);      <br />if (detailResult) {</p>
</blockquote>
<p>To do this, we have to create memory file first and then share device attributes by using this file.</p>
<blockquote><p>base.handle = Native.CreateFile(hidDeviceInterfaceDetailData.DevicePath,      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Native.GENERIC_READ |      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Native.GENERIC_WRITE,      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Native.FILE_SHARE_READ |      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Native.FILE_SHARE_WRITE,       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IntPtr.Zero,      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Native.OPEN_EXISTING,      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Native.FILE_FLAG_OVERLAPPED,       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IntPtr.Zero);      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (base.handle.ToInt32() &gt; -1) {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Native.HIDD_ATTRIBUTES hidDeviceAttributes;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (Native.HidD_GetAttributes(base.handle, out hidDeviceAttributes)) {</p>
</blockquote>
<p>All the rest is straight forward. Just compare info retrieved with one we already have. And, of cause, release all resources were used (remember, we’re in win32 api world!)</p>
<blockquote><p>if ((hidDeviceAttributes.VendorID == vid) &amp;&amp; (hidDeviceAttributes.ProductID == pid)) {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; isValid = true;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ProductID = pid;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; VendorID = vid;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; VersionNumber = hidDeviceAttributes.VersionNumber;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IntPtr buffer = Marshal.AllocHGlobal(126);//max alloc for string;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (Native.HidD_GetProductString(this.handle, buffer, 126)) Name = Marshal.PtrToStringAuto(buffer);      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (Native.HidD_GetSerialNumberString(this.handle, buffer, 126)) SerialNumber = Marshal.PtrToStringAuto(buffer);      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Marshal.FreeHGlobal(buffer);      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var capabilities = new Native.HIDP_CAPS();      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IntPtr hPreparsedData;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (Native.HidD_GetPreparsedData(this.handle, out hPreparsedData)) {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (Native.HidP_GetCaps(hPreparsedData, out capabilities)) FeatureReportLength = capabilities.FeatureReportByteLength;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Native.HidD_FreePreparsedData(hPreparsedData);      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } else {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Native.CloseHandle(base.handle);      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Marshal.FreeHGlobal(hDeviceInterfaceDetailData);      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; i++; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
</blockquote>
<p>Now we have a handle to our device and can manipulate it. Like this:</p>
<blockquote><p>using (var device = USBRadioDevice.FindDevice(0&#215;0000, 0&#215;1111)) {     <br />…      <br />}</p>
</blockquote>
<p>But we still have to provide methods for such usage. Here there are no very complicated code.</p>
<blockquote><p>public static USBDevice FindDevice(uint pid, uint vid) {     <br />&#160;&#160; var device = new USBDevice(pid,vid);      <br />&#160;&#160; var fillRegisters = device.InitRegisters();      <br />&#160;&#160; if (!device.IsInvalid &amp;&amp; fillRegisters) return device;      <br />&#160;&#160; else throw new ArgumentOutOfRangeException(string.Format(&quot;Human input device {0} was not found.&quot;, pid));      <br />} </p>
<p>public override string ToString() {     <br />&#160;&#160; return string.Format(&quot;{0} (Product:{1:x}, Vendor:{2:x}, Version:{3:x}, S/N:{4})&quot;, Name, ProductID, VendorID, VersionNumber, SerialNumber);      <br />} </p>
<p>[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]     <br />protected override bool ReleaseHandle() {      <br />&#160;&#160; return Native.CloseHandle(base.handle);      <br />} </p>
<p>#region IDisposable Members     <br />public void Dispose() {      <br />&#160;&#160; Dispose(true);      <br />&#160;&#160; GC.SuppressFinalize(this); </p>
<p>}     <br />[SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]      <br />void IDisposable.Dispose() {      <br />&#160;&#160; if (base.handle != null &amp;&amp; !base.IsInvalid) {      <br />&#160;&#160;&#160;&#160;&#160; // Free the handle      <br />&#160;&#160;&#160;&#160;&#160; base.Dispose();      <br />&#160;&#160; }      <br />} </p>
<p>#endregion</p>
</blockquote>
<p>We done. Have a nice day and be good people.</p>


<p>Related posts:<ol><li><a href='http://khason.net/itpro/quick-it-tip-how-to-build-bootable-usb-stick/' rel='bookmark' title='Permanent Link: Quick IT tip: How to build bootable USB stick'>Quick IT tip: How to build bootable USB stick</a></li>
<li><a href='http://khason.net/dev/inotifypropertychanged-auto-wiring-or-how-to-get-rid-of-redundant-code/' rel='bookmark' title='Permanent Link: INotifyPropertyChanged auto wiring or how to get rid of redundant code'>INotifyPropertyChanged auto wiring or how to get rid of redundant code</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/read-and-use-fm-radio-or-any-other-usb-hid-device-from-c/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>What boots faster – Netbook, powered Windows XP or Nokia E71 mobile phone?</title>
		<link>http://khason.net/blog/what-boots-faster-%e2%80%93-netbook-powered-windows-xp-or-nokia-e71-mobile-phone/</link>
		<comments>http://khason.net/blog/what-boots-faster-%e2%80%93-netbook-powered-windows-xp-or-nokia-e71-mobile-phone/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 14:08:42 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[ITPRO]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[VIDEO]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://khason.net/blog/what-boots-faster-%e2%80%93-netbook-powered-windows-xp-or-nokia-e71-mobile-phone/</guid>
		<description><![CDATA[Some days ago, somebody from Microsoft was shocked, when I told him, that I’m planning to run Windows XP (and later Windows 7) as operation system for mission critical automotive device. He even checked with Windows XP embedded team boot times for XP. They told him, that the minimum can be achieved is about 40 [...]


Related posts:<ol><li><a href='http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/' rel='bookmark' title='Permanent Link: Windows 7 &ndash; dry run or how things should be done to correct old mistakes'>Windows 7 &ndash; dry run or how things should be done to correct old mistakes</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Some days ago, somebody from Microsoft was shocked, when I told him, that I’m planning to run Windows XP (and later Windows 7) as operation system for mission critical automotive device. He even checked with Windows XP embedded team boot times for XP. They told him, that the minimum can be achieved is about 40 seconds cold boot and 30 seconds from hibernate state. I was upset and decided to tweak my system for smallest possible boot time. Here the result video. This is not the limit. I believe, that I’ll be able to decrease Windows XP boot time to less, then 10 seconds with a bit more efforts.</p>
<p><strong>Note: </strong>This is absolutely authentic and non-touched video, recorded today by me, comparing boot time of Windows XP on unbranded weak netbook (Atom 1.6, 128MB and 8G SSD) and my Nokia E71 mobile phone. 15 seconds boot time of Windows XP achieved by tweaking only well known registry values and OS configuration values without special profundity of system settings. </p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/FjFy_EwmVlg&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/FjFy_EwmVlg&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Now the question: with todays’ devices, why we are not running XP for mobile and automotive mission critical devices?</p>


<p>Related posts:<ol><li><a href='http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/' rel='bookmark' title='Permanent Link: Windows 7 &ndash; dry run or how things should be done to correct old mistakes'>Windows 7 &ndash; dry run or how things should be done to correct old mistakes</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/what-boots-faster-%e2%80%93-netbook-powered-windows-xp-or-nokia-e71-mobile-phone/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Programming for Windows 7</title>
		<link>http://khason.net/blog/programming-for-windows-7/</link>
		<comments>http://khason.net/blog/programming-for-windows-7/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 12:12:38 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[demos]]></category>
		<category><![CDATA[DirectX]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[TECH]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Vista Battery Saver]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XPS]]></category>

		<guid isPermaLink="false">http://khason.net/blog/programming-for-windows-7/</guid>
		<description><![CDATA[Well, Windows 7 is going to be released by the end of next year. This is great news, because it seemed, that Microsoft finally understand how to get the best of Windows Vista and make it to work not only on monster machines. 
 
It even works on new brandy my wife&#8217;s pinky machine. And [...]


Related posts:<ol><li><a href='http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/' rel='bookmark' title='Permanent Link: Windows 7 &ndash; dry run or how things should be done to correct old mistakes'>Windows 7 &ndash; dry run or how things should be done to correct old mistakes</a></li>
<li><a href='http://khason.net/blog/book-review-c-2008-and-2005-threaded-programming/' rel='bookmark' title='Permanent Link: Book review: C# 2008 and 2005 Threaded Programming'>Book review: C# 2008 and 2005 Threaded Programming</a></li>
<li><a href='http://khason.net/tech/some-new-in-mix-downloads/' rel='bookmark' title='Permanent Link: Some new in-mix downloads'>Some new in-mix downloads</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Well, Windows 7 is going to be released by the end of next year. This is great news, because it seemed, that Microsoft finally understand how to get the best of Windows Vista and make it to work not only on <a href="http://www.top500.org/">monster machines</a>. </p>
<p><img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" alt="image" src="http://khason.net/images/2008/12/image-3.png" width="600" height="397"/> </p>
<p>It even works on new brandy my wife&#8217;s pinky machine. And if it works there and my wife is happy with it, this OS going to be very impressive.</p>
<p><img border="0" alt="image" src="http://khason.net/images/2008/12/image-58bf6973-bdc1-44d9-8649-f24e6255e65f.png" width="529" height="397"/> </p>
<p>But from the other hand, we, as developers should be ready today to developer Windows 7 ready application (by the way, <a target="_blank" href="http://blogs.microsoft.co.il/blogs/tamir/archive/tags/Vista+Battery+Saver/default.aspx">Vista Battery Saver</a> works for Windows 7 as well as for Windows Vista, in spite of the fact, that power management in Windows 7 was improved dramatically). So let&#8217;s start!</p>
<p>First thing we need is to read big <a target="_blank" href="http://code.msdn.microsoft.com/Win7DeveloperGuide/Release/ProjectReleases.aspx">Windows 7 Developer Guide</a>. This document will explain most of new features for developers to build applications right. What is includes?</p>
<h3>Windows Driver Kit (WDK) 3.0</h3>
<p>Basically, Windows 7 works with Vista drivers, however, hibernation, power management, networking, PREfast will work much better. You also will have new WMI access for reliability monitors and ACPI. </p>
<h3>Management and deployment</h3>
<p>By default Windows 7 uses PowerShell 2.0 and Windows Installer. For PowerShell it includes enhanced cmdlets to manage Active Directory, IIS, etc. For Windows Installer, you finally can build &#8220;chainers&#8221; by yourself (the same approach, used for latest deployment of Microsoft products such as <a target="_blank" href="http://blogs.microsoft.co.il/blogs/tamir/archive/tags/Silverlight/default.aspx">Silverlight</a>, <a target="_blank" href="http://blogs.microsoft.co.il/blogs/tamir/archive/tags/Visual+Studio/default.aspx">Visual Studio 2008 SP1</a> etc.) Also, you can get advantage by using Windows Filtering Platform (Firewall) and User Account Control (UAC) from inside your application by using new APIs. </p>
<h3>Performance</h3>
<p>The most significant change in Windows 7 for end-user point of view is improved performance. Windows 7 kernel is much smaller, that kernel of Windows Vista. Also it uses specific patterns to decrease background activities on low power, based on system triggers. New user-mode and kernel-mode APIs are used by Windows Drivers Foundation much more efficiently. Also system services are much smarter. For example, DCIA starts only when you connect new hardware. After drivers were installed the service shuts down. The same approach used by domain join, GP changes, new IP fetching etc. Windows 7 knows to run and stop services, based on system events, which decreases average work load and enhances whole system performance. </p>
<h3>Multi-touch gestures and Interia API and used interface in general</h3>
<p>Yes, you can use this API for your applications. Finally we can have more, then just mouse. And it is not only about multiple mouse devices. We can use single finder panning, raw touch input data, internal multitouch ink recognition, which is also supports math. Also it uses build-in MathML export feature. </p>
<p>There are a lot of other enhancements, such as smart bars, windows&#8217; stacking, gadget desktop (it does not eat battery as external process anymore), system ribbon menu integration. etc</p>
<h3>Graphics</h3>
<p>Direct 11, new Direct2D, DirectWrite (we can turn text anti-aliasing for small fonts, hurrah!), improved WIC, DX/GDI interoperability on system level with automatic fallback for weak hardware (yes, you should not be worry about it anymore). Also new video and audio format support with <u>human readable interfaces</u>. Yes, no more DirectDraw hacks. We can use new high level interfaces such as MFPlay to manage playbacks, Source Reader for decoding, Sink Writer for transcoders and re-coding compressions.</p>
<h3>Web and communication</h3>
<p>WCF is inside, as well as distributed routing table for peer-to-peer operations. BranchCache &#8211; new technology to reduce WAN traffic and latency. </p>
<p>Also Windows 7 is compatible with <a target="_blank" href="http://www.opensearch.org">OpenSearch</a> (I told, that Microsoft does not know to build search engines). Sharepoint integration and environment sensors platform, that can be used either for desktop and web applications. </p>
<p>There are much more features, that makes Windows 7 to pretend to be very good operation system. If you want to learn more about all those Windows 7 new features, I highly advice you to <a target="_blank" href="http://code.msdn.microsoft.com/Win7DeveloperGuide/Release/ProjectReleases.aspx">download and read this document</a>. It includes most of new features of new OS with explanations and screenshots to make your learn and understand what can your future application do with all those new features.</p>
<p>Have a nice day and be good people.</p>
<p>BTW, if you have PDC version of Windows 7 and want to unlock it for using of some cool features, <a target="_blank" href="http://channel9.msdn.com/pdc2008/KYN02/">introduced during keynotes</a>, it worth <a target="_blank" href="http://www.withinwindows.com/2008/11/02/flashy-windows-7-bits-protected-by-elaborate-scheme-workaround/">to visit here</a> and learn how to <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Download </strong><a href="http://code.msdn.microsoft.com/Win7DeveloperGuide"><strong>Windows 7 Developer Guide</strong></a><strong> and start programming.</strong></p>


<p>Related posts:<ol><li><a href='http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/' rel='bookmark' title='Permanent Link: Windows 7 &ndash; dry run or how things should be done to correct old mistakes'>Windows 7 &ndash; dry run or how things should be done to correct old mistakes</a></li>
<li><a href='http://khason.net/blog/book-review-c-2008-and-2005-threaded-programming/' rel='bookmark' title='Permanent Link: Book review: C# 2008 and 2005 Threaded Programming'>Book review: C# 2008 and 2005 Threaded Programming</a></li>
<li><a href='http://khason.net/tech/some-new-in-mix-downloads/' rel='bookmark' title='Permanent Link: Some new in-mix downloads'>Some new in-mix downloads</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/programming-for-windows-7/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
