<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Thinking Kernel Mode</title>
        <link>http://geekswithblogs.net/kernelmode/Default.aspx</link>
        <description>ExAllocatePoolWithTag(KMScrapPad, sizeof(KMSCRAP), TAG_TKM);</description>
        <language>en-US</language>
        <copyright>Sreejith S</copyright>
        <managingEditor>sreejith.s@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Thinking Kernel Mode</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/kernelmode/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Introducing easy-to-use Web Scraper : WebHarvy</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2012/02/13/148683.aspx</link>
            <description>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check out WebHarvy &lt;a href="http://www.webharvy.com/" title="Web Scraper"&gt;Web Scraper&lt;/a&gt; to see how easy it is to scrape online data to an XML, CSV or TSV file. WebHarvy Web Scraper also allows you to export the extracted data to an SQL database. You may watch the video demo of WebHarvy at &lt;a href="http://www.webharvy.com/demo.html" title="Web Scraper Demo"&gt;http://www.webharvy.com/demo.html&lt;/a&gt; .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Web Scraping is the process of extracting data from remote websites to local storage in spreadsheet / table format. WebHarvy is a &lt;a href="http://www.webharvy.com/" title="Web Scraper"&gt;visual web scraper &lt;/a&gt; which helps users to extract data from websites using mouse clicks instead of writing scripts or complex code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Keywords : &lt;a href="http://www.webharvy.com/" title="Web Scraper"&gt;Web Scraper&lt;/a&gt;, &lt;a href="http://www.webharvy.com/" title="Web Scraper"&gt;Web Scraping&lt;/a&gt;, &lt;a href="http://www.webharvy.com/" title="Web Scraper"&gt;Screen Scraping&lt;/a&gt;, &lt;a href="http://www.webharvy.com/" title="Web Scraper"&gt;Web Data Extraction&lt;/a&gt;, &lt;a href="http://www.webharvy.com/" title="Web Scraper"&gt;Screen Scraper&lt;/a&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/148683.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2012/02/13/148683.aspx</guid>
            <pubDate>Mon, 13 Feb 2012 08:47:12 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/148683.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2012/02/13/148683.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/148683.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/148683.aspx</trackback:ping>
        </item>
        <item>
            <title>Share USB devices between 32 bit and 64 bit systems</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2011/02/18/143998.aspx</link>
            <description>&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The latest version of USBDeviceShare, the &lt;a href="http://www.sysnucleus.com/usbshare/index.html"&gt;USB over IP&lt;/a&gt; software, supports sharing USB devices between 32 bit and 64 bit editions of Windows. A USB device plugged in to a 64 bit PC running 64 bit version of Windows can be shared and remotely accessed from a 32 bit PC and vice versa.&lt;/p&gt;
&lt;p&gt;Download USBDeviceShare &lt;a href="http://www.sysnucleus.com/usbshare/index.html"&gt;USB over Network&lt;/a&gt; software from &lt;a href="http://www.sysnucleus.com/usbshare/usbshare_download.html"&gt;http://www.sysnucleus.com/usbshare/usbshare_download.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Keywords : &lt;a href="http://www.sysnucleus.com/usbshare/index.html"&gt;USB over Ethernet&lt;/a&gt;, &lt;a href="http://www.sysnucleus.com/usbshare/index.html"&gt;USB Server&lt;/a&gt;, &lt;a href="http://www.sysnucleus.com/usbshare/index.html"&gt;Remote USB Access&lt;/a&gt;, &lt;a href="http://www.sysnucleus.com/usbshare/index.html"&gt;Share USB&lt;/a&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/143998.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2011/02/18/143998.aspx</guid>
            <pubDate>Fri, 18 Feb 2011 08:28:21 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/143998.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2011/02/18/143998.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/143998.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/143998.aspx</trackback:ping>
        </item>
        <item>
            <title>Installing drivers using DPInst</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2010/05/04/139661.aspx</link>
            <description>&lt;p&gt; &lt;/p&gt;
&lt;p&gt;You can use DPInst (Driver Package Installer) to install driver files for your device on Windows Operating Systems. DPInst.exe is part of DIFx (Driver Install Framework tools) which comes along with the Windows Driver Kit (WDK). You can find DPInst redistributable inside the redist\DIFx\DPInst folder of the WDK.&lt;/p&gt;
&lt;p&gt;Using DPInst to install driver:&lt;br /&gt;
1)  &lt;a href="http://msdn.microsoft.com/en-us/library/ff553601(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/ff553601(VS.85).aspx&lt;/a&gt;&lt;br /&gt;
 2) &lt;a href="http://blogs.technet.com/svengruenitz/archive/2008/07/02/driver-installation-and-updating-made-easy-dpinst-exe.aspx"&gt;http://blogs.technet.com/svengruenitz/archive/2008/07/02/driver-installation-and-updating-made-easy-dpinst-exe.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How to ?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt;. Copy dpinst.exe to the folder where the driver files (sys, inf, dll) reside.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2&lt;/strong&gt;. Optionally create a dpinst.xml file which is used to configure dpinst (&lt;a href="http://msdn.microsoft.com/en-us/library/ff550803(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/ff550803(VS.85).aspx&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;If your drivers are not signed you must use the &amp;lt;legacyMode/&amp;gt; tag in dpinst.xml.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;3&lt;/strong&gt;. Run dpinst.exe to install drivers using a 'device driver update' wizard.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/139661.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2010/05/04/139661.aspx</guid>
            <pubDate>Tue, 04 May 2010 10:11:19 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/139661.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2010/05/04/139661.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/139661.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/139661.aspx</trackback:ping>
        </item>
        <item>
            <title>Access USB over Network</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2009/09/22/135022.aspx</link>
            <description>&lt;p&gt;&lt;font face=""&gt;Today most devices connect to the PC via USB. What if you need to share a USB device with another person at home or at work. What you normally do is unplug the device and hand it over to the other person. Or you can let him/her use your computer where the device is present. What if the device is not portable ? What if you and your friend are located at different parts of the world and need to share a device ? What if the device needs to be shared on a timely basis among a number of persons, so that each one can access the device when it becomes available ? The device can be a Scanner, a hardware protection dongle, an Oscilloscope, a medical sensor or a development board, it can be any USB device. Enter USBDeviceShare, the hassle-free and easy way to share and access USB devices remotely over network (or internet).&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face=""&gt;USBDeviceShare has 2 components : a server and a client. Install server where devices are physically present and where they need to be shared. Install client where devices need to be remotely accessed. The remote devices can be virtually plugged in to your PC using the client. Applications which work with these devices can then be run as if the devices are locally connected.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face=""&gt;Another important application of USBDeviceShare is in virtualization. USB support, i.e ability to access USB ports of host machines, is not present or is unstable in most virtual machines. The solution is to install USBDeviceShare server in the host OS and run client in Guest OSes (VMs). The clients can connect and access the USB devices connected to the host OS.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face=""&gt;To know more please visit &lt;a href="http://www.sysnucleus.com/usbshare/"&gt;http://www.sysnucleus.com/usbshare/&lt;/a&gt;. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Keywords : &lt;a href="http://www.sysnucleus.com/usbshare/"&gt;USB over Network&lt;/a&gt;, &lt;a href="http://www.sysnucleus.com/usbshare/"&gt;USB over IP&lt;/a&gt;, &lt;a href="http://www.sysnucleus.com/usbshare/"&gt;USB over Ethernet&lt;/a&gt;, &lt;a href="http://www.sysnucleus.com/usbshare/"&gt;Remote USB&lt;/a&gt;, &lt;a href="http://www.sysnucleus.com/usbshare/"&gt;Share USB Device&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/135022.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2009/09/22/135022.aspx</guid>
            <pubDate>Wed, 23 Sep 2009 04:20:08 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/135022.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2009/09/22/135022.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/135022.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/135022.aspx</trackback:ping>
        </item>
        <item>
            <title>The new software upgrade mantra</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2009/09/07/134530.aspx</link>
            <description>&lt;span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium &amp;quot;Times New Roman&amp;quot;; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"&gt;&lt;span style="FONT-FAMILY: monospace; WHITE-SPACE: pre-wrap; FONT-SIZE: 13px" class="Apple-style-span"&gt;
&lt;p&gt;"Smaller, Faster, Smarter"&lt;/p&gt;
&lt;p&gt;Every successful software once reaches a stage where adding more features makes the application 'Bigger, Slower and Lamer". Once that critical mass has been reached, trying to cash in by adding more features leads to a process called 'feature creep'(&lt;a href="http://en.wikipedia.org/wiki/Feature_creep"&gt;http://en.wikipedia.org/wiki/Feature_creep&lt;/a&gt;). &lt;/p&gt;
&lt;p&gt;What Microsoft and Apple are trying to do with their latest OS releases (Windows 7 and Snow Leopard) is to offer an upgrade which claims to free up more disk space (smaller), run faster (more optimized, efficient).&lt;/p&gt;
&lt;p&gt;Read &lt;a href="http://www.nytimes.com/2009/08/27/technology/personaltech/27pogue.html?pagewanted=1&amp;amp;_r=3&amp;amp;ref=technology"&gt;http://www.nytimes.com/2009/08/27/technology/personaltech/27pogue.html?pagewanted=1&amp;amp;_r=3&amp;amp;ref=technology&lt;/a&gt; .&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt; &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/134530.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2009/09/07/134530.aspx</guid>
            <pubDate>Mon, 07 Sep 2009 05:42:36 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/134530.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2009/09/07/134530.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/134530.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/134530.aspx</trackback:ping>
        </item>
        <item>
            <title>Preinstalling Driver files</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2009/08/25/134300.aspx</link>
            <description>&lt;p&gt;&lt;span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium &amp;quot;Times New Roman&amp;quot;; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"&gt;&lt;span style="FONT-FAMILY: monospace; WHITE-SPACE: pre-wrap; FONT-SIZE: 13px" class="Apple-style-span"&gt;Often we are required to write applications (installers) which installs the driver files associated with a device even before the device is actually plugged in to the system. The process is called 'preinstalling' driver packages. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium &amp;quot;Times New Roman&amp;quot;; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"&gt;&lt;span style="FONT-FAMILY: monospace; WHITE-SPACE: pre-wrap; FONT-SIZE: 13px" class="Apple-style-span"&gt;In order to preinstall a driver package, use the SetupCopyOEMInf API. Uninstallation can be done using the SetupUninstallOEMInf API. Look here &lt;a href="http://msdn.microsoft.com/en-us/library/aa906201.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa906201.aspx&lt;/a&gt; for more details.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/134300.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2009/08/25/134300.aspx</guid>
            <pubDate>Tue, 25 Aug 2009 06:10:11 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/134300.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2009/08/25/134300.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/134300.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/134300.aspx</trackback:ping>
        </item>
        <item>
            <title>Programatically update the driver for a device</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2008/11/12/126973.aspx</link>
            <description>&lt;br /&gt;
So you need to change the driver loaded for a given device from your application. You have a couple of options to do this. &lt;br /&gt;
&lt;br /&gt;
The first method is to use the &lt;a href="http://msdn.microsoft.com/en-us/library/ms792968.aspx"&gt;UpdateDriverForPlugAndPlayDevices&lt;/a&gt; API. This method is simple and straightforward to use. But the downside of using this API is that it will update drivers for all devices with the specified hardware id. So if you need to selectively update one of the devices with a new driver you will have to look for something else.&lt;br /&gt;
&lt;br /&gt;
And that method is by using the &lt;a href="http://msdn.microsoft.com/en-us/library/aa906293.aspx"&gt;InstalledSelectedDriver&lt;/a&gt; API. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://support.microsoft.com/kb/889763"&gt;Sample Code: How to use InstallSelectedDriver to update driver ?&lt;/a&gt; &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/126973.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2008/11/12/126973.aspx</guid>
            <pubDate>Wed, 12 Nov 2008 09:00:02 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/126973.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2008/11/12/126973.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/126973.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/126973.aspx</trackback:ping>
        </item>
        <item>
            <title>USB Monitor for Windows</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2008/04/28/121748.aspx</link>
            <description>&lt;br /&gt;
This post is about USBTrace,  a software based &lt;a href="http://www.sysnucleus.com"&gt;USB monitor&lt;/a&gt; / USB sniffer , which can be used to capture &amp;amp; analyze transactions happening in the USB bus. This tool is helpful for USB firmware/device driver developers while debugging and testing their device implementation. USB requests are captured and displayed in easly readable format to make analyzing easy.  USB requests passing though different layers of the USB device stack are captured and displayed. Helps developers to highly reduce their debug session's time. Supports USB 1.x and 2.0 host controllers, hubs and devices.&lt;br /&gt;
&lt;br /&gt;
Download : &lt;a href="http://www.sysnucleus.com/usbtrace_download.html"&gt;http://www.sysnucleus.com/usbtrace_download.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Keywords : &lt;a href="http://www.sysnucleus.com"&gt;USB Monitor&lt;/a&gt; , &lt;a href="http://www.sysnucleus.com"&gt;USB Analyzer&lt;/a&gt; ,  &lt;a href="http://www.sysnucleus.com"&gt;USB Protocol Analyzer&lt;/a&gt; , &lt;a href="http://www.sysnucleus.com"&gt;USB Sniffer&lt;/a&gt; &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/121748.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2008/04/28/121748.aspx</guid>
            <pubDate>Tue, 29 Apr 2008 03:50:19 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/121748.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2008/04/28/121748.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/121748.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/121748.aspx</trackback:ping>
        </item>
        <item>
            <title>X64 Assembly Code in Windows Drivers</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2008/03/07/120340.aspx</link>
            <description>&lt;br /&gt;
Writing asm code for 32 bit drivers is straightforward. You can embed the code in an __asm { } block.&lt;br /&gt;
&lt;br /&gt;
void DemoFunction()&lt;br /&gt;
{&lt;br /&gt;
    __asm&lt;br /&gt;
    {&lt;br /&gt;
            mov eax, 0x01&lt;br /&gt;
            ; more assembly&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But writing assembly in 64 bit driver source code requires a bit more work. The 64 bit compiler will not allow inline assembly. The assembly code will have to be moved to a seperate assembly module (an .asm file).&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;Step 1 : Write necessary assembly routines in a seperate .asm file&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Example : Test.asm&lt;br /&gt;
------------------------------------------&lt;br /&gt;
&lt;br /&gt;
.data&lt;br /&gt;
&lt;br /&gt;
; all data variables in your asm code goes here&lt;br /&gt;
myData1    dq    0    ; 64 bit data&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.code&lt;br /&gt;
&lt;br /&gt;
; all assembly routines go here&lt;br /&gt;
&lt;br /&gt;
TestFunction PROC&lt;br /&gt;
&lt;br /&gt;
    ; sample function/routine/procedure&lt;br /&gt;
&lt;br /&gt;
    ; assembly code for the function goes here&lt;br /&gt;
&lt;br /&gt;
    ret &lt;br /&gt;
    &lt;br /&gt;
TestFunction ENDP&lt;br /&gt;
&lt;br /&gt;
END ; end of assembly file&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;Step2 :  Integrate assembly function with C&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;In one of your C header files declare the function:&lt;br /&gt;
&lt;br /&gt;
extern void TestFunction(void);&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;Step 3 : Adding asm file to sources file&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;In the sources file of your driver you can add the .asm file along with other C files.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
SOURCES = init. c \&lt;br /&gt;
ioctl.c \&lt;br /&gt;
pnp.c\&lt;br /&gt;
power.c\&lt;br /&gt;
Test.asm&lt;br /&gt;
&lt;br /&gt;
You can add the same under AMD64_SOURCES or IA64_SOURCES if you required to include the same only in those specific architectures.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/120340.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2008/03/07/120340.aspx</guid>
            <pubDate>Fri, 07 Mar 2008 08:27:23 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/120340.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2008/03/07/120340.aspx#feedback</comments>
            <slash:comments>12</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/120340.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/120340.aspx</trackback:ping>
        </item>
        <item>
            <title>X64 Calling</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2008/03/06/120337.aspx</link>
            <description>&lt;br /&gt;
Computers with 64 bit processors are becoming popular, at least in enterprise circles. Also the X64 version of Windows Vista is more popular than Windows XP 64 bit edition.&lt;br /&gt;
&lt;h2&gt; &lt;/h2&gt;
&lt;h2&gt;2 Types of 64 bit architecture&lt;/h2&gt;
&lt;br /&gt;
Yes, unlike 32 bit (aka X32) there are 2 64 bit architectures:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
    &lt;li&gt;AMD's X64 ; also known as X32-64 &amp;amp; AMD64&lt;/li&gt;
    &lt;li&gt;Intel's IA-64; also known as Itanium&lt;/li&gt;
&lt;/ol&gt;
The subject of this post is AMD's 64 bit chip, which is commonly referred to as X64&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;So, whats the difference ?&lt;/h2&gt;
&lt;br /&gt;
The X64 architecture is a super set of  X32 architecture :&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;64 bit versions of the the existing 32 bit registers &lt;br /&gt;
    &lt;ul&gt;
        &lt;li&gt;So X32's 32 bit registers EAX, EBX, ECX etc becomes 64 bit RAX, RBX, RCX etc in X64&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;8 new 64 bit general purpose registers (R8, R9...R15)&lt;/li&gt;
    &lt;li&gt;8 new 128 bit XMM registers&lt;/li&gt;
&lt;/ul&gt;
To know more about the architecture goto&lt;a href="http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_875_7044,00.html"&gt; http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_875_7044,00.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;And how is programing different ?&lt;/h2&gt;
&lt;br /&gt;
A lot has been written about porting existing 32 bit code to 64 bit. A lot of these deals with change in sizeof pointers (from 32 bit to 64 bit) and change in the sizeof some of the basic data types (this depends on the compiler which you are using)&lt;br /&gt;
&lt;br /&gt;
Links:&lt;br /&gt;
&lt;br /&gt;
Porting device drivers to AMD64&lt;br /&gt;
[&lt;a href="http://www.amd.com/us-en/assets/content_type/DownloadableAssets/dwamd_Porting_Win_DD_to_AMD64_Sept24.pdf"&gt;http://www.amd.com/us-en/assets/content_type/DownloadableAssets/dwamd_Porting_Win_DD_to_AMD64_Sept24.pdf&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;
64 bit driver guidelines &lt;br /&gt;
[&lt;a href="http://www.microsoft.com/whdc/driver/64bitguide.mspx"&gt;http://www.microsoft.com/whdc/driver/64bitguide.mspx&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;
20 issues of porting C++ code on the 64-bit platform&lt;br /&gt;
[&lt;a href="http://www.viva64.com/articles/20_issues_of_porting_C++_code_on_the_64-bit_platform.html"&gt;http://www.viva64.com/articles/20_issues_of_porting_C++_code_on_the_64-bit_platform.html&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;..assembly programming ?&lt;/h2&gt;
&lt;br /&gt;
Not many program in assembly languages these days. But if it occurs to you there are a few things to keep in mind.&lt;br /&gt;
&lt;br /&gt;
Source Link : http://www.quequero.org/X64_Assembly&lt;br /&gt;
&lt;br /&gt;
Win32 on X32 provided us with many calling conventions (function calling conventions : fastcall, stdcall etc). In X64 there is no choice. There is only one calling convention:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="margin-left: 40px; color: rgb(0, 0, 0);"&gt;&lt;span style="font-style: italic;"&gt; The first parameter is the rcx register, the second one rdx, the third r8 and the fourth r9. Saying that the parameters registers are part of the stack frame, makes it also clear that any function that calls another child function has to initialize the stack providing space for these four registers, even if the parameters passed to the child function are less than four. &lt;/span&gt;&lt;br style="font-style: italic;" /&gt;
&lt;span style="font-style: italic;"&gt;The initialization of the stack pointer is done only in the prologue of a function, it has to be large enough to hold all the arguments passed to child functions and it's always a duty of the caller to clean the stack. Now, the most important thing to understand how the space is provided in the stack frame is that the stack has to be 16-byte aligned. &lt;/span&gt;&lt;br style="font-style: italic;" /&gt;
&lt;span style="font-style: italic;"&gt;In fact, the return address has to be aligned to 16 bytes. So, the stack space will always be something like 16n + 8, where n depends on the number of parameters. Here's a small figure of a stack frame:&lt;/span&gt; &lt;/div&gt;
&lt;div class="floatnone" style="margin-left: 40px; color: rgb(0, 0, 255);"&gt;&lt;span&gt;&lt;br /&gt;
&lt;table cellspacing="1" cellpadding="1" border="1" align="" summary="" style="width: 291px; height: 113px;"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;span style="font-weight: bold;"&gt;Stack Parameters (5th param onwards)&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;span style="font-weight: bold;"&gt;Register Parameters (Space for 4 Reg params)&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;span style="font-weight: bold;"&gt;Return IP address (RIP)&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="vertical-align: top;"&gt;&lt;span style="font-weight: bold;"&gt;Local Variables of the function&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
If you see the disassembly of a 64 bit program, you can see that the stack pointer (RSP) is not messed with throughout the function body. Necessary stack is reserverd ( Sub RSP, 0x[ReqSize] ) in the function prolog.&lt;br /&gt;
&lt;br /&gt;
Another important thing to note is that even though the first 4 parameters are passed via registerd (RCX, RDX, R8 and R9) they must be given scratch storage space in the stack (Register Parameters in the above figure/call stack).&lt;br /&gt;
&lt;br /&gt;
So while porting asm from 32bit to 64bit, if you have a void routine&lt;br /&gt;
&lt;br /&gt;
&lt;div style="margin-left: 40px;"&gt;call MyRoutine&lt;/div&gt;
&lt;p&gt;&lt;span style="font-weight: normal;"&gt;must be changed as:&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left: 40px;"&gt;sub rsp, 20h        ; Reserve space for register parameters&lt;br /&gt;
&lt;/p&gt;
&lt;p style="margin-left: 40px;"&gt;call MyRoutine&lt;/p&gt;
&lt;p style="margin-left: 40px;"&gt;add rsp, 20h&lt;span style="font-weight: normal;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;br /&gt;
Another difference found was in X64 the luxury of PUSHA/PUSHD POPA/POPD (Push/Pop all registers and flags) is not available.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Footnotes&lt;/h2&gt;
&lt;ul&gt;
    &lt;li&gt;MS Visual Studio 2005 lets you build 64 bit applications. The 64 bit compiler modules are not included in the installation by default.&lt;/li&gt;
    &lt;li&gt;VS 2005 has options to turn on 64bit compile warning (probable errors) for your 32 bit code; so you can check whether your 32bit code is 64bit ready&lt;/li&gt;
    &lt;li&gt;Windows Server 2003 DDK and above comes with MASM64 for writing asm modules.&lt;/li&gt;
    &lt;li&gt;32 bit applications can run over 64 bit windows (WOW64 &lt;a href="http://en.wikipedia.org/wiki/WOW64"&gt;http://en.wikipedia.org/wiki/WOW64&lt;/a&gt;)&lt;/li&gt;
    &lt;li&gt;32 bit drivers cannot be used to 64 bit windows.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt; &lt;/h2&gt; &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/120337.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2008/03/06/120337.aspx</guid>
            <pubDate>Fri, 07 Mar 2008 01:13:28 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/120337.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2008/03/06/120337.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/120337.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/120337.aspx</trackback:ping>
        </item>
        <item>
            <title>Kernel Mode Driver Framework</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2005/12/13/62991.aspx</link>
            <description>&lt;html&gt;

&lt;head&gt;
&lt;meta http-equiv="Content-Language" content="en-us"&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252"&gt;
&lt;meta name="GENERATOR" content="Microsoft FrontPage 4.0"&gt;
&lt;meta name="ProgId" content="FrontPage.Editor.Document"&gt;
&lt;title&gt;New Page 1&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;The Windows Driver Foundation (WDF)
Kernel Mode Driver Framework (KMDF) is out.&amp;nbsp;
 &lt;/font&gt;
&lt;/p&gt;

&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Get it from:&lt;br&gt;
&lt;a href="http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx"&gt;http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx&lt;/a&gt;
 &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Windows Driver Foundation is the
next-generation driver model, which removes a lot of complexity which exists in
the current driver model (WDM). WDF achieves this not by replacing WDM, but by
providing a framework which runs over WDM. The framework frees the developer
from dealing directly with the operating system and allows him to concentrate
more on his device (hardware). &lt;/font&gt;
&lt;/p&gt;

&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Read more about WDF:&lt;br&gt;&lt;br&gt;
&lt;/font&gt;&lt;a href="http://www.microsoft.com/whdc/driver/wdf/wdf-arch.mspx"&gt;http://www.microsoft.com/whdc/driver/wdf/wdf-arch.mspx&lt;/a&gt;
 (WDF Architecture)
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.microsoft.com/whdc/driver/wdf/default.mspx"&gt;http://www.microsoft.com/whdc/driver/wdf/default.mspx&lt;/a&gt;
(WHDC WDF page)&lt;/p&gt;&lt;br&gt;&lt;br&gt;
&lt;/body&gt;

&lt;/html&gt;
 &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/62991.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2005/12/13/62991.aspx</guid>
            <pubDate>Tue, 13 Dec 2005 18:54:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/62991.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2005/12/13/62991.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/62991.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/62991.aspx</trackback:ping>
        </item>
        <item>
            <title>In search of stupidity</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2005/11/14/60037.aspx</link>
            <description>&lt;html&gt;

&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252"&gt;
&lt;meta name="GENERATOR" content="Microsoft FrontPage 4.0"&gt;
&lt;meta name="ProgId" content="FrontPage.Editor.Document"&gt;
&lt;title&gt;New Page 1&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;i&gt;&amp;quot;Sony's attempt at protecting its music
cds from piracy has turned into a tale of security woes that has quickly gone from bad to worse. New software on several of the company's
cds installs a copy protection rootkit on a user's PC once the license agreement on the disc is accepted. Virus writers jumped on the fact that Sony's rootkit hides itself on users' computers, and a few Trojan horses have been released that piggyback on the software, effectively hiding from antivirus software&amp;quot;&lt;/i&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://news.com.com/Wills+Sonys+DRM+nightmare+affect+future+policies/2009-1029_3-5947274.html?tag=fd_carsl"&gt;&lt;font face="Times New Roman" size="3"&gt;http://news.com.com/Wills+Sonys+DRM+nightmare+affect+future+policies/2009-1029_3-5947274.html?tag=fd_carsl&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;br&gt;

&lt;/body&gt;

&lt;/html&gt;
 &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/60037.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2005/11/14/60037.aspx</guid>
            <pubDate>Mon, 14 Nov 2005 19:17:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/60037.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2005/11/14/60037.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/60037.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/60037.aspx</trackback:ping>
        </item>
        <item>
            <title>Writing a virtual audio driver</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2005/10/26/58109.aspx</link>
            <description>&lt;html&gt;

&lt;head&gt;
&lt;meta http-equiv="Content-Language" content="en-us"&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252"&gt;
&lt;meta name="GENERATOR" content="Microsoft FrontPage 4.0"&gt;
&lt;meta name="ProgId" content="FrontPage.Editor.Document"&gt;
&lt;title&gt;New Page 1&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;p&gt;&lt;i&gt;&lt;font size="3" face="Times New Roman"&gt;{ Not invented here }&lt;/font&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;Unless I scribble this down somewhere,
I will forget. So let me dump my memory . .&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;Kernel Streaming is a fairly
complicated topic. And to study this, the available resources are the DDK
help documentation and the samples. AFAIK, there are no books written on this
topic. And what is present online is also meager.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;The &lt;b&gt;Streaming Devices (Video &amp;amp;
Audio) &lt;/b&gt;subsection of the DDK help, has everything documented.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Now,&amp;nbsp; in order to emulate a
virtual audio hardware, we have to write an Audio Miniport Adapter driver. The
MSAVD sample source code can be used for this purpose.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;a href="http://www.microsoft.com/whdc/device/audio/default.mspx"&gt;WHDC
Audio Device Technologies for Windows&lt;/a&gt; [http://www.microsoft.com/whdc/device/audio/default.mspx]&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;a href="http://www.microsoft.com/whdc/device/audio/wdmaud-drv.mspx"&gt;Getting Started with WDM Audio Drivers&lt;/a&gt;
[http://www.microsoft.com/whdc/device/audio/wdmaud-drv.mspx]&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;This is how the audio device stack will
look like.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;br&gt;
&lt;div align="center"&gt;
  &lt;center&gt;
  &lt;table border="1" width="60%" bordercolorlight="#FFFFFF"&gt;
    &lt;tr&gt;
      &lt;td width="100%" colspan="2" align="center"&gt;&lt;font face="Times New Roman" size="3"&gt;System
        Audio Device (SysAudio.sys)&lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width="100%" colspan="2" align="center"&gt;&lt;font face="Times New Roman" size="3"&gt;Kernel
        Mixer (Kmix.sys)&lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width="50%" align="center"&gt;&lt;font face="Times New Roman" size="3"&gt;Streaming
        Class Driver (stream.sys)&lt;/font&gt;&lt;/td&gt;
      &lt;td width="50%" rowspan="2" align="center"&gt;&lt;font face="Times New Roman" size="3"&gt;Port
        Class Driver (PortCls.sys)&lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width="50%" align="center"&gt;&lt;font face="Times New Roman" size="3"&gt;USB
        Audio (USBAudio.sys)&lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width="50%" align="center"&gt;&lt;font face="Times New Roman" size="3"&gt;USB
        Device&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
      &lt;td width="50%" align="center" bgcolor="#C0C0C0"&gt;&lt;font color="#0000FF" size="3" face="Times New Roman"&gt;Adapter
        Driver&lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width="50%" align="center"&gt;&lt;font face="Times New Roman" size="3"&gt;USB
        Controller&lt;/font&gt;&lt;/td&gt;
      &lt;td width="50%" align="center"&gt;&lt;font face="Times New Roman" size="3"&gt;Audio
        Device&lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/center&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;The Adapter Driver is what we write and
for a virtual audio device it will be a modified MSAVD driver.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;font face="Times New Roman" size="3"&gt;Modifying the MSAVD Driver to make
your own virtual audio device.&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;In Kernel Streaming, every component is
a Filter. Filters have input (sink) and output (source) pins. Data enters a
filter through its input pin and leaves through the output pin. Every filter has
a purpose :&amp;nbsp; to process the data flowing through them.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;As an audio device (virtual or real),
your hardware will have a range of audio data parameters which can be accepted.
Or in other words, only data complying to a specific format and parameter range
can be accepted by the input pins. This is called the property of the pin.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Specify those ranges in the &lt;i&gt;PinDataRangesStream
&lt;/i&gt;static variable of the MSAVD source code.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Now, in the &lt;i&gt;WaveCyclic &lt;/i&gt;miniport
there are two methods named &lt;i&gt;CopyTo&lt;/i&gt; and &lt;i&gt;CopyFrom&lt;/i&gt; for copying audio
data to and from the audio device's&amp;nbsp; memory (DMA). Add code to those
function to implement a virtual write and read and the minimal audio driver code
is complete.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;/body&gt;

&lt;/html&gt;
 &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/58109.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2005/10/26/58109.aspx</guid>
            <pubDate>Wed, 26 Oct 2005 14:41:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/58109.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2005/10/26/58109.aspx#feedback</comments>
            <slash:comments>43</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/58109.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/58109.aspx</trackback:ping>
        </item>
        <item>
            <title>Entry Point</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2005/10/19/57384.aspx</link>
            <description>&lt;html&gt;

&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252"&gt;
&lt;meta name="GENERATOR" content="Microsoft FrontPage 4.0"&gt;
&lt;meta name="ProgId" content="FrontPage.Editor.Document"&gt;
&lt;title&gt;New Page 1&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;The best way to describe this space is :&lt;br&gt;
&lt;br&gt;
&lt;font color="#0000FF"&gt;        scrap paper - loose sheets of paper, often already partly used, for writing notes on.&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
For many reasons I feel the current timeslot to be a highly active one. A lot of things are happening. Applications are moving away from the PC to the internet. Computing is becoming more and more pervasive.  The size of information we used to manage is getting bigger and bigger.  There was a period when I used to wonder why the chip makers always try to make the clock run faster and faster.&amp;nbsp;&lt;br&gt;
&lt;br&gt;
The arena dominated by a single mammoth is now history.  Apple and Google are now getting more personal than Microsoft.  The future is  for everyone.&amp;nbsp;&lt;br&gt;
&lt;br&gt;
I am not a visionary. I still remember the day when Digger2 told me that  MS is not going to be a monopoly for all time.  And that, something and someone better will come up one day.&lt;br&gt;
&lt;br&gt;
Since I spend majority of the time writing device drivers, many of the entries (if this weblog lives) will be related to that. The rest will reflect my views on the current tech world.&amp;nbsp;&lt;br&gt;
&lt;br&gt;
I read news.com.com regularly :).&lt;br&gt;
&lt;br&gt;
And I am not going to spell check here. &lt;br&gt;
&lt;/font&gt;&lt;/p&gt;

&lt;/body&gt;

&lt;/html&gt;
 &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/57384.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2005/10/19/57384.aspx</guid>
            <pubDate>Wed, 19 Oct 2005 18:48:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/57384.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2005/10/19/57384.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/57384.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/57384.aspx</trackback:ping>
        </item>
        <item>
            <title>Allocating a synchronization primitive</title>
            <link>http://geekswithblogs.net/kernelmode/archive/2005/10/20/57489.aspx</link>
            <description>&lt;html&gt;

&lt;head&gt;
&lt;meta http-equiv="Content-Language" content="en-us"&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252"&gt;
&lt;meta name="GENERATOR" content="Microsoft FrontPage 4.0"&gt;
&lt;meta name="ProgId" content="FrontPage.Editor.Document"&gt;
&lt;title&gt;New Page 1&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Never allocate a dispatcher object from
PagedPool. Which means, don't even think about doing a&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3" color="#0000FF"&gt;KSPIN_LOCK SpinLock;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;within your PAGED_CODE.&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;If a dispatcher object is allocated
from PagedPool, the driver might work peacefully, but occasionally the system
will bugcheck saying that it tried to access paged memory from higher IRQL.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;So, &lt;/font&gt;&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;font face="Times New Roman" size="3"&gt;Allocate them explicitly from
    NonPagedPool .&lt;/font&gt;
    &lt;p&gt;&lt;font face="Times New Roman" size="3" color="#0000FF"&gt;PKSPIN_LOCK
    pSpinLock = ExAllocatePool(NonPagedPool, sizeof(struct KSPIN_LOCK));&lt;br&gt;
    &lt;/font&gt;&lt;/li&gt;&lt;br&gt;
  &lt;li&gt;&lt;font face="Times New Roman" size="3"&gt;Or declare them globally. (All
    global variables in a kernel mode driver are allocated from NonPagedPool).&lt;br&gt;
    &lt;/font&gt;&lt;/li&gt;&lt;br&gt;
  &lt;li&gt;&lt;font face="Times New Roman" size="3"&gt;You can place them in the device
    extension of the driver created device object. The device extension is
    always allocated from NonPaged memory.&lt;br&gt;
    &lt;/font&gt;&lt;/li&gt;&lt;br&gt;
  &lt;li&gt;&lt;font face="Times New Roman" size="3"&gt;You can also place them in the
    controller extension of the driver created controller object.&lt;/font&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;/body&gt;

&lt;/html&gt;
 &lt;img src="http://geekswithblogs.net/kernelmode/aggbug/57489.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sreejith S</dc:creator>
            <guid>http://geekswithblogs.net/kernelmode/archive/2005/10/20/57489.aspx</guid>
            <pubDate>Thu, 20 Oct 2005 18:11:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/kernelmode/comments/57489.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/kernelmode/archive/2005/10/20/57489.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/kernelmode/comments/commentRss/57489.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/kernelmode/services/trackbacks/57489.aspx</trackback:ping>
        </item>
    </channel>
</rss>
